/pidgin/main: ae26e3eace57: media: add videoscale before video sink

Jakub Adam <[email protected]>
Newsgroups gmane.comp.gnome.gaim.cvs
Message-ID <[email protected]>
Changeset: ae26e3eace575b00067e84c3c4936e8df5ea00b1
Author:	 Jakub Adam <[email protected]>
Date:	 2016-04-21 09:40 +0200
Branch:	 release-2.x.y
URL: https://hg.pidgin.im/pidgin/main/rev/ae26e3eace57

Description:

media: add videoscale before video sink

Fixes issue with ximagesink displaying only a corner cut-out of larger
webcam video.

In addition, a patch for ximagesink is needed, ETA GStreamer 1.9.0:

https://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=59d7f9c62ee95dfbb5b450476f73a717e03b7b8c

Backport of Pidgin 3 commit dfadb1bef243.

diffstat:

 libpurple/mediamanager.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (42 lines):

diff --git a/libpurple/mediamanager.c b/libpurple/mediamanager.c
--- a/libpurple/mediamanager.c
+++ b/libpurple/mediamanager.c
@@ -1449,7 +1449,7 @@ purple_media_manager_create_output_windo
 				(participant == ow->participant)) &&
 				!strcmp(session_id, ow->session_id)) {
 			GstBus *bus;
-			GstElement *queue, *convert;
+			GstElement *queue, *convert, *scale;
 			GstElement *tee = purple_media_get_tee(media,
 					session_id, participant);
 
@@ -1462,6 +1462,7 @@ purple_media_manager_create_output_windo
 #else
 			convert = gst_element_factory_make("ffmpegcolorspace", NULL);
 #endif
+			scale = gst_element_factory_make("videoscale", NULL);
 			ow->sink = purple_media_manager_get_element(
 					manager, PURPLE_MEDIA_RECV_VIDEO,
 					ow->media, ow->session_id,
@@ -1482,7 +1483,7 @@ purple_media_manager_create_output_windo
 			}
 
 			gst_bin_add_many(GST_BIN(GST_ELEMENT_PARENT(tee)),
-					queue, convert, ow->sink, NULL);
+					queue, convert, scale, ow->sink, NULL);
 
 			bus = gst_pipeline_get_bus(GST_PIPELINE(
 					manager->priv->pipeline));
@@ -1491,9 +1492,11 @@ purple_media_manager_create_output_windo
 			gst_object_unref(bus);
 
 			gst_element_set_state(ow->sink, GST_STATE_PLAYING);
+			gst_element_set_state(scale, GST_STATE_PLAYING);
 			gst_element_set_state(convert, GST_STATE_PLAYING);
 			gst_element_set_state(queue, GST_STATE_PLAYING);
-			gst_element_link(convert, ow->sink);
+			gst_element_link(scale, ow->sink);
+			gst_element_link(convert, scale);
 			gst_element_link(queue, convert);
 			gst_element_link(tee, queue);
 		}

_______________________________________________
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.