adaptivedemux: inform subclass when headers/index are being downloaded

This allows the subclasses to know if the chunks that are downloaded are
part of the header or of the index and will parse the parts that are
of their interest.
This commit is contained in:
Thiago Santos 2015-01-09 17:19:54 -03:00
parent 0b499484b4
commit 5823f8b408
2 changed files with 7 additions and 0 deletions

View file

@ -1654,9 +1654,11 @@ gst_adaptive_demux_stream_download_header_fragment (GstAdaptiveDemuxStream *
G_GINT64_FORMAT, stream->fragment.header_uri,
stream->fragment.header_range_start, stream->fragment.header_range_end);
stream->downloading_header = TRUE;
ret = gst_adaptive_demux_stream_download_uri (demux, stream,
stream->fragment.header_uri, stream->fragment.header_range_start,
stream->fragment.header_range_end);
stream->downloading_header = FALSE;
}
/* check if we have an index */
@ -1667,9 +1669,11 @@ gst_adaptive_demux_stream_download_header_fragment (GstAdaptiveDemuxStream *
"Fetching index %s %" G_GINT64_FORMAT "-%" G_GINT64_FORMAT,
stream->fragment.index_uri,
stream->fragment.index_range_start, stream->fragment.index_range_end);
stream->downloading_index = TRUE;
ret = gst_adaptive_demux_stream_download_uri (demux, stream,
stream->fragment.index_uri, stream->fragment.index_range_start,
stream->fragment.index_range_end);
stream->downloading_index = FALSE;
}
}

View file

@ -125,6 +125,9 @@ struct _GstAdaptiveDemuxStream
gboolean restart_download;
gboolean discont;
gboolean downloading_header;
gboolean downloading_index;
/* download tooling */
GstElement *src;
GstPad *src_srcpad;