[vlc-commits] caca: add Xlib initialization
Rémi Denis-Courmont
git at videolan.org
Sun May 13 21:31:29 CEST 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun May 13 22:31:02 2012 +0300| [348f756442426d4c8b9fe62c31e4bbe8fa78552a] | committer: Rémi Denis-Courmont
caca: add Xlib initialization
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=348f756442426d4c8b9fe62c31e4bbe8fa78552a
---
modules/video_output/Modules.am | 3 +++
modules/video_output/caca.c | 10 ++++++++++
2 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/modules/video_output/Modules.am b/modules/video_output/Modules.am
index 134f2e7..9ea89e7 100644
--- a/modules/video_output/Modules.am
+++ b/modules/video_output/Modules.am
@@ -135,6 +135,9 @@ libvlc_LTLIBRARIES += $(LTLIBegl)
libcaca_plugin_la_SOURCES = caca.c
libcaca_plugin_la_CFLAGS = $(AM_CFLAGS) $(CACA_CFLAGS)
libcaca_plugin_la_LIBADD = $(AM_LIBADD) $(CACA_LIBS)
+if !HAVE_WIN32
+libcaca_plugin_la_LIBADD += $(X_LIBS) $(X_PRE_LIBS) -lX11
+endif
libcaca_plugin_la_DEPENDENCIES =
EXTRA_LTLIBRARIES += libcaca_plugin.la
libvlc_LTLIBRARIES += $(LTLIBcaca)
diff --git a/modules/video_output/caca.c b/modules/video_output/caca.c
index 08786a9..e9eb829 100644
--- a/modules/video_output/caca.c
+++ b/modules/video_output/caca.c
@@ -34,6 +34,12 @@
#include <vlc_plugin.h>
#include <vlc_vout_display.h>
#include <vlc_picture_pool.h>
+#ifndef WIN32
+# ifdef X_DISPLAY_MISSING
+# error Xlib required due to XInitThreads
+# endif
+# include <vlc_xlib.h>
+#endif
#include <caca.h>
@@ -82,6 +88,10 @@ static int Open(vlc_object_t *object)
vout_display_t *vd = (vout_display_t *)object;
vout_display_sys_t *sys;
+#ifndef X_DISPLAY_MISSING
+ if (!vlc_xlib_init(object))
+ return VLC_EGENERIC;
+#endif
#if defined(WIN32) && !defined(UNDER_CE)
CONSOLE_SCREEN_BUFFER_INFO csbiInfo;
SMALL_RECT rect;
More information about the vlc-commits
mailing list