Commit f7dd2bc3 authored by Nicolas Dufresne's avatar Nicolas Dufresne Committed by Rob Clark

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: 's avatarNicolas Dufresne <nicolas@ndufresne.ca>
parent bf80ca5f
......@@ -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:
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment