summaryrefslogtreecommitdiff
path: root/ext/hls/gsthlsdemux.c
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2016-12-19 11:40:28 +0200
committerSebastian Dröge <sebastian@centricular.com>2016-12-19 11:51:36 +0200
commitee647ca4be8b5beecada6ebc130df5d376a1ad23 (patch)
treea46b0df71bf449e167ac273b4cd982649a2bc54c /ext/hls/gsthlsdemux.c
parentb5791efcc0290780f7bbedc80bde007b28dc3219 (diff)
downloadgstreamer-plugins-bad-ee647ca4be8b5beecada6ebc130df5d376a1ad23.tar.gz
hlsdemux: Extract ID3 tags, strip them from the output and provide them as tags
They often don't only contain the PCR information but also other metadata, like title. Give this information to the pipeline. Also strip the tags from the stream as we a) already parsed them now and b) decoders don't like these tags to happen in the middle of the stream (i.e. the start of each fragment) and tagdemux only can strip them off the beginning and end.
Diffstat (limited to 'ext/hls/gsthlsdemux.c')
-rw-r--r--ext/hls/gsthlsdemux.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/ext/hls/gsthlsdemux.c b/ext/hls/gsthlsdemux.c
index 9247d45c3..3e82d58e9 100644
--- a/ext/hls/gsthlsdemux.c
+++ b/ext/hls/gsthlsdemux.c
@@ -767,6 +767,7 @@ gst_hls_demux_handle_buffer (GstAdaptiveDemux * demux,
GstHLSDemux *hlsdemux = GST_HLS_DEMUX_CAST (demux);
GstMapInfo info;
GstClockTime first_pcr, last_pcr;
+ GstTagList *tags;
if (buffer == NULL)
return GST_FLOW_OK;
@@ -832,14 +833,18 @@ gst_hls_demux_handle_buffer (GstAdaptiveDemux * demux,
hls_stream->pending_pcr_buffer = NULL;
}
- if (!gst_hlsdemux_tsreader_find_pcrs (&hls_stream->tsreader, buffer,
- &first_pcr, &last_pcr)
+ if (!gst_hlsdemux_tsreader_find_pcrs (&hls_stream->tsreader, &buffer,
+ &first_pcr, &last_pcr, &tags)
&& !at_eos) {
// Store this buffer for later
hls_stream->pending_pcr_buffer = buffer;
return GST_FLOW_OK;
}
+ if (tags) {
+ gst_adaptive_demux_stream_set_tags (stream, tags);
+ }
+
if (buffer) {
buffer = gst_buffer_make_writable (buffer);
GST_BUFFER_OFFSET (buffer) = hls_stream->current_offset;