/pidgin/main: 1e3a33f69fab: media: don't let Farstream use VA-AP...

Jakub Adam <[email protected]>
Newsgroups gmane.comp.gnome.gaim.cvs
Message-ID <[email protected]>
Changeset: 1e3a33f69fabe9fa78da7612b1b75a65f7f908e4
Author:	 Jakub Adam <[email protected]>
Date:	 2016-05-16 14:52 +0200
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/1e3a33f69fab

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.

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
@@ -489,6 +489,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;
@@ -500,6 +502,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

_______________________________________________
Commits mailing list
[email protected]
https://pidgin.im/cgi-bin/mailman/listinfo/commits
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.