Commit 213a7e39 authored by Simon Morlat's avatar Simon Morlat
Browse files

use 2 video windows, work in progress

parent 81277afe
......@@ -824,7 +824,12 @@ static void _linphone_call_start_media_streams(LinphoneCall *call, bool_t send_e
if (lc->video_window_id!=0)
if (lc->preview_window_id!=0)
video_stream_set_native_preview_window_id (call->videostream,lc->preview_window_id);
video_stream_use_preview_video_window (call->videostream,lc->use_preview_window);
if (stream->dir==SalStreamSendOnly && lc->video_conf.capture ){
......@@ -3269,7 +3269,49 @@ unsigned long linphone_core_get_native_video_window_id(const LinphoneCore *lc){
if (lc->previewstream)
return video_stream_get_native_window_id(lc->previewstream);
return 0;
return lc->video_window_id;
* Set the native video window id where the video is to be displayed.
* If not set the core will create its own window.
void linphone_core_set_native_video_window_id(LinphoneCore *lc, unsigned long id){
* Returns the native window handle of the video preview window, casted as an unsigned long.
* @ingroup media_parameters
unsigned long linphone_core_get_native_preview_window_id(const LinphoneCore *lc){
LinphoneCall *call=linphone_core_get_current_call (lc);
if (call && call->videostream)
return video_stream_get_native_preview_window_id(call->videostream);
if (lc->previewstream)
return video_stream_get_native_preview_window_id(lc->previewstream);
return lc->preview_window_id;
* Set the native window id where the preview video (local camera) is to be displayed.
* This has to be used in conjonction with linphone_core_use_preview_window().
* If not set the core will create its own window.
void linphone_core_set_native_preview_window_id(LinphoneCore *lc, unsigned long id){
* Tells the core to use a separate window for local camera preview video, instead of
* inserting local view within the remote video window.
void linphone_core_use_preview_window(LinphoneCore *lc, bool_t yesno){
static MSVideoSizeDef supported_resolutions[]={
......@@ -964,7 +964,12 @@ float linphone_core_get_static_picture_fps(LinphoneCore *lc);
/*function to be used for eventually setting window decorations (icons, title...)*/
unsigned long linphone_core_get_native_video_window_id(const LinphoneCore *lc);
void linphone_core_set_native_video_window_id(LinphoneCore *lc, unsigned long id);
unsigned long linphone_core_get_native_preview_window_id(const LinphoneCore *lc);
void linphone_core_set_native_preview_window_id(LinphoneCore *lc, unsigned long id);
void linphone_core_use_preview_window(LinphoneCore *lc, bool_t yesno);
/*play/record support: use files instead of soundcard*/
void linphone_core_use_files(LinphoneCore *lc, bool_t yesno);
......@@ -408,6 +408,8 @@ struct _LinphoneCore
int audio_bw;
LinphoneWaitingCallback wait_cb;
void *wait_ctx;
unsigned long video_window_id;
unsigned long preview_window_id;
bool_t use_files;
bool_t apply_nat_settings;
bool_t ready;
......@@ -415,6 +417,7 @@ struct _LinphoneCore
bool_t preview_finished;
bool_t auto_net_state_mon;
bool_t network_reachable;
bool_t use_preview_window;
bool_t linphone_core_can_we_add_call(LinphoneCore *lc);
mediastreamer2 @ 8868e7ce
Subproject commit 20da8f413994f0959ab81b391894defa70eaa1f6
Subproject commit 8868e7ce004ba99afd20ff21cd0c7ef25ffbef06
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