From ce4d2d8102e98ca08c9ab9a6c511238174cf5a06 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Sat, 19 Aug 2017 11:42:57 -0300 Subject: [PATCH] pipeline: Allow up to 2 seconds queueing in the playsink video queue In playsink the default video queue max size is 3 buffers, which is sometimes not enough for our use case. Allow up to 2 seconds of buffered data, giving us more time to do the transition between clips, and thus avoiding dropping frames in the sink when bringing up new clip takes too much time. Differential Revision: https://phabricator.freedesktop.org/D1854 --- ges/ges-pipeline.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/ges/ges-pipeline.c b/ges/ges-pipeline.c index 65c3616..71c67d7 100644 --- a/ges/ges-pipeline.c +++ b/ges/ges-pipeline.c @@ -573,6 +573,21 @@ ges_pipeline_change_state (GstElement * element, GstStateChange transition) gst_element_set_locked_state (tmp->data, FALSE); } break; + case GST_STATE_CHANGE_PAUSED_TO_PLAYING: + { + GstElement *queue = gst_bin_get_by_name (GST_BIN (self->priv->playsink), + "vqueue"); + + if (queue) { + GST_INFO_OBJECT (self, "Setting playsink video queue max-size-time to" + " 2 seconds."); + g_object_set (G_OBJECT (queue), "max-size-buffers", 0, + "max-size-bytes", 0, "max-size-time", (gint64) 2 * GST_SECOND, + NULL); + gst_object_unref (queue); + } + break; + } default: break; } -- 2.7.4