GNOME Bugzilla – Bug 702677
dashdemux: SegmentTemplates at multiple levels not aggregated
Last modified: 2013-07-08 10:50:20 UTC
When multiple SegmentTemplate element appear in the MPD at the Period, AdaptationSet, and Representation levels, they should inherit attributes from the container elements. For example, SegmentTemplate at the Representation level should inherit all attributes defined in a SegmentTemplate at the AdaptationSet level even if not explicitly defined. SegmentTemplate attributes defined at the inner level should override those also defined at the outer levels. I have generated a stream that will cause the issue, but I do not have a server that is available to all. You can download a tarball (500MB https://www.dropbox.com/s/h1silhqzud3y03u/bbb_dash.tar.bz2) of the contents and serve them from your own HTTP server.
I would also mention that I am actively working on the fix for this issue. Patch is coming...
Created attachment 247496 [details] [review] Initial patch to refactor XML attribute parsing code This fix has turned out to be rather large. To make it easier to review, I have split the changes up into 2 separate patches. This first patch contains a refactoring of the XML attribute parsing code to make each function return a boolean value to indicate whether or not the attribute was present. This is necessary to properly implement the "element inheritance" required by the spec.
Created attachment 247497 [details] [review] Implement inheritance for SegmentBase, SegmentList, and SegmentTemplate Second patch (must be applied on top of the first patch) that implements the inheritance functionality.
Created attachment 248035 [details] [review] Implement inheritance for SegmentBase, SegmentList, and SegmentTemplate Found a bug in my previous patch. Fixed. This patch must still be applied after the XML attribute parsing code patch.
Comment on attachment 247496 [details] [review] Initial patch to refactor XML attribute parsing code Had to fix one minor issue that the default value for duration properties wasn't being set to -1 with this patch. But it is now committed.
Comment on attachment 248035 [details] [review] Implement inheritance for SegmentBase, SegmentList, and SegmentTemplate Rebased to apply on latest git and committed
Fixed. commit 5920ee2777088471be82ba1f5b1ac6ec1e509423 Author: Greg Rutz <greg@gsr-tek.com> Date: Fri Jun 21 17:09:30 2013 -0600 dashdemux: Implement inheritance for certain MPD elements According to the MPEG-DASH spec, certain elements (i.e. SegmentBase, SegmentTemplate, and SegmentList) should inherit attributes from the same elements in the containing AdaptationSet or Period. Updated the SegmentBase, SegmentTemplate, and SegmentList parsers to properly inherit attributes from the corresponding elements in AdaptationSet and/or Period. https://bugzilla.gnome.org/show_bug.cgi?id=702677 commit 5e0ed52880ba04edd14a4f3fcba7a9fccfd60978 Author: Greg Rutz <greg@gsr-tek.com> Date: Fri Jun 21 15:51:46 2013 -0600 dashdemux: Properly detect presence of xml attributes Convert all xml attribute/content parsing functions to return a boolean value indicating whether or not the attribute/content was present. We need this finer-grained control in order to properly implement the inheritance policies described in the spec Also fixed several memory leak conditions when handling errors in the xml attribute/content parsing functions. https://bugzilla.gnome.org/show_bug.cgi?id=702677