Commit 01babfb6 authored by Simon Morlat's avatar Simon Morlat
Browse files

merge patch to enable/disable x11 window at runtime from linphonec

parent cb07aa08
...@@ -966,6 +966,8 @@ static void lpc_apply_video_params(){ ...@@ -966,6 +966,8 @@ static void lpc_apply_video_params(){
#ifdef HAVE_X11_XLIB_H #ifdef HAVE_X11_XLIB_H
if (lpc_video_params.wid==0){ // do not manage window if embedded if (lpc_video_params.wid==0){ // do not manage window if embedded
x11_apply_video_params(&lpc_video_params,wid); x11_apply_video_params(&lpc_video_params,wid);
} else {
linphone_core_show_video(linphonec, lpc_video_params.show);
} }
#endif #endif
} }
...@@ -1265,6 +1267,7 @@ linphonec_parse_cmdline(int argc, char **argv) ...@@ -1265,6 +1267,7 @@ linphonec_parse_cmdline(int argc, char **argv)
if (arg_num < argc) { if (arg_num < argc) {
char *tmp; char *tmp;
window_id = strtol( argv[arg_num], &tmp, 0 ); window_id = strtol( argv[arg_num], &tmp, 0 );
lpc_video_params.wid = window_id;
} }
} }
else if (old_arg_num == arg_num) else if (old_arg_num == arg_num)
......
...@@ -3608,6 +3608,19 @@ void linphone_core_set_native_preview_window_id(LinphoneCore *lc, unsigned long ...@@ -3608,6 +3608,19 @@ void linphone_core_set_native_preview_window_id(LinphoneCore *lc, unsigned long
#endif #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 * Tells the core to use a separate window for local camera preview video, instead of
* inserting local view within the remote video window. * inserting local view within the remote video window.
......
...@@ -952,6 +952,9 @@ void linphone_core_use_preview_window(LinphoneCore *lc, bool_t yesno); ...@@ -952,6 +952,9 @@ void linphone_core_use_preview_window(LinphoneCore *lc, bool_t yesno);
int linphone_core_get_device_rotation(LinphoneCore *lc ); int linphone_core_get_device_rotation(LinphoneCore *lc );
void linphone_core_set_device_rotation(LinphoneCore *lc, int rotation); 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*/ /*play/record support: use files instead of soundcard*/
void linphone_core_use_files(LinphoneCore *lc, bool_t yesno); void linphone_core_use_files(LinphoneCore *lc, bool_t yesno);
void linphone_core_set_play_file(LinphoneCore *lc, const char *file); void linphone_core_set_play_file(LinphoneCore *lc, const char *file);
......
mediastreamer2 @ 8e3778f1
Subproject commit 31e477267ec00d07dda1808235e5ae709575d5e5 Subproject commit 8e3778f1fd61b44124f7303e540b936f9da4560f
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