pad: Allow tracking of buffers in GST_SCHEDULING debug output

As GST_SCHEDULING reports when buffers pass through pads due to
gst_pad_push calls, they are a good way of tracking the progress of
buffers through pipelines. As such, adding output of the buffer pointers
to these messages allows tracking of specific buffers, easing debugging.
This commit is contained in:
Robert Swain 2011-04-11 11:05:24 +02:00
parent 3f1ef2255a
commit fd5aa095da

View file

@ -4236,7 +4236,8 @@ gst_pad_chain_data_unchecked (GstPad * pad, gboolean is_buffer, void *data,
goto no_function; goto no_function;
GST_CAT_LOG_OBJECT (GST_CAT_SCHEDULING, pad, GST_CAT_LOG_OBJECT (GST_CAT_SCHEDULING, pad,
"calling chainfunction &%s", GST_DEBUG_FUNCPTR_NAME (chainfunc)); "calling chainfunction &%s with buffer %p",
GST_DEBUG_FUNCPTR_NAME (chainfunc), data);
if (cache) { if (cache) {
cache->peer = gst_object_ref (pad); cache->peer = gst_object_ref (pad);
@ -4246,8 +4247,8 @@ gst_pad_chain_data_unchecked (GstPad * pad, gboolean is_buffer, void *data,
ret = chainfunc (pad, GST_BUFFER_CAST (data)); ret = chainfunc (pad, GST_BUFFER_CAST (data));
GST_CAT_LOG_OBJECT (GST_CAT_SCHEDULING, pad, GST_CAT_LOG_OBJECT (GST_CAT_SCHEDULING, pad,
"called chainfunction &%s, returned %s", "called chainfunction &%s with buffer %p, returned %s",
GST_DEBUG_FUNCPTR_NAME (chainfunc), gst_flow_get_name (ret)); GST_DEBUG_FUNCPTR_NAME (chainfunc), data, gst_flow_get_name (ret));
} else { } else {
GstPadChainListFunction chainlistfunc; GstPadChainListFunction chainlistfunc;
@ -4676,14 +4677,15 @@ gst_pad_push (GstPad * pad, GstBuffer * buffer)
if (G_UNLIKELY (g_atomic_pointer_get (cache_ptr) == PAD_CACHE_INVALID)) if (G_UNLIKELY (g_atomic_pointer_get (cache_ptr) == PAD_CACHE_INVALID))
goto invalid; goto invalid;
GST_CAT_LOG_OBJECT (GST_CAT_SCHEDULING, pad, "calling chainfunction &%s", GST_CAT_LOG_OBJECT (GST_CAT_SCHEDULING, pad,
GST_DEBUG_FUNCPTR_NAME (GST_PAD_CHAINFUNC (peer))); "calling chainfunction &%s with buffer %p",
GST_DEBUG_FUNCPTR_NAME (GST_PAD_CHAINFUNC (peer)), buffer);
ret = GST_PAD_CHAINFUNC (peer) (peer, buffer); ret = GST_PAD_CHAINFUNC (peer) (peer, buffer);
GST_CAT_LOG_OBJECT (GST_CAT_SCHEDULING, pad, GST_CAT_LOG_OBJECT (GST_CAT_SCHEDULING, pad,
"called chainfunction &%s, returned %s", "called chainfunction &%s with buffer %p, returned %s",
GST_DEBUG_FUNCPTR_NAME (GST_PAD_CHAINFUNC (peer)), GST_DEBUG_FUNCPTR_NAME (GST_PAD_CHAINFUNC (peer)), buffer,
gst_flow_get_name (ret)); gst_flow_get_name (ret));
GST_PAD_STREAM_UNLOCK (peer); GST_PAD_STREAM_UNLOCK (peer);