Commit 154505f0 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

caca: use new event thread helper

parent 0fb319df
......@@ -419,7 +419,7 @@ vout_LTLIBRARIES += $(LTLIBaa)
### Coloured ASCII art ###
libcaca_plugin_la_SOURCES = video_output/caca.c
libcaca_plugin_la_CFLAGS = $(AM_CFLAGS) $(CACA_CFLAGS)
libcaca_plugin_la_LIBADD = $(CACA_LIBS)
libcaca_plugin_la_LIBADD = libevent_thread.la $(CACA_LIBS)
if !HAVE_WIN32
if !HAVE_DARWIN
libcaca_plugin_la_LIBADD += $(X_LIBS) $(X_PRE_LIBS) -lX11
......
......@@ -42,6 +42,7 @@
#endif
#include <caca.h>
#include "event_thread.h"
/*****************************************************************************
* Module descriptor
......@@ -78,6 +79,7 @@ struct vout_display_sys_t {
cucul_dither_t *dither;
picture_pool_t *pool;
vout_display_event_thread_t *et;
};
/**
......@@ -176,6 +178,8 @@ static int Open(vlc_object_t *object)
caca_set_display_title(sys->dp,
VOUT_TITLE "(Colour AsCii Art)");
sys->et = VoutDisplayEventCreateThread(vd);
/* Fix format */
video_format_t fmt = vd->fmt;
if (fmt.i_chroma != VLC_CODEC_RGB32) {
......@@ -187,7 +191,6 @@ static int Open(vlc_object_t *object)
/* Setup vout_display now that everything is fine */
vd->fmt = fmt;
vd->info.needs_event_thread = true;
vd->pool = Pool;
vd->prepare = Prepare;
......@@ -227,6 +230,7 @@ static void Close(vlc_object_t *object)
vout_display_t *vd = (vout_display_t *)object;
vout_display_sys_t *sys = vd->sys;
VoutDisplayEventKillThread(sys->et);
if (sys->pool)
picture_pool_Release(sys->pool);
if (sys->dither)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment