rtpbin behaves differently as between parse_launch() and manually adding to pipeline

Trey Hutcheson trey.hutcheson at gmail.com
Tue Jun 16 22:04:16 UTC 2020


I'm trying to get rtpbin to receive audio from a remote endpoint. The
simple examples all work fine, but when I try to integrate it into a larger
framework rtpbin behaves differently.

These two pipelines work just fine with gst-launch
Sending audio:
gst-launch-1.0 rtpbin name=rtpbin \
    audiotestsrc ! mulawenc ! rtppcmupay ! rtpbin.send_rtp_sink_1 \
    rtpbin.send_rtp_src_1 ! udpsink host=127.0.0.1 port=10000

And receiving audio:
gst-launch-1.0 udpsrc address=127.0.0.1 port=10000 caps="application/x-rtp,
media=audio, encoding-name=PCMU, clock-rate=8000" ! \
  rtpbin ! queue ! rtppcmudepay ! mulawdec ! audioconvert ! audioresample !
autoaudiosink


So, inside my rust code, I can pass the exact same string to
gst::parse_launch(), play the pipeline, and send audio to it and it plays
to my speaker. Cool.

*however*, if I do the following (rust):
let pipeline = gst::Pipeline::new(None);
pipeline.set_state(gst::State::Playing)?;

// the bin source is the *exact same* as the pipeline source
let bin = gst::parse_bin_from_description( ... )?;
pipeline.add(&bin);
bin.sync_state_with_parent()?;

And then send in the rtp, rtpbin fails to link some pads. With GST_DEBUG=3:
WARN                 basesrc gstbasesrc.c:3072:gst_base_src_loop:<udpsrc0>
error: Internal data stream error.
WARN                 basesrc gstbasesrc.c:3072:gst_base_src_loop:<udpsrc0>
error: streaming stopped, reason not-linked (-1)


With GST_DEBUG=4:
INFO        GST_ELEMENT_PADS gstutils.c:1771:gst_element_link_pads_full:
trying to link element rtpbin:(any) to element rtppcmudepay0:(any)
INFO        GST_ELEMENT_PADS gstelement.c:915:gst_element_get_static_pad:
found pad rtppcmudepay0:sink
INFO        GST_ELEMENT_PADS
gstutils.c:1225:gst_element_get_compatible_pad:<rtppcmudepay0> Could not
find a compatible pad to link to rtpbin:recv_rtp_src_0_270934790_0
INFO                 default
gstutils.c:2161:gst_element_link_pads_filtered: Could not link pads:
rtpbin:(null) - rtppcmudepay0:(null)
INFO                GST_PADS
gstpad.c:4237:gst_pad_peer_query:<rtpbin:recv_rtp_src_0_270934790_0> pad
has no peer
INFO                    task
gsttask.c:312:gst_task_func:<rtpjitterbuffer0:src> Task going to paused
INFO                 basesrc gstbasesrc.c:2981:gst_base_src_loop:<udpsrc0>
pausing after gst_pad_push() = not-linked
WARN                 basesrc gstbasesrc.c:3072:gst_base_src_loop:<udpsrc0>
error: Internal data stream error.
WARN                 basesrc gstbasesrc.c:3072:gst_base_src_loop:<udpsrc0>
error: streaming stopped, reason not-linked (-1)
INFO        GST_ERROR_SYSTEM
gstelement.c:2140:gst_element_message_full_with_details:<udpsrc0> posting
message: Internal data stream error.
INFO        GST_ERROR_SYSTEM
gstelement.c:2167:gst_element_message_full_with_details:<udpsrc0> posted
error message: Internal data stream error

What am I doing wrong?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20200616/beb6303a/attachment.htm>


More information about the gstreamer-devel mailing list