/pidgin/main: 1645cfba41c8: media: don't let Farstream use VA-AP...

Jakub Adam jakub.adam at ktknet.cz
Sat Jun 18 22:10:08 EDT 2016


Changeset: 1645cfba41c83e209194b53ea8b4a46c1dd4ba8a
Author:	 Jakub Adam <jakub.adam at ktknet.cz>
Date:	 2016-05-16 14:52 +0200
Branch:	 release-2.x.y
URL: https://hg.pidgin.im/pidgin/main/rev/1645cfba41c8

Description:

media: don't let Farstream use VA-API elements

Video Acceleration API isn't well supported in Farstream and produces
errors during video calls, however a high Rank of vaapi GStreamer
elements causes them to be picked as preferred video encoders and
decoders when available in the system.

For now, set the rank of all elements from vaapi plugin to NONE, so that
they are ignored.

Backport of Pidgin 3 commit 1e3a33f69fab.

diffstat:

 libpurple/media/backend-fs2.c |  11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diffs (28 lines):

diff --git a/libpurple/media/backend-fs2.c b/libpurple/media/backend-fs2.c
--- a/libpurple/media/backend-fs2.c
+++ b/libpurple/media/backend-fs2.c
@@ -533,6 +533,8 @@ static void
 purple_media_backend_fs2_class_init(PurpleMediaBackendFs2Class *klass)
 {
 	GObjectClass *gobject_class = (GObjectClass*)klass;
+	GList *features;
+	GList *it;
 
 	gobject_class->dispose = purple_media_backend_fs2_dispose;
 	gobject_class->finalize = purple_media_backend_fs2_finalize;
@@ -544,6 +546,15 @@ purple_media_backend_fs2_class_init(Purp
 	g_object_class_override_property(gobject_class, PROP_MEDIA, "media");
 
 	g_type_class_add_private(klass, sizeof(PurpleMediaBackendFs2Private));
+
+	/* VA-API elements aren't well supported in Farstream. Ignore them. */
+	features = gst_registry_get_feature_list_by_plugin(gst_registry_get(),
+			"vaapi");
+	for (it = features; it; it = it->next) {
+		gst_plugin_feature_set_rank((GstPluginFeature *)it->data,
+				GST_RANK_NONE);
+	}
+	gst_plugin_feature_list_free(features);
 }
 
 static void



More information about the Commits mailing list