Problem with rtpbin and rtph264depay

Philippe Lalevée philippe.lalevee at mines-stetienne.fr
Sun Feb 3 13:10:22 UTC 2019


Hello,
I have a problem of connection between rtpbin and rtph264depay (maybe 
the problem is elsewhere).
Here is my pipelines, which executes correctly with gst-launch...
Talker machine :
gst-launch-1.0 rtpbin name=rtpbin filesrc location=video.mp4 ! qtdemux 
name=d
     d.audio_0 ! aacparse ! rtpmp4apay mtu=524 ! rtpbin.send_rtp_sink_1
     d.video_0 ! decodebin ! x264enc ! rtph264pay ! rtpbin.send_rtp_sink_0
     rtpbin.send_rtp_src_1 ! udpsink port=5004 host=$IP sync=false 
async=false
     rtpbin.send_rtcp_src_1 ! udpsink port=5005 host=$IP sync=false 
async=false
     udpsrc port=5007 ! rtpbin.recv_rtcp_sink_1
     rtpbin.send_rtp_src_0 ! udpsink port=5000 host=$IP sync=true 
async=false
     rtpbin.send_rtcp_src_0 ! udpsink port=5001 host=$IP sync=false 
async=false
     udpsrc port=5003 ! rtpbin.recv_rtcp_sink_0

Listener machine:
gst-launch-1.0 rtpbin name=rtpbin
    udpsrc caps=$VCAPS port=5000 ! rtpbin.recv_rtp_sink_0
*rtpbin.recv_rtp_src_0 ! rtph264depay* ! decodebin ! videoconvert ! 
autovideosink
     udpsrc port=5001 ! rtpbin.recv_rtcp_sink_0
     rtpbin.send_rtcp_src_0 ! udpsink port=5003 host=$IP sync=false 
async=false
     udpsrc caps=$ACAPS port=5004 ! rtpbin.recv_rtp_sink_1
     rtpbin.send_rtp_src_1 ! rtpmp4adepay ! avdec_aac ! audioconvert ! 
alsasink
     udpsrc port=5005 ! rtpbin.recv_rtcp_sink_1
     rtpbin.send_rtcp_src_1 !
     udpsink port=5007 host=$IP sync=false async=false

...but not in an application. The problem is on listener side: 
rtph264depay refuse to link to recv_rtp_src_0 of rtpbin, instead it try 
to link with recv_rtp_src_1, which is not correct, because that is an 
"audio pad (consequently, the error code -4 is returned, meaning "pads 
do not have common format". Naturally, there is no problem for 
rtpmp4adepay. And, if I connect first rtpmp4adepay, it normally uses the 
pad recv_rtp_src_0, but rtph264depay want to use the same pad (why?), 
and then the error code -2 is returned, meaning "pad was already linked".

To make the links, I use the signal "pad-added" with g_signal_connect, 
and in the callback, I use gst_element_link to make the link. I have no 
problem with other links...
         g_signal_connect(recv_rtpbin, "pad-added", 
G_CALLBACK(psa_listener_pad_cb), depay_video);
         g_signal_connect(recv_rtpbin, "pad-added", 
G_CALLBACK(psa_listener_pad_cb), depay_audio);

As recv_rtp_src_1 is a audio pad, then incompatible with rtph264depay, 
how to force linking of rtph264depay to a specific pad (here 
recv_rtp_src_0) for this plugin?

Else have you an idea of the problem?

Thanks,
Philippe

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190203/92829aeb/attachment.html>


More information about the gstreamer-devel mailing list