mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 11:10:37 +00:00
dashdemux: answer to latency queries
Set live if stream is live and also add to the max latency the max internal buffering
This commit is contained in:
parent
c62137b832
commit
b8fc98849a
1 changed files with 16 additions and 0 deletions
|
@ -941,6 +941,22 @@ gst_dash_demux_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
|||
}
|
||||
break;
|
||||
}
|
||||
case GST_QUERY_LATENCY:
|
||||
{
|
||||
gboolean live;
|
||||
GstClockTime min, max;
|
||||
|
||||
gst_query_parse_latency (query, &live, &min, &max);
|
||||
|
||||
if (dashdemux->client && gst_mpd_client_is_live (dashdemux->client))
|
||||
live = TRUE;
|
||||
|
||||
if (dashdemux->max_buffering_time > 0)
|
||||
max += dashdemux->max_buffering_time;
|
||||
|
||||
gst_query_set_latency (query, live, min, max);
|
||||
break;
|
||||
}
|
||||
default:{
|
||||
/* By default, do not forward queries upstream */
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue