summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Waters <matthew@centricular.com>2014-11-17 23:16:03 +1100
committerMatthew Waters <matthew@centricular.com>2014-11-17 23:16:03 +1100
commit0053ad08471e14bed592fe125f1b2999d23c00cd (patch)
tree93ba81a1e6a49377f9ef205787ec94ef8587f480
parent8aa263006865584b5dcc05378d18ff052e6f188e (diff)
videomixer: fix up QoS handling for live sources
Only attempt adaptive drop when we are not live https://bugzilla.gnome.org/show_bug.cgi?id=739996
-rw-r--r--gst/videomixer/videomixer2.c4
-rw-r--r--gst/videomixer/videomixer2.h3
2 files changed, 6 insertions, 1 deletions
diff --git a/gst/videomixer/videomixer2.c b/gst/videomixer/videomixer2.c
index ec6e2a83d..abb18f8ab 100644
--- a/gst/videomixer/videomixer2.c
+++ b/gst/videomixer/videomixer2.c
@@ -808,7 +808,7 @@ gst_videomixer2_update_qos (GstVideoMixer2 * mix, gdouble proportion,
GST_OBJECT_LOCK (mix);
mix->proportion = proportion;
if (G_LIKELY (timestamp != GST_CLOCK_TIME_NONE)) {
- if (G_UNLIKELY (diff > 0))
+ if (!mix->live && G_UNLIKELY (diff > 0))
mix->earliest_time =
timestamp + 2 * diff + gst_util_uint64_scale_int_round (GST_SECOND,
GST_VIDEO_INFO_FPS_D (&mix->info), GST_VIDEO_INFO_FPS_N (&mix->info));
@@ -1503,6 +1503,8 @@ gst_videomixer2_query_latency (GstVideoMixer2 * mix, GstQuery * query)
g_value_unset (&item);
gst_iterator_free (it);
+ mix->live = live;
+
if (res) {
/* store the results */
GST_DEBUG_OBJECT (mix, "Calculated total latency: live %s, min %"
diff --git a/gst/videomixer/videomixer2.h b/gst/videomixer/videomixer2.h
index 5097d1d63..8c6a65f66 100644
--- a/gst/videomixer/videomixer2.h
+++ b/gst/videomixer/videomixer2.h
@@ -116,6 +116,9 @@ struct _GstVideoMixer2
gboolean send_stream_start;
+ /* latency */
+ gboolean live;
+
GstTagList *pending_tags;
};