From 5c46c2f566ad87298493287fe2fc5d97d0e7d39e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grisez?= Date: Fri, 17 Feb 2017 11:30:02 +0100 Subject: [PATCH] Prevent the generic OpenGL displaying filter from being proposed in Linphone's settings --- gtk/main.c | 7 +++++++ gtk/propertybox.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gtk/main.c b/gtk/main.c index d987d60d0..f8d9f553d 100644 --- a/gtk/main.c +++ b/gtk/main.c @@ -258,6 +258,8 @@ static void linphone_gtk_init_liblinphone(const char *config_file, LinphoneCoreVTable vtable={0}; gchar *secrets_file=linphone_gtk_get_config_file(SECRETS_FILE); gchar *user_certificates_dir=linphone_gtk_get_config_file(CERTIFICATES_PATH); + MSFactory *msfactory = NULL; + MSFilterDesc *ogl_filter_desc; vtable.global_state_changed=linphone_gtk_global_state_changed; vtable.call_state_changed=linphone_gtk_call_state_changed; @@ -302,6 +304,11 @@ static void linphone_gtk_init_liblinphone(const char *config_file, if (chat_messages_db_file) linphone_core_set_chat_database_path(the_core,chat_messages_db_file); if (call_logs_db_file) linphone_core_set_call_logs_database_path(the_core, call_logs_db_file); if (friends_db_file) linphone_core_set_friends_database_path(the_core, friends_db_file); + + // Disable the generic OpenGL displaying filter + msfactory = linphone_core_get_ms_factory(the_core); + ogl_filter_desc = ms_factory_lookup_filter_by_id(msfactory, MS_OGL_ID); + if (ogl_filter_desc != NULL) ogl_filter_desc->flags &= ~MS_FILTER_IS_ENABLED; } LinphoneCore *linphone_gtk_get_core(void){ diff --git a/gtk/propertybox.c b/gtk/propertybox.c index 44b4de4f6..71a5cc4bc 100644 --- a/gtk/propertybox.c +++ b/gtk/propertybox.c @@ -1457,7 +1457,7 @@ void linphone_gtk_fill_video_renderers(GtkWidget *pb){ GtkTreeIter iter; /* do not offer the user to select combo 'decoding/rendering' filter */ - if (desc->enc_fmt != NULL) + if (desc->enc_fmt != NULL || (desc->flags & MS_FILTER_IS_ENABLED) == 0) continue; gtk_list_store_append(store,&iter);