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 757009 - hlsdemux: Fix switching between I-frame and normal playlists when seeking
hlsdemux: Fix switching between I-frame and normal playlists when seeking
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
unspecified
Other All
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-10-23 09:25 UTC by Sebastian Dröge (slomo)
Modified: 2018-11-03 13:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
hlsdemux: Fix switching between I-frame and normal playlists when seeking (1.95 KB, patch)
2015-10-23 09:25 UTC, Sebastian Dröge (slomo)
none Details | Review
hlsdemux: Fix switching between I-frame and normal playlists when seeking (2.02 KB, patch)
2015-10-27 14:15 UTC, Sebastian Dröge (slomo)
none Details | Review
hlsdemux: Fix switching between I-frame and normal playlists when seeking (2.10 KB, patch)
2015-10-27 14:16 UTC, Sebastian Dröge (slomo)
reviewed Details | Review

Description Sebastian Dröge (slomo) 2015-10-23 09:25:08 UTC
See commit message
Comment 1 Sebastian Dröge (slomo) 2015-10-23 09:25:12 UTC
Created attachment 313918 [details] [review]
hlsdemux: Fix switching between I-frame and normal playlists when seeking

The demuxer segment always contains the current SEEK segment at this point, so
we can't use it to check the previous playback rate we used. Instead check if
we selected the I-frame playlist or not to decide if we need to switch.
This was broken during the port to adaptivedemux.

Also switch to I-frame playlists for playback rates > 1.0, not just < -1.0.
Comment 2 Tim-Philipp Müller 2015-10-27 13:16:45 UTC
Anything left to do here?
Comment 3 Sebastian Dröge (slomo) 2015-10-27 13:26:40 UTC
Yes, it breaks things worse on e.g. the Apple streams because there we can do trick modes currently when not using the I frame playlists. But if we actually use the I frame playlists, we will error out then :)


Also I think this should take the seek flags into account and only go to the I frame playlists if the GST_SEEK_FLAG_TRICKMODE_KEY_UNITS flag is set.


Also I would've liked some feedback from Thibault who touched this last, and Thiago :)
Comment 4 Sebastian Dröge (slomo) 2015-10-27 14:15:39 UTC
Created attachment 314226 [details] [review]
hlsdemux: Fix switching between I-frame and normal playlists when seeking

The demuxer segment always contains the current SEEK segment at this point, so
we can't use it to check the previous playback rate we used. Instead check if
we selected the I-frame playlist or not to decide if we need to switch.
This was broken during the port to adaptivedemux.

Also switch to I-frame playlists for playback rates > 1.0, not just < -1.0.
Comment 5 Sebastian Dröge (slomo) 2015-10-27 14:16:43 UTC
Created attachment 314227 [details] [review]
hlsdemux: Fix switching between I-frame and normal playlists when seeking

The demuxer segment always contains the current SEEK segment at this point, so
we can't use it to check the previous playback rate we used. Instead check if
we selected the I-frame playlist or not to decide if we need to switch.
This was broken during the port to adaptivedemux.

Also switch to I-frame playlists for playback rates > 1.0, not just < -1.0,
but only ever switch to I-frame playlists if GST_SEEK_FLAG_TRICKMODE_KEY_UNITS
is set.
Comment 6 Thiago Sousa Santos 2015-10-27 22:40:35 UTC
Review of attachment 314227 [details] [review]:

Any reason why we don't just activate the I-frames list based on the trickmode flag? 

Any use case where we want the decoder/demux to actually drop the non-i-frames buffers? Perhaps because the I-frame lists might not contain audio?

If that is not a concern, the code looks fine.
Comment 7 Sebastian Dröge (slomo) 2015-10-28 08:09:35 UTC
(In reply to Thiago Sousa Santos from comment #6)
> Review of attachment 314227 [details] [review] [review]:
> 
> Any reason why we don't just activate the I-frames list based on the
> trickmode flag? 

You mean GST_SEEK_FLAG_TRICKMODE vs GST_SEEK_FLAG_TRICKMODE_KEY_UNITS? The latter is currently used. I don't know, why? :)

Also the main problem with all this is that I'm not aware of a single stream with I frame playlists that actually has useful TS fragments in there that can be decoded on their own. As such, enabling usage of I frame playlists generally causes a streaming error at this point.

> Any use case where we want the decoder/demux to actually drop the
> non-i-frames buffers? Perhaps because the I-frame lists might not contain
> audio?

I don't know, depends on the stream I'd say? Because of that we should keep it configurable in the seek event, but with which flags?
Comment 8 Sebastian Dröge (slomo) 2015-10-28 09:09:39 UTC
http://docs.unified-streaming.com/documentation/vod/player-urls.html

The a-team trailer there has a valid I-frame playlist that we can handle. We should remember this URL for the future.
Comment 9 GStreamer system administrator 2018-11-03 13:41:46 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/316.