]> sjero.net Git - linphone/commitdiff
merge patch to enable/disable x11 window at runtime from linphonec
authorSimon Morlat <simon.morlat@linphone.org>
Mon, 23 Jan 2012 09:10:01 +0000 (10:10 +0100)
committerSimon Morlat <simon.morlat@linphone.org>
Mon, 23 Jan 2012 09:10:01 +0000 (10:10 +0100)
console/linphonec.c
coreapi/linphonecore.c
coreapi/linphonecore.h
mediastreamer2

index e0321089b4dd9abadb1aa422fa85987c7c20af13..7d5c0cdd2da291a94dcd816095d2e9202b045775 100644 (file)
@@ -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)
index 33c168522498166fd64680f07eb1235cac48ac3a..7e822699f3a4e11b318296a4a90afd5c62906acf 100644 (file)
@@ -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.
index 14c850de836952363e74a5de24a180a2330f8d23..a3cd8d3e0c1470b003e997299800e19b17995f08 100644 (file)
@@ -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);
index 31e477267ec00d07dda1808235e5ae709575d5e5..8e3778f1fd61b44124f7303e540b936f9da4560f 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 31e477267ec00d07dda1808235e5ae709575d5e5
+Subproject commit 8e3778f1fd61b44124f7303e540b936f9da4560f