diff options
author | Olivier CrĂȘte <olivier.crete@collabora.com> | 2015-03-06 16:51:12 -0500 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.com> | 2015-03-16 16:44:03 -0400 |
commit | c56587799124bd37638ddbfeffdfb9dff9b61fe8 (patch) | |
tree | fa8edcf56ee17c6d4cad25b03f9759ed3ac09d1a /gst/audiomixer | |
parent | 01520c7e4781c3d5bff3d1b2a5e123ad085e4bd7 (diff) |
audioaggregator: Print a message when a buffer is late
https://bugzilla.gnome.org/show_bug.cgi?id=740236
Diffstat (limited to 'gst/audiomixer')
-rw-r--r-- | gst/audiomixer/gstaudioaggregator.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gst/audiomixer/gstaudioaggregator.c b/gst/audiomixer/gstaudioaggregator.c index 2fb0a41ea..b52635015 100644 --- a/gst/audiomixer/gstaudioaggregator.c +++ b/gst/audiomixer/gstaudioaggregator.c @@ -1143,6 +1143,7 @@ gst_audio_aggregator_aggregate (GstAggregator * agg, gboolean timeout) * and maybe drop the current buffer */ if (pad->priv->output_offset < aagg->priv->offset) { gint64 diff = aagg->priv->offset - pad->priv->output_offset; + gint64 odiff = diff; if (pad->priv->position + diff > pad->priv->size) diff = pad->priv->size - pad->priv->position; @@ -1150,6 +1151,10 @@ gst_audio_aggregator_aggregate (GstAggregator * agg, gboolean timeout) pad->priv->output_offset += diff; if (pad->priv->position == pad->priv->size) { + GST_LOG_OBJECT (pad, "Buffer was late by %" GST_TIME_FORMAT + ", dropping %" GST_PTR_FORMAT, + GST_TIME_ARGS (gst_util_uint64_scale (odiff, GST_SECOND, + GST_AUDIO_INFO_RATE (&aagg->info))), pad->priv->buffer); /* Buffer done, drop it */ gst_buffer_replace (&pad->priv->buffer, NULL); dropped = TRUE; |