[vlc-commits] commit: ASCII Art: initialize Xlib ( Rémi Denis-Courmont )

git at videolan.org git at videolan.org
Thu Jul 15 18:31:13 CEST 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jul 15 19:26:43 2010 +0300| [d6d738ce6ec022d25c2dda2c12d9c194092230f4] | committer: Rémi Denis-Courmont 

ASCII Art: initialize Xlib

Don't ask me why, but libaa depends on Xlib.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d6d738ce6ec022d25c2dda2c12d9c194092230f4
---

 configure.ac              |    3 +++
 modules/video_output/aa.c |   12 ++++++++++++
 2 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac
index 7eace73..4dbf6e2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3623,6 +3623,9 @@ then
   then
     VLC_ADD_PLUGIN([aa])
     VLC_ADD_LIBS([aa],[-laa])
+    if test "${SYS}" != "mingw32"; then
+      VLC_ADD_LIBS([aa],[${X_LIBS} ${X_PRE_LIBS} -lX11])
+    fi
   fi
 fi
 
diff --git a/modules/video_output/aa.c b/modules/video_output/aa.c
index 5c44628..7c9fb21 100644
--- a/modules/video_output/aa.c
+++ b/modules/video_output/aa.c
@@ -36,6 +36,13 @@
 #include <assert.h>
 #include <aalib.h>
 
+#ifndef WIN32
+# ifdef X_DISPLAY_MISSING
+#  error Xlib required due to XInitThreads
+# endif
+# include <vlc_xlib.h>
+#endif
+
 /* TODO
  * - what about RGB palette ?
  */
@@ -83,6 +90,11 @@ static int Open(vlc_object_t *object)
     vout_display_t *vd = (vout_display_t *)object;
     vout_display_sys_t *sys;
 
+#ifndef WIN32
+    if (!vlc_xlib_init (object))
+        return VLC_EGENERIC;
+#endif
+
     /* Allocate structure */
     vd->sys = sys = calloc(1, sizeof(*sys));
     if (!sys)



More information about the vlc-commits mailing list