diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index eac9ce6ab..f0e7254dc 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -5317,11 +5317,6 @@ static void unset_video_window_id(LinphoneCore *lc, bool_t preview, void *id){ #endif } -/** - * @ingroup media_parameters - * Set the native video window id where the video is to be displayed. - * For MacOS, Linux, Windows: if not set or zero the core will create its own window, unless the special id -1 is given. -**/ void linphone_core_set_native_video_window_id(LinphoneCore *lc, void *id){ if ((id == NULL) #ifndef _WIN32 diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h index f6ea130ef..1e9124534 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -3605,6 +3605,23 @@ LINPHONE_PUBLIC float linphone_core_get_static_picture_fps(LinphoneCore *lc); /*function to be used for eventually setting window decorations (icons, title...)*/ LINPHONE_PUBLIC void * linphone_core_get_native_video_window_id(const LinphoneCore *lc); + +/** + * @ingroup media_parameters + * For MacOS, Linux, Windows: core will create its own window + * */ +#define LINPHONE_VIDEO_DISPLAY_AUTO (void*)((unsigned long) 0) +/** + * @ingroup media_parameters + * For MacOS, Linux, Windows: do nothing + * */ + +#define LINPHONE_VIDEO_DISPLAY_NONE (void*)((unsigned long) -1) +/** + * @ingroup media_parameters + * Set the native video window id where the video is to be displayed. + * For MacOS, Linux, Windows: if not set or LINPHONE_VIDEO_DISPLAY_AUTO the core will create its own window, unless the special id LINPHONE_VIDEO_DISPLAY_NONE is given. +**/ LINPHONE_PUBLIC void linphone_core_set_native_video_window_id(LinphoneCore *lc, void *id); LINPHONE_PUBLIC void * linphone_core_get_native_preview_window_id(const LinphoneCore *lc); diff --git a/gtk/main.c b/gtk/main.c index 04e7e337c..8b7c5c994 100644 --- a/gtk/main.c +++ b/gtk/main.c @@ -306,7 +306,7 @@ static void linphone_gtk_init_liblinphone(const char *config_file, g_free(user_certificates_dir); linphone_core_enable_video_capture(the_core, TRUE); linphone_core_enable_video_display(the_core, TRUE); - linphone_core_set_native_video_window_id(the_core,(void *)(unsigned int)-1);/*don't create the window*/ + linphone_core_set_native_video_window_id(the_core,LINPHONE_VIDEO_DISPLAY_NONE);/*don't create the window*/ if (no_video) { _linphone_gtk_enable_video(FALSE); linphone_gtk_set_ui_config_int("videoselfview",0); diff --git a/gtk/videowindow.c b/gtk/videowindow.c index 591fc8655..ebc5f69a5 100644 --- a/gtk/videowindow.c +++ b/gtk/videowindow.c @@ -132,7 +132,7 @@ static gint resize_video_window(LinphoneCall *call){ static void on_video_window_destroy(GtkWidget *w, guint timeout){ g_source_remove(timeout); - linphone_core_set_native_video_window_id(linphone_gtk_get_core(),(void *)(unsigned long)-1); + linphone_core_set_native_video_window_id(linphone_gtk_get_core(),LINPHONE_VIDEO_DISPLAY_NONE); } static void video_window_set_fullscreen(GtkWidget *w, gboolean val){