GNOME Bugzilla – Bug 689083
[hlsdemux] hlsdemux downloads new segment only when queue is empty
Last modified: 2012-12-10 05:30:24 UTC
1. hlsdemux update thread(gst_hls_demux_update_thread) downloads new segment only when the queue is empty, if (g_queue_is_empty (demux->queue)) { what is the point of queue then, it is being used only for initial caching of segments am I missing something ? i think the condition should be this ? if(g_queue_get_length(demux->queue) < demux->fragments_cache) {
What version of the code are you looking at? Do you still see this behaviour with GStreamer 1.0.x and/or in git master ?
i have tested it on 0.10.21 not on latest version,1.0.x but the latest version has same code so should behave in similar way version: 1.0.2 file gsthlsdemux.c function:gst_hls_demux_updates_loop line: 907
Hlsdemux is a very complex element that simply will not work if it's not used inside of playbin2 because it will use the decode-chain+decode-group system of decodebin2 and its handling by playbin2 in order to properly play the segments at varying bandwidths (I can go in further details as to why, if you require it). Inside playbin2, hlsdemux will be followed by a queue2 element which will automatically dump all of the fragments (from the internal queue) into it, this means that the demux->queue will always be empty after the initial caching of fragments. That check to ensure the queue is empty is simply to avoid cases where the pipeline is blocked for some reason (a pad block maybe, or something else) and the queue2 element gets full. We wouldn't want to keep downloading fragments if they are not being played. Please try using playbin2 and see if it solves all your issues.