[Bug 752721] New: dashdemux: index uri is not set when only the index range is provided

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Wed Jul 22 06:10:22 PDT 2015


https://bugzilla.gnome.org/show_bug.cgi?id=752721

            Bug ID: 752721
           Summary: dashdemux: index uri is not set when only the index
                    range is provided
    Classification: Platform
           Product: GStreamer
           Version: git master
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gst-plugins-bad
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: florin.apostol at oregan.net
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

For the index at SegmentURL attribute, the standard mentions:

"If not present and the @indexRange present, then the @media attribute is
mapped to the @index. If the @media attribute is not present either, then any
BaseURL element is mapped to the @index attribute and the @indexRange attribute
shall be present."

The implementation does not set the index uri in this scenario. The code is at
the end of gst_mpd_client_get_next_fragment function:

  if (indexURL != NULL) {
    frag_url = gst_uri_make_writable (gst_uri_from_string_with_base (base_url,
            indexURL));
    gst_uri_set_query_string (frag_url, stream->queryURL);
    fragment->index_uri = gst_uri_to_string (frag_url);
    gst_uri_unref (frag_url);
    g_free (indexURL);
  } else if (indexURL == NULL && (fragment->index_range_start
          || fragment->index_range_end != -1)) {
    /* index has no specific URL but has a range, we should only use this if
     * the media also has a range, otherwise we are serving some data twice
     * (in the media fragment and again in the index) */
    if (!(fragment->range_start || fragment->range_end != -1)) {
      GST_WARNING ("Ignoring index ranges because there isn't a media range "
          "and URIs would be the same");
      /* removing index information */
      fragment->index_range_start = 0;
      fragment->index_range_end = -1;
    }
  }

The "else if" checks to see if it will retrieve the same data for index and
media segment. But it fails to set the fragment->index_uri in case it wants the
segment index to be downloaded. Because  fragment->index_uri remains null, no
segment index will be downloaded.

On the other hand, in chapter "5.3.9.5.4 Index Segment information" the
standard mentions: 
"The @indexRange attribute may also be used to provide the byte range for an
index within a Media Segment, where this is allowed by the Media Segment
format. In this case the @index attribute shall not be present and the range
specified shall lie completely within any byte range specified for the Media
Segment."

So, in this case the index will be completely inside the media segment. If we
really do not want to download and provide the same data twice (in index and in
media segment) the whole "else if" should be removed and an appropriate comment
describing the situation should be added instead.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list