mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-25 00:28:21 +00:00
tracer: move the PAD_LINK tracer hook to _pad_link_full()
This is ultimately executing the pad_link. In the previous position we missed some links, notably ghostpads.
This commit is contained in:
parent
c9abc9edd3
commit
a52f5d73bd
1 changed files with 4 additions and 7 deletions
11
gst/gstpad.c
11
gst/gstpad.c
|
@ -2443,6 +2443,8 @@ gst_pad_link_full (GstPad * srcpad, GstPad * sinkpad, GstPadLinkCheck flags)
|
||||||
g_return_val_if_fail (GST_PAD_IS_SINK (sinkpad),
|
g_return_val_if_fail (GST_PAD_IS_SINK (sinkpad),
|
||||||
GST_PAD_LINK_WRONG_DIRECTION);
|
GST_PAD_LINK_WRONG_DIRECTION);
|
||||||
|
|
||||||
|
GST_TRACER_PAD_LINK_PRE (srcpad, sinkpad);
|
||||||
|
|
||||||
/* Notify the parent early. See gst_pad_unlink for details. */
|
/* Notify the parent early. See gst_pad_unlink for details. */
|
||||||
if (G_LIKELY ((parent = GST_ELEMENT_CAST (gst_pad_get_parent (srcpad))))) {
|
if (G_LIKELY ((parent = GST_ELEMENT_CAST (gst_pad_get_parent (srcpad))))) {
|
||||||
if (G_LIKELY (GST_IS_ELEMENT (parent))) {
|
if (G_LIKELY (GST_IS_ELEMENT (parent))) {
|
||||||
|
@ -2530,6 +2532,7 @@ done:
|
||||||
gst_object_unref (parent);
|
gst_object_unref (parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GST_TRACER_PAD_LINK_POST (srcpad, sinkpad, result);
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
/* ERRORS */
|
/* ERRORS */
|
||||||
|
@ -2575,13 +2578,7 @@ link_failed:
|
||||||
GstPadLinkReturn
|
GstPadLinkReturn
|
||||||
gst_pad_link (GstPad * srcpad, GstPad * sinkpad)
|
gst_pad_link (GstPad * srcpad, GstPad * sinkpad)
|
||||||
{
|
{
|
||||||
GstPadLinkReturn ret;
|
return gst_pad_link_full (srcpad, sinkpad, GST_PAD_LINK_CHECK_DEFAULT);
|
||||||
|
|
||||||
GST_TRACER_PAD_LINK_PRE (srcpad, sinkpad);
|
|
||||||
ret = gst_pad_link_full (srcpad, sinkpad, GST_PAD_LINK_CHECK_DEFAULT);
|
|
||||||
GST_TRACER_PAD_LINK_POST (srcpad, sinkpad, ret);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue