I am writing client code which receives audio+video.<div><br></div><div>When I am trying to connect rtpbin and depayloader how to know which session is this?</div><div><br></div><div>Actually,I am writing the code in C and am trying to use g_signal_connect.</div>
<div>So that I can use </div><div><div> g_signal_connect (rtpbin, "pad-added", G_CALLBACK (pad_added_cb), videodepay);</div><div><br></div><div> g_signal_connect
(rtpbin, "pad-added", G_CALLBACK (pad_added_cb), audiodepay); </div><div><br></div><div>and the pad_added_cb handler is:</div><div><br></div><div><pre><code><font class="Apple-style-span" face="verdana, sans-serif">/* will be called when rtpbin has validated a payload that we can depayload */
</font></code><span class="Apple-style-span" style="font-family: verdana, sans-serif; ">static void</span></pre><pre><code><font class="Apple-style-span" face="verdana, sans-serif">pad_added_cb (GstElement * rtpbin, GstPad * new_pad, GstElement * depay)
{
GstPad *sinkpad;
GstPadLinkReturn lres;
g_print ("new payload on pad: %s\n", GST_PAD_NAME (new_pad));
sinkpad = gst_element_get_static_pad (depay, "sink");
g_assert (sinkpad);
lres = gst_pad_link (new_pad, sinkpad);
g_assert (lres == GST_PAD_LINK_OK);
gst_object_unref (sinkpad);
}</font></code></pre></div><div><br></div></div><div>my client pipeline is:</div><div><br></div><div><div>VIDEO_DEC="rtph264depay ! ffdec_h264"</div><div>AUDIO_DEC="rtpmp4gdepay ! faad"</div><div><br>
</div><div>VIDEO_SINK="ffmpegcolorspace ! autovideosink"</div>
<div>AUDIO_SINK="autoaudiosink"</div></div><div>DEST=127.0.0.1</div><div><br></div><div>LATENCY=100</div><div><br></div><div>gst-launch -v gstrtpbin name=rtpbin \</div><div> udpsrc caps=$VIDEO_CAPS port=5000 ! rtpbin.recv_rtp_sink_0 \</div>
<div> rtpbin. ! $VIDEO_DEC ! $VIDEO_SINK \</div><div> udpsrc port=5001 ! rtpbin.recv_rtcp_sink_0 \</div><div> rtpbin.send_rtcp_src_0 ! udpsink port=5005 host=$DEST sync=false async=false</div>
<div>udpsrc caps=$AUDIO_CAPS port=5002 ! rtpbin.recv_rtp_sink_1 \</div><div>rtpbin. ! $AUDIO_DEC ! $AUDIO_SINK \</div><div>udpsrc port=5003 ! rtpbin.recv_rtcp_sink_1 \</div>
<div>rtpbin.send_rtcp_src_1 ! udpsink port=5007 host=$DEST sync=false async=false</div><div> </div><div>Same thing as above pipeline in C language I am writing.</div><div>Please reply.</div><div>If you know other way please do let me know.</div>
<div>Thaks in advance.</div>