decodebin: Handle the preroll multi-queue size
authorMyoungsun Lee <ohmygod0327@gmail.com>
Thu, 30 Jul 2015 01:33:25 +0000 (10:33 +0900)
committerSebastian Dröge <sebastian@centricular.com>
Tue, 18 Aug 2015 12:19:02 +0000 (15:19 +0300)
commit5c8ef0ea05123506dfc35c70c8b165bca7435dad
tree2d00f6000b8325ac5322d45ef604c70fe80c2487
parentc21a97242114a617f8958180ed4b4432939c4295
decodebin: Handle the preroll multi-queue size

Overview:
There are some of interleaved streams which has long-term location of audio data.
It mean the audio data is located far away more than multiqueue size.
In this case, because of multiqueue overrun, the pipeline is stopped.
To prevent hanging-like state, the decodebin needs to handle the queue size.

Caused:
The multiqueue size is not enough, the pipeline will stay being stalled status
and decodebin cannot complete to build decode chain.
In this issue file, decodebin did not receive no_more_pads signal or audio data yet.

Steps to Reproduce:
play the high-resolution(4K file) files or some streaming media(push mode).

Actual Results:
There is no audio or subtitle.
We can see only video or infinite loading.

Resolution:
Decodebin detect this problem, and add extra buffer size to multiqueue.
The multiqueue is larger than before, the next data can be pushed the downstream element.

Additional Information:
The max-preroll extra buffer size is set 8MB.
We can use total pre-roll buffer 10MB.
Only first overrun callback can handle multiqueue size.

https://bugzilla.gnome.org/show_bug.cgi?id=733235
gst/playback/gstdecodebin2.c