[vlc-devel] commit: Make drawable-xid a config item, so VLC can be embedded from the CLI ( Rémi Denis-Courmont )

git version control git at videolan.org
Sat Apr 25 16:02:32 CEST 2009


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Apr 25 16:59:29 2009 +0300| [d80646034afdc03be4c635dd5ce9c9e3bae81361] | committer: Rémi Denis-Courmont 

Make drawable-xid a config item, so VLC can be embedded from the CLI

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

 modules/video_output/drawable.c |    8 ++++++++
 src/libvlc.c                    |    2 +-
 2 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/modules/video_output/drawable.c b/modules/video_output/drawable.c
index 25ef494..b041ada 100644
--- a/modules/video_output/drawable.c
+++ b/modules/video_output/drawable.c
@@ -36,6 +36,11 @@ static int  OpenXID (vlc_object_t *);
 static int  OpenHWND (vlc_object_t *);
 static void Close (vlc_object_t *);
 
+#define XID_TEXT N_("ID of the video output X window")
+#define XID_LONGTEXT N_( \
+    "VLC can embed its video output in an existing X11 window. " \
+    "This is the X identifier of that window (0 means none).")
+
 /*
  * Module descriptor
  */
@@ -46,6 +51,9 @@ vlc_module_begin ()
     set_subcategory (SUBCAT_VIDEO_VOUT)
     set_capability ("xwindow", 70)
     set_callbacks (OpenXID, Close)
+    add_integer ("drawable-xid", 0, NULL, XID_TEXT, XID_LONGTEXT, true)
+        change_unsaveable ()
+        /*change_integer_range (0, 0xffffffff)*/
 
     add_submodule ()
         set_description (N_("Embedded Windows video"))
diff --git a/src/libvlc.c b/src/libvlc.c
index 7b394e7..d40a0a7 100644
--- a/src/libvlc.c
+++ b/src/libvlc.c
@@ -986,7 +986,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
     /*
      * FIXME: kludge to use a p_libvlc-local variable for the Mozilla plugin
      */
-    var_Create( p_libvlc, "drawable-xid", VLC_VAR_INTEGER );
+    var_Create( p_libvlc, "drawable-xid", VLC_VAR_DOINHERIT|VLC_VAR_INTEGER );
     var_Create( p_libvlc, "drawable-hwnd", VLC_VAR_ADDRESS );
     var_Create( p_libvlc, "drawable-agl", VLC_VAR_INTEGER );
     var_Create( p_libvlc, "drawable-gl", VLC_VAR_INTEGER );




More information about the vlc-devel mailing list