mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-06 23:48:53 +00:00
hlsdemux: Only select video and audio streams by default
Ignore subtitle streams for now, because the different fragment duration causes problems switching bitrates w/ decodebin2 group draining.
This commit is contained in:
parent
216195b7b2
commit
e91bddbcfd
1 changed files with 12 additions and 3 deletions
|
@ -429,12 +429,19 @@ gst_hls_demux_update_manifest (GstAdaptiveDemux * demux)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
create_stream_for_playlist (GstAdaptiveDemux * demux, GstM3U8 * playlist)
|
create_stream_for_playlist (GstAdaptiveDemux * demux, GstM3U8 * playlist,
|
||||||
|
gboolean selected)
|
||||||
{
|
{
|
||||||
GstHLSDemux *hlsdemux = GST_HLS_DEMUX_CAST (demux);
|
GstHLSDemux *hlsdemux = GST_HLS_DEMUX_CAST (demux);
|
||||||
GstHLSDemuxStream *hlsdemux_stream;
|
GstHLSDemuxStream *hlsdemux_stream;
|
||||||
GstAdaptiveDemuxStream *stream;
|
GstAdaptiveDemuxStream *stream;
|
||||||
|
|
||||||
|
if (!selected) {
|
||||||
|
/* FIXME: Later, create the stream but mark not-selected */
|
||||||
|
GST_LOG_OBJECT (demux, "Ignoring not-selected stream");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
stream = gst_adaptive_demux_stream_new (demux,
|
stream = gst_adaptive_demux_stream_new (demux,
|
||||||
gst_hls_demux_create_pad (hlsdemux));
|
gst_hls_demux_create_pad (hlsdemux));
|
||||||
|
|
||||||
|
@ -460,7 +467,7 @@ gst_hls_demux_setup_streams (GstAdaptiveDemux * demux)
|
||||||
gst_hls_demux_clear_all_pending_data (hlsdemux);
|
gst_hls_demux_clear_all_pending_data (hlsdemux);
|
||||||
|
|
||||||
/* 1 output for the main playlist */
|
/* 1 output for the main playlist */
|
||||||
create_stream_for_playlist (demux, playlist->m3u8);
|
create_stream_for_playlist (demux, playlist->m3u8, TRUE);
|
||||||
|
|
||||||
for (i = 0; i < GST_HLS_N_MEDIA_TYPES; ++i) {
|
for (i = 0; i < GST_HLS_N_MEDIA_TYPES; ++i) {
|
||||||
GList *mlist = playlist->media[i];
|
GList *mlist = playlist->media[i];
|
||||||
|
@ -477,7 +484,9 @@ gst_hls_demux_setup_streams (GstAdaptiveDemux * demux)
|
||||||
}
|
}
|
||||||
GST_LOG_OBJECT (demux, "media of type %d - %s, uri: %s", i,
|
GST_LOG_OBJECT (demux, "media of type %d - %s, uri: %s", i,
|
||||||
media->name, media->uri);
|
media->name, media->uri);
|
||||||
create_stream_for_playlist (demux, media->playlist);
|
create_stream_for_playlist (demux, media->playlist,
|
||||||
|
(media->mtype == GST_HLS_MEDIA_TYPE_VIDEO ||
|
||||||
|
media->mtype == GST_HLS_MEDIA_TYPE_AUDIO));
|
||||||
|
|
||||||
mlist = mlist->next;
|
mlist = mlist->next;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue