[vlc-commits] caca: add Xlib initialization
Rémi Denis-Courmont
git at videolan.org
Sun May 13 21:53:47 CEST 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun May 13 22:31:02 2012 +0300| [e7a2d63c45b995f2c702e780e673c5cfb34ef642] | committer: Rémi Denis-Courmont
caca: add Xlib initialization
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e7a2d63c45b995f2c702e780e673c5cfb34ef642
---
modules/gui/qt4/input_manager.cpp | 3 +++
modules/notify/growl.m | 2 +-
modules/notify/msn.c | 1 +
modules/notify/notify.c | 1 +
modules/notify/telepathy.c | 1 +
modules/video_output/Modules.am | 3 +++
modules/video_output/caca.c | 16 +++++++++++++---
7 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp
index 5ee9264..c6cd81d 100644
--- a/modules/gui/qt4/input_manager.cpp
+++ b/modules/gui/qt4/input_manager.cpp
@@ -178,7 +178,10 @@ void InputManager::customEvent( QEvent *event )
IMEvent *ple = static_cast<IMEvent *>(event);
if( i_type == ItemChanged_Type )
+ {
+ geteuid();
UpdateMeta( ple->p_item );
+ }
if( !hasInput() )
return;
diff --git a/modules/notify/growl.m b/modules/notify/growl.m
index 7e95f84..3ddc81b 100644
--- a/modules/notify/growl.m
+++ b/modules/notify/growl.m
@@ -192,7 +192,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
p_intf->p_sys->i_item_changes++;
}
-
+#error This will deadlock.
input_thread_t *p_input = playlist_CurrentInput( (playlist_t*)p_this );
if( !p_input ) return VLC_SUCCESS;
diff --git a/modules/notify/msn.c b/modules/notify/msn.c
index e1fa8c3..ee7b46b 100644
--- a/modules/notify/msn.c
+++ b/modules/notify/msn.c
@@ -134,6 +134,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
(void)psz_var; (void)oldval; (void)newval;
intf_thread_t *p_intf = (intf_thread_t *)param;
char psz_tmp[MSN_MAX_LENGTH];
+#error This will deadlock
input_thread_t *p_input = playlist_CurrentInput( (playlist_t *) p_this );
if( !p_input ) return VLC_SUCCESS;
diff --git a/modules/notify/notify.c b/modules/notify/notify.c
index c07015b..9769c3c 100644
--- a/modules/notify/notify.c
+++ b/modules/notify/notify.c
@@ -163,6 +163,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
char *psz_artist;
char *psz_album;
char *psz_arturl;
+#error This will deadlock.
input_thread_t *p_input = playlist_CurrentInput( (playlist_t*)p_this );
intf_thread_t *p_intf = param;
intf_sys_t *p_sys = p_intf->p_sys;
diff --git a/modules/notify/telepathy.c b/modules/notify/telepathy.c
index 7f6ce89..57d6fc3 100644
--- a/modules/notify/telepathy.c
+++ b/modules/notify/telepathy.c
@@ -186,6 +186,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
p_intf->p_sys->i_item_changes++;
}
+#error this fill deadlock
p_input = playlist_CurrentInput( p_playlist );
if( !p_input ) return VLC_SUCCESS;
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..5c9c1cb 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>
@@ -57,7 +63,7 @@ vlc_module_end()
*****************************************************************************/
static picture_pool_t *Pool (vout_display_t *, unsigned);
static void Prepare(vout_display_t *, picture_t *, subpicture_t *);
-static void Display(vout_display_t *, picture_t *, subpicture_t *);
+static void PictureDisplay(vout_display_t *, picture_t *, subpicture_t *);
static int Control(vout_display_t *, int, va_list);
/* */
@@ -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;
@@ -180,7 +190,7 @@ static int Open(vlc_object_t *object)
vd->pool = Pool;
vd->prepare = Prepare;
- vd->display = Display;
+ vd->display = PictureDisplay;
vd->control = Control;
vd->manage = Manage;
@@ -284,7 +294,7 @@ static void Prepare(vout_display_t *vd, picture_t *picture, subpicture_t *subpic
/**
* Display a picture
*/
-static void Display(vout_display_t *vd, picture_t *picture, subpicture_t *subpicture)
+static void PictureDisplay(vout_display_t *vd, picture_t *picture, subpicture_t *subpicture)
{
Refresh(vd);
picture_Release(picture);
More information about the vlc-commits
mailing list