/pidgin/main: ae26e3eace57: media: add videoscale before video sink
Jakub Adam
jakub.adam at ktknet.cz
Thu Jun 16 12:05:42 EDT 2016
Changeset: ae26e3eace575b00067e84c3c4936e8df5ea00b1
Author: Jakub Adam <jakub.adam at ktknet.cz>
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);
}
More information about the Commits
mailing list