decodebin: do call set_queue_size in no_more_pads_cb
Consider pipeline: gst-launch-1.0 playbin uri=http://example.com/a.ogg Consider 128kbit audio stream. As soon as uridecodebin detects the bitrate, it configures its input queue2 max-size to 32000 bytes. The 2MB buffer in multiqueue is nearly 2 orders of magnitude bigger. This non-deterministically drives queue2 buffer anywhere from 100% to 0% until multiqueue is filled. This patch sets multiqueue size to 5 buffers early in no_more_pads_cb. Partly reverts commit db771185ed750627a6a1824c42b651d739e1b4a4. https://bugzilla.gnome.org/show_bug.cgi?id=740689
This commit is contained in:
parent
6ab711f3f1
commit
d16df7f70d
@ -2901,6 +2901,13 @@ no_more_pads_cb (GstElement * element, GstDecodeChain * chain)
|
||||
GST_DEBUG_OBJECT (element, "Setting group %p to complete", group);
|
||||
|
||||
group->no_more_pads = TRUE;
|
||||
/* this group has prerolled enough to not need more pads,
|
||||
* we can probably set its buffering state to playing now */
|
||||
GST_DEBUG_OBJECT (group->dbin, "Setting group %p multiqueue to "
|
||||
"'playing' buffering mode", group);
|
||||
decodebin_set_queue_size (group->dbin, group->multiqueue, FALSE,
|
||||
(group->parent ? group->parent->seekable : TRUE),
|
||||
(group->parent ? group->parent->adaptive_demuxer : FALSE));
|
||||
CHAIN_MUTEX_UNLOCK (chain);
|
||||
|
||||
EXPOSE_LOCK (chain->dbin);
|
||||
@ -3316,6 +3323,13 @@ multi_queue_overrun_cb (GstElement * queue, GstDecodeGroup * group)
|
||||
queue);
|
||||
|
||||
group->overrun = TRUE;
|
||||
/* this group has prerolled enough to not need more pads,
|
||||
* we can probably set its buffering state to playing now */
|
||||
GST_DEBUG_OBJECT (group->dbin, "Setting group %p multiqueue to "
|
||||
"'playing' buffering mode", group);
|
||||
decodebin_set_queue_size (group->dbin, group->multiqueue, FALSE,
|
||||
(group->parent ? group->parent->seekable : TRUE),
|
||||
(group->parent ? group->parent->adaptive_demuxer : FALSE));
|
||||
|
||||
/* FIXME: We should make sure that everything gets exposed now
|
||||
* even if child chains are not complete because the will never
|
||||
|
Loading…
x
Reference in New Issue
Block a user