Commit fd5aa095 authored by Robert Swain's avatar Robert Swain
Browse files

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.
parent 3f1ef225
...@@ -4236,7 +4236,8 @@ gst_pad_chain_data_unchecked (GstPad * pad, gboolean is_buffer, void *data, ...@@ -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, ...@@ -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) ...@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment