Commit d8064603 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

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

parent ed9c773e
...@@ -36,6 +36,11 @@ static int OpenXID (vlc_object_t *); ...@@ -36,6 +36,11 @@ static int OpenXID (vlc_object_t *);
static int OpenHWND (vlc_object_t *); static int OpenHWND (vlc_object_t *);
static void Close (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 * Module descriptor
*/ */
...@@ -46,6 +51,9 @@ vlc_module_begin () ...@@ -46,6 +51,9 @@ vlc_module_begin ()
set_subcategory (SUBCAT_VIDEO_VOUT) set_subcategory (SUBCAT_VIDEO_VOUT)
set_capability ("xwindow", 70) set_capability ("xwindow", 70)
set_callbacks (OpenXID, Close) set_callbacks (OpenXID, Close)
add_integer ("drawable-xid", 0, NULL, XID_TEXT, XID_LONGTEXT, true)
change_unsaveable ()
/*change_integer_range (0, 0xffffffff)*/
add_submodule () add_submodule ()
set_description (N_("Embedded Windows video")) set_description (N_("Embedded Windows video"))
......
...@@ -986,7 +986,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc, ...@@ -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 * 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-hwnd", VLC_VAR_ADDRESS );
var_Create( p_libvlc, "drawable-agl", VLC_VAR_INTEGER ); var_Create( p_libvlc, "drawable-agl", VLC_VAR_INTEGER );
var_Create( p_libvlc, "drawable-gl", VLC_VAR_INTEGER ); var_Create( p_libvlc, "drawable-gl", VLC_VAR_INTEGER );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment