mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-03 04:52:28 +00:00
dashdemux: also check for subfragments on has_next_fragment
In dash isombff profile the fragment is split into subframents where bitrate switching is possible. Also take that into consideration when checking if a stream has next fragments.
This commit is contained in:
parent
25f0787c1c
commit
cc599bb5b5
1 changed files with 23 additions and 0 deletions
|
@ -1024,6 +1024,24 @@ gst_dash_demux_stream_seek (GstAdaptiveDemuxStream * stream, GstClockTime ts)
|
||||||
return GST_FLOW_OK;
|
return GST_FLOW_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
gst_dash_demux_stream_has_next_subfragment (GstAdaptiveDemuxStream * stream)
|
||||||
|
{
|
||||||
|
GstDashDemuxStream *dashstream = (GstDashDemuxStream *) stream;
|
||||||
|
GstSidxBox *sidx = SIDX (dashstream);
|
||||||
|
|
||||||
|
if (dashstream->sidx_parser.status == GST_ISOFF_SIDX_PARSER_FINISHED) {
|
||||||
|
if (stream->demux->segment.rate > 0.0) {
|
||||||
|
if (sidx->entry_index + 1 < sidx->entries_count)
|
||||||
|
return TRUE;
|
||||||
|
} else {
|
||||||
|
if (sidx->entry_index >= 1)
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_dash_demux_stream_advance_subfragment (GstAdaptiveDemuxStream * stream)
|
gst_dash_demux_stream_advance_subfragment (GstAdaptiveDemuxStream * stream)
|
||||||
{
|
{
|
||||||
|
@ -1062,6 +1080,11 @@ gst_dash_demux_stream_has_next_fragment (GstAdaptiveDemuxStream * stream)
|
||||||
GstDashDemux *dashdemux = GST_DASH_DEMUX_CAST (stream->demux);
|
GstDashDemux *dashdemux = GST_DASH_DEMUX_CAST (stream->demux);
|
||||||
GstDashDemuxStream *dashstream = (GstDashDemuxStream *) stream;
|
GstDashDemuxStream *dashstream = (GstDashDemuxStream *) stream;
|
||||||
|
|
||||||
|
if (gst_mpd_client_has_isoff_ondemand_profile (dashdemux->client)) {
|
||||||
|
if (gst_dash_demux_stream_has_next_subfragment (stream))
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
return gst_mpd_client_has_next_segment (dashdemux->client,
|
return gst_mpd_client_has_next_segment (dashdemux->client,
|
||||||
dashstream->active_stream, stream->demux->segment.rate > 0.0);
|
dashstream->active_stream, stream->demux->segment.rate > 0.0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue