summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Santos <thiago.sousa.santos@collabora.com>2013-07-04 15:14:00 -0300
committerThiago Santos <thiago.sousa.santos@collabora.com>2013-07-08 23:39:49 -0300
commitb8fc98849a9c4fc8c00135018d8ae14e0c829755 (patch)
tree1e86c889190fd9c59608ca85856556bdb36f6e86
parentc62137b8326c1190f297e6f3d4c04d23b9614c57 (diff)
downloadgstreamer-plugins-bad-b8fc98849a9c4fc8c00135018d8ae14e0c829755.tar.gz
dashdemux: answer to latency queries
Set live if stream is live and also add to the max latency the max internal buffering
-rw-r--r--ext/dash/gstdashdemux.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/ext/dash/gstdashdemux.c b/ext/dash/gstdashdemux.c
index fb4b58e69..685e9134c 100644
--- a/ext/dash/gstdashdemux.c
+++ b/ext/dash/gstdashdemux.c
@@ -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;