GNOME Bugzilla – Bug 732294
mxfdemux: Use IndexTableSegments
Last modified: 2015-12-07 12:37:36 UTC
This patch integrates with the existing code in the following way: For now, when a seek was requested in a position that hadn't been played back or seeked to previously, the whole file was parsed up from the current position to the requested position, and an index was filled. A lot of MXF files contain IndexTableSegments, located at the beginning of each partition. The position of each partition is provided by the random index pack, we now use this information when a seek is requested to directly skip to the relevant partition, the index is then filled and used as it was done previously. One can test the patch with the scenario that I will attach and a (long enough to see the difference) MXF file containing Index Table Segments. The time to make the initial seek is now considerably reduced, from 2 seconds to seek to the end of a 3-minute long MXF file to 0.04 seconds. validating the patch can be done with : gst-validate-1.0 playbin uri=file:///path/to/mxf --set-scenario /path/to/scenario Additionally, standard validate tests were run with the files available http://gstreamer.freedesktop.org/data/media/incoming/mxf/ , and no regressions were spotted. Patch and scenario follow.
Created attachment 279337 [details] [review] Proposed patch to fix the issue
Created attachment 279338 [details] Scenario to validate the patch
This doesn't properly implement the algorithm from S377-1-2009c chapter 11, it's not that simple.