Hello!<br><br>I would like to have the following gst pipeline in a c application:<br><br>It is only the server side.<br><br>gst-launch gstrtpbin name=rtpbin \<br> audiotestsrc ! alawenc ! rtppcmapay ! rtpbin.send_rtp_sink_0 \<br>
rtpbin.send_rtp_src_0 ! udpsink port=5000 \<br> rtpbin.send_rtcp_src_0 ! udpsink port=5001 sync=false async=false \<br> udpsrc port=5003 ! rtpbin.recv_rtcp_sink_0<br>
<br>It works well. Then I created an image from the pipeline, which I attached. The image (and the pipeline as well) clearly show that gstrtpbin uses 4 pads: 3 on-request pads ( send_rtp_sink_0, recv_rtcp_sink_0, send_rtcp_src_0 ) and one sometimes pad (send_rtp_src_0). <br>
<br>I wrote the application, but it quits with: "Internal data flow error."<br><br>I do not know what the problem is. I already used request pads before, so I guess the the dynamic pad is wrong. The Hello World example uses a signal handler to summon the sometimes pad (but in there application the oggdemux element has only one source pad, which the sometimes pad), but gstrtpbin has 2 sometimes source pads, I need only one of them, namely send_rtp_src_0. I couldn't able to do it with the signal handler, therefore I tried the following way:<br>
<br>static void new_pad_send_rtp_src( )<br>{<br> GstPad *sinkpad;<br> GstPad *srcpad;<br> gchar *srcname;<br> gchar *sinkname; <br> <br> sinkpad = gst_element_get_static_pad(udpsink0, "sink");<br>
sinkname = gst_pad_get_name(sinkpad);<br> srcpad = gst_element_get_pad(rtpbin, "send_rtp_src_0");<br> srcname = gst_pad_get_name(srcpad);<br><br> gst_pad_link (srcpad, sinkpad);<br> g_print ("A dynamic pad %s created and linked \n", srcname);<br>
<br> g_free(srcname);<br> g_free(sinkname);<br> gst_object_unref(sinkpad);<br> gst_object_unref(srcpad);<br><br>}<br><br> The core reference says one shouldn't use gst_pad_get_name(GstPad *pad), becouse it's not safe, but the pads were succesfully linked, as the request pads too with the proper elements.<br>
<br>Any idea? Thank you in advance.<br><br>PS: I attached the pipeline image and my source to have a full view.<br><br>Zoli<br>