From: Simon Morlat Date: Mon, 23 Jan 2012 09:10:01 +0000 (+0100) Subject: merge patch to enable/disable x11 window at runtime from linphonec X-Git-Url: http://sjero.net/git/?p=linphone;a=commitdiff_plain;h=01babfb6807b784f381da40da443bba42effd0da merge patch to enable/disable x11 window at runtime from linphonec --- diff --git a/console/linphonec.c b/console/linphonec.c index e0321089..7d5c0cdd 100644 --- a/console/linphonec.c +++ b/console/linphonec.c @@ -966,6 +966,8 @@ static void lpc_apply_video_params(){ #ifdef HAVE_X11_XLIB_H if (lpc_video_params.wid==0){ // do not manage window if embedded x11_apply_video_params(&lpc_video_params,wid); + } else { + linphone_core_show_video(linphonec, lpc_video_params.show); } #endif } @@ -1265,6 +1267,7 @@ linphonec_parse_cmdline(int argc, char **argv) if (arg_num < argc) { char *tmp; window_id = strtol( argv[arg_num], &tmp, 0 ); + lpc_video_params.wid = window_id; } } else if (old_arg_num == arg_num) diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 33c16852..7e822699 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -3608,6 +3608,19 @@ void linphone_core_set_native_preview_window_id(LinphoneCore *lc, unsigned long #endif } +/** + * Can be used to disable video showing to free XV port +**/ +void linphone_core_show_video(LinphoneCore *lc, bool_t show){ +#ifdef VIDEO_ENABLED + ms_error("linphone_core_show_video %d", show); + LinphoneCall *call=linphone_core_get_current_call(lc); + if (call!=NULL && call->videostream){ + video_stream_show_video(call->videostream,show); + } +#endif +} + /** * Tells the core to use a separate window for local camera preview video, instead of * inserting local view within the remote video window. diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h index 14c850de..a3cd8d3e 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -952,6 +952,9 @@ void linphone_core_use_preview_window(LinphoneCore *lc, bool_t yesno); int linphone_core_get_device_rotation(LinphoneCore *lc ); void linphone_core_set_device_rotation(LinphoneCore *lc, int rotation); +/* start or stop streaming video in case of embedded window */ +void linphone_core_show_video(LinphoneCore *lc, bool_t show); + /*play/record support: use files instead of soundcard*/ void linphone_core_use_files(LinphoneCore *lc, bool_t yesno); void linphone_core_set_play_file(LinphoneCore *lc, const char *file); diff --git a/mediastreamer2 b/mediastreamer2 index 31e47726..8e3778f1 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 31e477267ec00d07dda1808235e5ae709575d5e5 +Subproject commit 8e3778f1fd61b44124f7303e540b936f9da4560f