Error when link udpsrc to rtpbin.recv_rtcp_sink_0

Li Ma skywalker.nick at
Tue Aug 22 14:42:03 UTC 2017

Hi all, I'm new in this community. Currently I'm trying to implement a
h264 encoded rtp over udp pipeline for evaluation.
But I run into trouble when I try to link a udpsrc element to

The debug info is as follows.
0:00:18.429850272 15948 0000020437164000 INFO                GST_PADS
gstpad.c:2316:gst_pad_link_prepare: trying to link udpsrc1:src and

0:00:18.430167627 15948 0000020437164000 DEBUG               GST_CAPS
gstpad.c:2304:gst_pad_link_check_hierarchy: pads have different
grandparents (NULL) and <cameraStreamOut>

0:00:18.430455363 15948 0000020437164000 INFO                GST_PADS
gstpad.c:2365:gst_pad_link_prepare: pads have wrong hierarchy

0:00:18.430795287 15948 0000020437164000 INFO                GST_PADS
gstpad.c:2467:gst_pad_link_full: link between udpsrc1:src and
rtpbin0:recv_rtcp_sink_0 failed: wrong hierarchy

0:00:18.431081259 15948 0000020437164000 DEBUG            GST_MESSAGE
gstelement.c:1792:gst_element_post_message_default:<udpsrc1> not
posting message 0000020437B26140: no bus
** failed: (GST_PAD_LINK_OK == linkres)

It says the hierarchy is wrong, but I'm not sure the real meaning. The
code is quite simple.

GstElement* csrc = gst_element_factory_make("udpsrc", nullptr); // RTCP IN PORT
g_object_set(G_OBJECT(csrc), "port", 5000, nullptr);

srcpad = gst_element_get_static_pad(csrc, "src");
sinkpad = gst_element_get_request_pad(rtpbin, "recv_rtcp_sink_0");
linkres = gst_pad_link(srcpad, sinkpad);
g_assert(GST_PAD_LINK_OK == linkres);

I'd really appreciate any advice.

Li Ma (Nick)
Email: skywalker.nick at

More information about the gstreamer-devel mailing list