diff options
author | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2017-04-26 20:56:21 +0200 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2017-04-29 10:23:41 -0400 |
commit | f7dd2bc30da5ab0448ef716bc238d67a9d1a7304 (patch) | |
tree | 75c2e52e7b9497d9a1a541196f2fedcfca0334b6 /gst-decoder.c | |
parent | bf80ca5ffb7fee1df0d42c80b9d74e691eb64cde (diff) | |
download | kmscube-f7dd2bc30da5ab0448ef716bc238d67a9d1a7304.tar.gz |
gst-decoder.c: Improve synchronicity of video output
This is done by setting a max-lateness and enable QoS messaging. This
will have the effect that buffer arriving late to the appsink won't will
be dropped instead of being queued. This is similar to what GstVideoSink
base class would do.
Signed-off-by: Nicolas Dufresne <nicolas@ndufresne.ca>
Diffstat (limited to 'gst-decoder.c')
-rw-r--r-- | gst-decoder.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gst-decoder.c b/gst-decoder.c index 768aa1b..17d5407 100644 --- a/gst-decoder.c +++ b/gst-decoder.c @@ -257,6 +257,10 @@ video_init(const struct egl *egl, const struct gbm *gbm, const char *filename) g_object_set(G_OBJECT(src), "location", filename, NULL); gst_object_unref(src); + /* Configure the sink like a video sink (mimic GstVideoSink) */ + gst_base_sink_set_max_lateness(GST_BASE_SINK(dec->sink), 20 * GST_MSECOND); + gst_base_sink_set_qos_enabled(GST_BASE_SINK(dec->sink), TRUE); + /* if we don't limit max-buffers then we can let the decoder outrun * vsync and quickly chew up 100's of MB of buffers: */ |