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 702677 - dashdemux: SegmentTemplates at multiple levels not aggregated
dashdemux: SegmentTemplates at multiple levels not aggregated
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
1.x
Other Linux
: Normal normal
: 1.1.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-06-19 18:10 UTC by Greg Rutz
Modified: 2013-07-08 10:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Initial patch to refactor XML attribute parsing code (52.06 KB, patch)
2013-06-21 23:12 UTC, Greg Rutz
committed Details | Review
Implement inheritance for SegmentBase, SegmentList, and SegmentTemplate (22.51 KB, patch)
2013-06-21 23:13 UTC, Greg Rutz
none Details | Review
Implement inheritance for SegmentBase, SegmentList, and SegmentTemplate (22.05 KB, patch)
2013-06-28 19:58 UTC, Greg Rutz
committed Details | Review

Description Greg Rutz 2013-06-19 18:10:28 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.
Comment 1 Greg Rutz 2013-06-21 15:34:00 UTC
I would also mention that I am actively working on the fix for this issue.  Patch is coming...
Comment 2 Greg Rutz 2013-06-21 23:12:34 UTC
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.
Comment 3 Greg Rutz 2013-06-21 23:13:50 UTC
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.
Comment 4 Greg Rutz 2013-06-28 19:58:33 UTC
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 5 Thiago Sousa Santos 2013-07-03 13:26:23 UTC
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 6 Thiago Sousa Santos 2013-07-03 13:26:51 UTC
Comment on attachment 248035 [details] [review]
Implement inheritance for SegmentBase, SegmentList, and SegmentTemplate

Rebased to apply on latest git and committed
Comment 7 Thiago Sousa Santos 2013-07-03 13:29:45 UTC
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