From 5823f8b4082510abb8ff62bb17fa15debc7af2d6 Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Fri, 9 Jan 2015 17:19:54 -0300 Subject: [PATCH] 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. --- gst-libs/gst/adaptivedemux/gstadaptivedemux.c | 4 ++++ gst-libs/gst/adaptivedemux/gstadaptivedemux.h | 3 +++ 2 files changed, 7 insertions(+) diff --git a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c index 59dabc52fe..56e6a6d2b0 100644 --- a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c +++ b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c @@ -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; } } diff --git a/gst-libs/gst/adaptivedemux/gstadaptivedemux.h b/gst-libs/gst/adaptivedemux/gstadaptivedemux.h index e226a92227..781d1117f5 100644 --- a/gst-libs/gst/adaptivedemux/gstadaptivedemux.h +++ b/gst-libs/gst/adaptivedemux/gstadaptivedemux.h @@ -125,6 +125,9 @@ struct _GstAdaptiveDemuxStream gboolean restart_download; gboolean discont; + gboolean downloading_header; + gboolean downloading_index; + /* download tooling */ GstElement *src; GstPad *src_srcpad;