Error when link udpsrc to rtpbin.recv_rtcp_sink_0

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Error when link udpsrc to rtpbin.recv_rtcp_sink_0

Li Ma
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
rtpbin.recv_rtcp_sink_0.

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
rtpbin0:recv_rtcp_sink_0

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
**
ERROR:test.cc:100:assertion 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);
g_object_unref(srcpad);
g_object_unref(sinkpad);

I'd really appreciate any advice.
--

Li Ma (Nick)
Email: [hidden email]
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Error when link udpsrc to rtpbin.recv_rtcp_sink_0

Tim Müller
On Tue, 2017-08-22 at 22:42 +0800, Li Ma wrote:

Hi,

> 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

You need to add udpsrc to the pipeline in which the rtpbin is before
linking both.

Cheers
 -Tim

--
Tim Müller, Centricular Ltd - http://www.centricular.com

Join us at the GStreamer Conference!
21-22 October 2017 in Prague, Czech Republic
http://gstreamer.freedesktop.org/conference/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Error when link udpsrc to rtpbin.recv_rtcp_sink_0

Li Ma
Wow, thanks for your advice. I made a stupid mistake.

On Tue, 22 Aug 2017 at 23:02 Tim Müller <[hidden email]> wrote:
On Tue, 2017-08-22 at 22:42 +0800, Li Ma wrote:

Hi,

> 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

You need to add udpsrc to the pipeline in which the rtpbin is before
linking both.

Cheers
 -Tim

--
Tim Müller, Centricular Ltd - http://www.centricular.com

Join us at the GStreamer Conference!
21-22 October 2017 in Prague, Czech Republic
http://gstreamer.freedesktop.org/conference/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
--

Li Ma (Nick)
Email: [hidden email]

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel