GNOME Bugzilla – Bug 347763
Bad linking between two elements
Last modified: 2006-10-10 14:19:37 UTC
When you create a pipe like this: gst-launch udpsrc ! `application/x-rtp` ! rtpdepay you get an error that no connection can be made between the filter and the rtpdepay. Why do you get this error: Because there is searched after a source/sink couple. In this example the source/sink couple found is, the source from the filter and the rtpc sink from the rtpdepay. Solution: Add a check for the caps when searching for the correct couple that you want to link.
going to mark this as enhancement, gst-launch is a devel tool. For multisink element, use named pads like so: gst-launch udpsrc ! application/x-rtp ! .sinkrtp rtpdepay
But the error is not in the gst-launch program, but in gstreamer core. To be exact in in the gst/gstutils.c file in function gst_element_get_compatible_pad. ( a FIXME label is present in the 0.10.9 version) I don't think this is an enhancement, it's a bug for the moment that two elements that can be linked, don't link automatically. You get the same result if you do this linking in a self writen program.
It's a limitation of the current system. In both cases (gst-launch and code) you can avoid the problem by specifying the pad to link to. Wim gave the launch line. In code, you'd do: gst_element_link_pads (udpelement, NULL, rtpdepay, "sinkrtp")
It is also recommended not to use functions from gstutils.c as they try to do something "automatic" with no clear defined behaviour. Use the explicit well defined core functions instead (gst_pad_link).
Can we close this? Sounds like it's working as designed, both gst-launch and gstreamer itself give you mechanisms through which you can cope with this correctly.