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 759158 - dashdemux/mssdemux: add support for snapping seek flags
dashdemux/mssdemux: add support for snapping seek flags
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal enhancement
: 1.7.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-12-08 07:59 UTC by Sebastian Dröge (slomo)
Modified: 2016-02-04 17:48 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sebastian Dröge (slomo) 2015-12-08 07:59:34 UTC
+++ This bug was initially created as a clone of Bug #759108 +++

Seeking to a position which not near a segment boundary can result in the seek taking quite a while to complete. There are a couple of scenarios;
- The bitrate of the connection not much more than the bitrate of the variant; in this case, we have to wait for the data between segment start and seek position to download before our initial frame can be decoded. This can take a couple of seconds.
- The stream is high bitrate and/or encrypted, and we're running on a slow embedded processor. So, even tho data before the start position is not decoded, it still takes significant time to process it. Again, this can increase the time taken to seek by the order of seconds.

This problem can be avoided by using the seek snap flags to seek to a segment boundary only.
Comment 1 Thiago Sousa Santos 2015-12-22 12:37:07 UTC
Hi Duncan,

do you think you'd have time to implement this before the 1.8 feature freeze? It would be nice to have all 3 adaptive demuxers shipped with the same new feature. Let us know if you can't make it (freeze is in January IIRC) and then someone else could do it.
Comment 2 Duncan Palmer 2015-12-22 14:13:00 UTC
Hi Thiago,

I doubt I'll be able to get it done in that timeframe. Certainly not for both dash and mss demuxers. So if someone else would like to pick this up, please do.
Comment 3 Thiago Sousa Santos 2016-02-04 17:48:09 UTC
commit ac2734f5cbfea2b6159781374af94af56ee38087
Author: Thiago Santos <thiagoss@osg.samsung.com>
Date:   Tue Feb 2 16:54:10 2016 -0300

    mssdemux: implement snap seeking
    
    Implement snap seek flags handling in stream_seek to allow the
    parent class to handle it for us
    
    https://bugzilla.gnome.org/show_bug.cgi?id=759158


commit 2bf87ad84cd0158f766bbac5ce240c51852d567f
Author: Thiago Santos <thiagoss@osg.samsung.com>
Date:   Wed Jan 27 10:48:53 2016 -0300

    tests: dashdemux: add tests for snap flags seeking
    
    Similar to HLS but DASH has the extra issue that it can have
    multiple streams so snapping can be tricky as streams usually
    won't be aligned.
    
    For now, those tests handle the case of only having a single
    stream.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=759158

commit 40faf9e09b4180b77858a873d51e977da8dc9360
Author: Thiago Santos <thiagoss@osg.samsung.com>
Date:   Mon Feb 1 10:49:23 2016 -0300

    dashdemux: implement snap seek handling
    
    Handle snap seeking at the stream_seek method and let superclass
    do the rest to support snap seeking
    
    https://bugzilla.gnome.org/show_bug.cgi?id=759158

commit 731ab94cc3ffc7dd906423a008ceca94962ab992
Author: Thiago Santos <thiagoss@osg.samsung.com>
Date:   Wed Jan 27 13:31:10 2016 -0300

    adaptivedemux: handle snap seeks
    
    Adaptive demuxers need to start downloading from specific positions
    (fragments) for every stream, this means that all streams can snap-seek
    to a different position when requested. Snap seeking in this case will
    be done in 2 steps:
    
    1) do the snap seeking on the pad that received the seek event and
       get the final position
    
    2) use this position to do a regular seek on the other streams to
       make sure they all start from the same position
    
    More arguments were added to the stream_seek function, allowing better control
    of how seeking is done. Knowing the flags and the playback direction allows
    subclasses to handle snap-seeking.
    And also adds a new return parameter to inform of the final
    selected seeking position that is used to align the other streams.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=759158