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

Force the X11 video outputs when libvlc_*_set_xwindow() is used

So LibVLC won't try to use a video output that cannot be embedded.
parent 9671a6d6
......@@ -55,7 +55,7 @@ vlc_module_begin ()
set_capability ("vout display", 50)
set_callbacks (Open, Close)
add_shortcut ("xcb-glx", "glx", "opengl")
add_shortcut ("xcb-glx", "glx", "opengl", "xid")
vlc_module_end ()
struct vout_display_sys_t
......
......@@ -54,7 +54,7 @@ vlc_module_begin ()
set_subcategory (SUBCAT_VIDEO_VOUT)
set_capability ("vout display", 75)
set_callbacks (Open, Close)
add_shortcut ("xcb-x11", "x11")
add_shortcut ("xcb-x11", "x11", "xid")
add_bool ("x11-shm", true, NULL, SHM_TEXT, SHM_LONGTEXT, true)
vlc_module_end ()
......
......@@ -66,7 +66,7 @@ vlc_module_begin ()
ADAPTOR_TEXT, ADAPTOR_LONGTEXT, true)
add_bool ("x11-shm", true, NULL, SHM_TEXT, SHM_LONGTEXT, true)
add_deprecated_alias ("xvideo-shm")
add_shortcut ("xcb-xv", "xv", "xvideo")
add_shortcut ("xcb-xv", "xv", "xvideo", "xid")
vlc_module_end ()
#define MAX_PICTURES (128)
......
......@@ -367,6 +367,7 @@ libvlc_media_player_new( libvlc_instance_t *instance )
var_Create (mp, "rate", VLC_VAR_FLOAT|VLC_VAR_DOINHERIT);
/* Video */
var_Create (mp, "vout", VLC_VAR_STRING|VLC_VAR_DOINHERIT);
var_Create (mp, "window", VLC_VAR_STRING);
var_Create (mp, "drawable-xid", VLC_VAR_INTEGER);
#ifdef WIN32
......@@ -826,6 +827,8 @@ void libvlc_media_player_set_xwindow( libvlc_media_player_t *p_mi,
uint32_t drawable )
{
assert (p_mi != NULL);
var_SetString (p_mi, "vout", drawable ? "xid" : "any");
var_SetString (p_mi, "window", drawable ? "embed-xid,any" : "any");
var_SetInteger (p_mi, "drawable-xid", drawable);
}
......
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