[vlc-commits] libvlc_media_player: don't use any vout if vout configuration fails
Thomas Guillem
git at videolan.org
Thu Oct 22 11:01:31 CEST 2015
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Oct 15 14:05:38 2015 +0200| [e2c4746368114830ba313a27bb7214eaba9b2138] | committer: Thomas Guillem
libvlc_media_player: don't use any vout if vout configuration fails
And assert (debug only).
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e2c4746368114830ba313a27bb7214eaba9b2138
---
lib/media_player.c | 24 ++++++++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)
diff --git a/lib/media_player.c b/lib/media_player.c
index 9824ede..532d1b3 100644
--- a/lib/media_player.c
+++ b/lib/media_player.c
@@ -1051,7 +1051,11 @@ void libvlc_media_player_set_nsobject( libvlc_media_player_t *p_mi,
var_SetString (p_mi, "window", "");
var_SetAddress (p_mi, "drawable-nsobject", drawable);
#else
- (void) p_mi; (void)drawable;
+ (void)drawable;
+ libvlc_printerr ("can't set nsobject: APPLE build required");
+ assert(false);
+ var_SetString (p_mi, "vout", "none");
+ var_SetString (p_mi, "window", "none");
#endif
}
@@ -1075,7 +1079,11 @@ void * libvlc_media_player_get_nsobject( libvlc_media_player_t *p_mi )
void libvlc_media_player_set_agl( libvlc_media_player_t *p_mi,
uint32_t drawable )
{
- (void) p_mi; (void)drawable;
+ (void)drawable;
+ libvlc_printerr ("can't set agl: use libvlc_media_player_set_nsobject instead");
+ assert(false);
+ var_SetString (p_mi, "vout", "none");
+ var_SetString (p_mi, "window", "none");
}
/**************************************************************************
@@ -1123,7 +1131,11 @@ void libvlc_media_player_set_hwnd( libvlc_media_player_t *p_mi,
(drawable != NULL) ? "embed-hwnd,any" : "");
var_SetInteger (p_mi, "drawable-hwnd", (uintptr_t)drawable);
#else
- (void) p_mi; (void) drawable;
+ (void) drawable;
+ libvlc_printerr ("can't set nsobject: WIN32 build required");
+ assert(false);
+ var_SetString (p_mi, "vout", "none");
+ var_SetString (p_mi, "window", "none");
#endif
}
@@ -1153,7 +1165,11 @@ void libvlc_media_player_set_android_context( libvlc_media_player_t *p_mi,
var_SetAddress (p_mi, "android-jvm", p_jvm);
var_SetAddress (p_mi, "drawable-androidwindow", p_awindow_handler);
#else
- (void) p_mi; (void) p_jvm; (void) p_awindow_handler;
+ (void) p_jvm; (void) p_awindow_handler;
+ libvlc_printerr ("can't set android context: ANDROID build required");
+ assert(false);
+ var_SetString (p_mi, "vout", "none");
+ var_SetString (p_mi, "window", "none");
#endif
}
More information about the vlc-commits
mailing list