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>
Nicolas Dufresne authored 7 years ago
Rob Clark committed 7 years ago
256 | 256 | g_object_set(G_OBJECT(src), "location", filename, NULL); |
257 | 257 | gst_object_unref(src); |
258 | 258 | |
259 | /* Configure the sink like a video sink (mimic GstVideoSink) */ | |
260 | gst_base_sink_set_max_lateness(GST_BASE_SINK(dec->sink), 20 * GST_MSECOND); | |
261 | gst_base_sink_set_qos_enabled(GST_BASE_SINK(dec->sink), TRUE); | |
262 | ||
259 | 263 | /* if we don't limit max-buffers then we can let the decoder outrun |
260 | 264 | * vsync and quickly chew up 100's of MB of buffers: |
261 | 265 | */ |