Problem with rtpbin and rtph264depay

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

Problem with rtpbin and rtph264depay

Philippe Lalevée-2
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


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

Re: Problem with rtpbin and rtph264depay

Philippe Lalevée-2
Hi,
I fixed typos in my mail...
And I would add that I have two "pad-added" signals with strictly the same pad names; output of callback calls below:
psa_listener_pad_cb: new pad: 'rtpbin:recv_rtp_src_1_1993189537_96' to 'depay_v':  failed (-4)
psa_listener_pad_cb: new pad: 'rtpbin:recv_rtp_src_1_1993189537_96' to 'depay_a':  success
Have you an idea of what happens?
Philippe

Le 03/02/2019 à 14:10, Philippe Lalevée a écrit :
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 this 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_1, 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


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

--
Logo MINES Saint-Étienne
Philippe LALEVÉE
Directeur du Campus Georges Charpak Provence
Directeur du Centre Microélectronique de Provence
Président de la Plate-forme Micro-PackS
+33 4 42 61 67 15 / +33 6 23 02 15 01
[hidden email]
@CampusCharpak #ISMIN @p_lalevee
Campus Georges Charpak Provence
880 route de Mimet, F-13541 Gardanne Cedex
Assistante CGCP : [hidden email]         (+33 442616620)
Assistante CMP :   [hidden email] (+33 442616610)
Inspiring Innovation - Since
                  1816

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