aggregator: Improve debugging of arriving buffers

Log some details about the buffers that are arriving and
being enqueued on each sink pad.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2096>
This commit is contained in:
Jan Schmidt 2022-04-02 00:16:29 +11:00 committed by GStreamer Marge Bot
parent 0a5c2a9afb
commit 029d6a4a19

View file

@ -3021,7 +3021,8 @@ gst_aggregator_pad_chain_internal (GstAggregator * self,
GstFlowReturn flow_return; GstFlowReturn flow_return;
GstClockTime buf_pts; GstClockTime buf_pts;
GST_TRACE_OBJECT (aggpad, "entering chain internal"); GST_TRACE_OBJECT (aggpad,
"entering chain internal with %" GST_PTR_FORMAT, buffer);
PAD_LOCK (aggpad); PAD_LOCK (aggpad);
flow_return = aggpad->priv->flow_return; flow_return = aggpad->priv->flow_return;
@ -3044,10 +3045,12 @@ gst_aggregator_pad_chain_internal (GstAggregator * self,
if ((gst_aggregator_pad_has_space (self, aggpad) || !head) if ((gst_aggregator_pad_has_space (self, aggpad) || !head)
&& aggpad->priv->flow_return == GST_FLOW_OK) { && aggpad->priv->flow_return == GST_FLOW_OK) {
if (head) if (head) {
GST_DEBUG_OBJECT (aggpad, "Enqueuing %" GST_PTR_FORMAT, buffer);
g_queue_push_head (&aggpad->priv->data, buffer); g_queue_push_head (&aggpad->priv->data, buffer);
else } else {
g_queue_push_tail (&aggpad->priv->data, buffer); g_queue_push_tail (&aggpad->priv->data, buffer);
}
apply_buffer (aggpad, buffer, head); apply_buffer (aggpad, buffer, head);
aggpad->priv->num_buffers++; aggpad->priv->num_buffers++;
buffer = NULL; buffer = NULL;
@ -3061,7 +3064,9 @@ gst_aggregator_pad_chain_internal (GstAggregator * self,
SRC_UNLOCK (self); SRC_UNLOCK (self);
goto flushing; goto flushing;
} }
GST_DEBUG_OBJECT (aggpad, "Waiting for buffer to be consumed (chain)"); GST_DEBUG_OBJECT (aggpad,
"Waiting for buffer to be consumed (chain) before enqueueing %"
GST_PTR_FORMAT, buffer);
GST_OBJECT_UNLOCK (self); GST_OBJECT_UNLOCK (self);
SRC_UNLOCK (self); SRC_UNLOCK (self);
PAD_WAIT_EVENT (aggpad); PAD_WAIT_EVENT (aggpad);