Thanks its working.I have used the recv_rtp_src_m (where m is the session identifier) and used the same function  GST_PAD_NAME (new_pad) to get this name. passed the depayloaders in an array in g_signal_connect.We can do other way also checking the caps from pad and from there we can search payload type or media type .<br>
<br><div class="gmail_quote">On Mon, Aug 1, 2011 at 12:53 AM, Andy_Milestone <span dir="ltr">&lt;<a href="mailto:andy87.milestone@googlemail.com">andy87.milestone@googlemail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Well, I had the same problem, because I am working on softphone with video- and audio support.<br>
<br>
I am not sure If there is an &quot;intelligent&quot; solution for this problem, but I checked the payload-type, which is given in this line:<div class="im"><br>
&gt;    g_print (&quot;new payload on pad: %s\n&quot;, GST_PAD_NAME (new_pad));<br></div>
If its payloadtype 0 then I connect the rtpbin with the audio-depay and if its 96 I connect it to the video-depay. In my case the rtpbin is defined as a pointer in a global structure, therefore I can decide in the callback which depayloader should be used.<br>

<br>
Do want to realize undirectional or bidirectional streaming?<br>
<br>
<br>
Andreas<br>
<br>
<br>
Am 01.08.2011 06:15, schrieb arpi d:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div class="h5">
I am writing client code which receives audio+video.<br>
<br>
When I am trying to connect rtpbin and depayloader how to know which<br>
session is this?<br>
<br>
Actually,I am writing the code in C and am trying to use g_signal_connect.<br>
So that I can use<br>
  g_signal_connect (rtpbin, &quot;pad-added&quot;, G_CALLBACK (pad_added_cb),<br>
videodepay);<br>
<br>
  g_signal_connect (rtpbin, &quot;pad-added&quot;, G_CALLBACK (pad_added_cb),<br>
audiodepay);<br>
<br>
and the pad_added_cb handler is:<br>
<br>
|/* will be called when rtpbin has validated a payload that we can depayload */<br>
|static void<br>
<br>
|pad_added_cb (GstElement * rtpbin, GstPad * new_pad, GstElement * depay)<br>
{<br>
   GstPad *sinkpad;<br>
   GstPadLinkReturn lres;<br>
<br>
   g_print (&quot;new payload on pad: %s\n&quot;, GST_PAD_NAME (new_pad));<br>
<br>
   sinkpad = gst_element_get_static_pad (depay,&quot;sink&quot;);<br>
   g_assert (sinkpad);<br>
<br>
   lres = gst_pad_link (new_pad, sinkpad);<br>
   g_assert (lres == GST_PAD_LINK_OK);<br>
   gst_object_unref (sinkpad);<br>
}|<br>
<br>
<br>
my client pipeline is:<br>
<br>
VIDEO_DEC=&quot;rtph264depay ! ffdec_h264&quot;<br>
AUDIO_DEC=&quot;rtpmp4gdepay ! faad&quot;<br>
<br>
VIDEO_SINK=&quot;ffmpegcolorspace ! autovideosink&quot;<br>
AUDIO_SINK=&quot;autoaudiosink&quot;<br>
DEST=127.0.0.1<br>
<br>
LATENCY=100<br>
<br>
gst-launch -v gstrtpbin name=rtpbin                   \<br>
     udpsrc caps=$VIDEO_CAPS port=5000 ! rtpbin.recv_rtp_sink_0         \<br>
       rtpbin. ! $VIDEO_DEC ! $VIDEO_SINK                               \<br>
     udpsrc port=5001 ! rtpbin.recv_rtcp_sink_0                         \<br>
  rtpbin.send_rtcp_src_0 ! udpsink port=5005 host=$DEST sync=false<br>
async=false<br>
udpsrc caps=$AUDIO_CAPS port=5002 ! rtpbin.recv_rtp_sink_1              \<br>
rtpbin. ! $AUDIO_DEC ! $AUDIO_SINK                                \<br>
udpsrc port=5003 ! rtpbin.recv_rtcp_sink_1                              \<br>
rtpbin.send_rtcp_src_1 ! udpsink port=5007 host=$DEST sync=false async=false<br>
Same thing as above pipeline in C language I am writing.<br>
Please reply.<br>
If you know other way please do let  me know.<br>
Thaks in advance.<br>
<br>
<br>
<br></div></div>
______________________________<u></u>_________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.<u></u>freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/<u></u>mailman/listinfo/gstreamer-<u></u>devel</a><br>
</blockquote>
<br>
______________________________<u></u>_________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.<u></u>freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/<u></u>mailman/listinfo/gstreamer-<u></u>devel</a><br>
</blockquote></div><br>