summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Santos <thiagoss@osg.samsung.com>2015-01-09 17:19:54 -0300
committerThiago Santos <thiagoss@osg.samsung.com>2015-01-16 15:00:11 -0300
commit5823f8b4082510abb8ff62bb17fa15debc7af2d6 (patch)
treeabb519580b951db130b4f2301df7a9f861a8eeb1
parent0b499484b4555ee2ee3a5204013d7b9e4bbc2105 (diff)
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.
-rw-r--r--gst-libs/gst/adaptivedemux/gstadaptivedemux.c4
-rw-r--r--gst-libs/gst/adaptivedemux/gstadaptivedemux.h3
2 files changed, 7 insertions, 0 deletions
diff --git a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c
index 59dabc52f..56e6a6d2b 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 e226a9222..781d1117f 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;