After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 689083 - [hlsdemux] hlsdemux downloads new segment only when queue is empty
[hlsdemux] hlsdemux downloads new segment only when queue is empty
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
unspecified
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-11-26 13:23 UTC by shr
Modified: 2012-12-10 05:30 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description shr 2012-11-26 13:23:46 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) {
Comment 1 Tim-Philipp Müller 2012-11-27 19:45:55 UTC
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 ?
Comment 2 shr 2012-12-04 09:44:19 UTC
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
Comment 3 Youness Alaoui 2012-12-04 17:19:01 UTC
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.