GNOME Bugzilla – Bug 752770
dashdemux: index segment url generated from template is not properly used
Last modified: 2018-11-03 13:38:23 UTC
According to the standard: 5.3.9.5.4 Index Segment information "The presence of explicit Index Segment information is indicated ... - by the presence of SegmentTemplate@index attribute. If either $Number$ or $Time$ are present the Template-based Segment URL construction in 5.3.9.4.4 shall be applied with number set to the number of the corresponding Media Segment. If not present, the SegmentTemplate@index attribute constitutes a reference to Representation Index." So, depending on the presence of $Number$ or $Time$ in the template, the resulting url should be interpreted differently: if one of them is present, the url points to a index segment for a media segment and thus should be downloaded every time the corresponding media segment is downloaded. If $Number$ or $Time$ are not present, the generated url points to a RepresentationIndex which contains the IndexSegment for the entire representation, so it should be downloaded only once at the beginning. But the function gst_mpdparser_build_URL_from_template does not indicate to the caller if $Number$ or $Time$ were used, so the caller is unable to differentiate between the 2 situations. Currently the index segment is downloaded by the gst_adaptive_demux_stream_download_header_fragment based on information provided by gst_dash_demux_stream_update_headers_info which calls gst_mpd_client_get_next_header_index. But this function will generate an index segment uri by forcing number and time to 0, which is obvious wrong and will generate a wrong index url.
Created attachment 311449 [details] [review] fix index URI generation based on Time/Number First attempt. This is probably wrong because I have trouble understanding this whole thing. The generation returns a boolean saying whether Time or Number was encountered, and the caller can then decide whether to ignore. The tests now fail at one place: assert_equals_string (fragment.index_uri, "/TestIndex"); This is because the fragment does not have a specific index URI, as this is a global one. Not sure whether the test is right or wrong here... Last, gst_mpd_client_get_next_header still generates URIs with Time/Number at 0. I'm not sure what the difference is between headers and index. I'm inclined to believe "same as Ogg", but I'm not 100% sure :) I'm not seeing a MPD file with an index SegmentTemplate property to test with.
a fix for this was provided for https://bugzilla.gnome.org/show_bug.cgi?id=752714 That patch solves several related bugs, including this one.
-- 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/281.