[vlc-commits] commit: Force the X11 video outputs when libvlc_*_set_xwindow() is used ( Rémi Denis-Courmont )
git at videolan.org
git at videolan.org
Thu Jul 8 19:25:29 CEST 2010
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jul 8 20:24:32 2010 +0300| [4787f2365afd93cbd2fa8fc5790920b5ad10fc40] | committer: 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.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4787f2365afd93cbd2fa8fc5790920b5ad10fc40
---
modules/video_output/xcb/glx.c | 2 +-
modules/video_output/xcb/x11.c | 2 +-
modules/video_output/xcb/xvideo.c | 2 +-
src/control/media_player.c | 3 +++
4 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/modules/video_output/xcb/glx.c b/modules/video_output/xcb/glx.c
index 0e88a94..23c46c0 100644
--- a/modules/video_output/xcb/glx.c
+++ b/modules/video_output/xcb/glx.c
@@ -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
diff --git a/modules/video_output/xcb/x11.c b/modules/video_output/xcb/x11.c
index b643750..ef9ba5e 100644
--- a/modules/video_output/xcb/x11.c
+++ b/modules/video_output/xcb/x11.c
@@ -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 ()
diff --git a/modules/video_output/xcb/xvideo.c b/modules/video_output/xcb/xvideo.c
index 7816bb1..aa83249 100644
--- a/modules/video_output/xcb/xvideo.c
+++ b/modules/video_output/xcb/xvideo.c
@@ -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)
diff --git a/src/control/media_player.c b/src/control/media_player.c
index 964fcea..e02dba0 100644
--- a/src/control/media_player.c
+++ b/src/control/media_player.c
@@ -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);
}
More information about the vlc-commits
mailing list