[vlc-commits] caca: use new event thread helper
Rémi Denis-Courmont
git at videolan.org
Sun Aug 6 20:27:30 CEST 2017
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Aug 5 23:48:14 2017 +0300| [154505f090019bbf1514abde22e3b05943554335] | committer: Rémi Denis-Courmont
caca: use new event thread helper
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=154505f090019bbf1514abde22e3b05943554335
---
modules/video_output/Makefile.am | 2 +-
modules/video_output/caca.c | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/modules/video_output/Makefile.am b/modules/video_output/Makefile.am
index 0bc69a8a42..ce6ce877c0 100644
--- a/modules/video_output/Makefile.am
+++ b/modules/video_output/Makefile.am
@@ -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
diff --git a/modules/video_output/caca.c b/modules/video_output/caca.c
index b9d0cf83f0..65d317cedc 100644
--- a/modules/video_output/caca.c
+++ b/modules/video_output/caca.c
@@ -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)
More information about the vlc-commits
mailing list