<div dir="ltr"><div>I think you can set different payload type for payloader on server side and then filter on client side after rtspsrc like:<br></div>application/x-rtp, payload=pt_num<br></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Jun 8, 2015 at 2:35 PM Martin Scheffler <<a href="mailto:martinscheffler@gmail.com">martinscheffler@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi all, </div><div>I am trying to get multiple streams in a single RTSP session to work. </div><div><br>I think I have the server side correct:</div><div> </div><div>--------------------------------8<-------------------------------<br>#include <gst/gst.h><br>#include <gst/rtsp-server/rtsp-server.h></div><div>int main(int argc, char* argv[])<br>{<br>    gst_init (&argc, &argv);<br>    GMainLoop* loop = g_main_loop_new(NULL, FALSE);<br>    GstRTSPServer* server = gst_rtsp_server_new ();<br> <br>    GstRTSPMountPoints* mounts = gst_rtsp_server_get_mount_points (server);</div><div>    GstRTSPMediaFactory* factory = gst_rtsp_media_factory_new();<br>    gst_rtsp_media_factory_set_launch (factory, "( audiotestsrc freq=1000 is-live=true !  audioconvert ! rtpL16pay name=pay0  audiotestsrc freq=5000 !  audioconvert ! rtpL16pay name=pay1 )");</div><div>    gst_rtsp_media_factory_set_shared (factory, TRUE);  <br>    gst_rtsp_mount_points_add_factory (mounts, "/test", factory);<br>    g_object_unref (mounts);<br>    gst_rtsp_server_attach (server, NULL);<br>    g_main_loop_run (loop);</div><div> return 0;<br>}<br>--------------------------------8<-------------------------------</div><div>I can listen to the first stream with this command line:<br>gst-launch-1.0.exe rtspsrc location=rtsp://localhost:8554/test ! rtpL16depay ! queue ! audioconvert ! autoaudiosink</div><div>But how can I listen to the second one (pay1)?<br>I tried this GStreamer command line:</div><div>gst-launch-1.0.exe rtspsrc location=rtsp://localhost:8554/test name=src src.stream_1 ! rtpL16depay ! queue ! audioconvert ! autoaudiosink</div><div>but that does not work. The server gives out a warning "media 05bxxx was not prepared" and the client shows a datastream error.</div><div>I can connect to the server with VLC (although an ancient version, maybe it is too old)?<br>VLC shows the two audio channels and plays the second one. The server prints:</div><div>--------------------------------8<-------------------------------<br>0:02:32.239700172  3376   00547960 ERROR             rtspclient rtsp-client.c:1279:handle_play_request: client 00545D58:<br> no aggregate path /test/stream=1<br>0:02:32.241088051  3376   00547960 ERROR             rtspclient rtsp-client.c:947:handle_teardown_request: client 00545D<br>58: no aggregate path /test/stream=1<br>0:02:32.281316632  3376   05BC7768 WARN                  udpsrc gstudpsrc.c:552:gst_udpsrc_create:<udpsrc8> error: get a<br>vailable bytes failed<br>0:02:32.282693343  3376   05BC7768 WARN                 basesrc gstbasesrc.c:2933:gst_base_src_loop:<udpsrc8> error: Int<br>ernal data flow error.<br>0:02:32.284821948  3376   05BC7768 WARN                 basesrc gstbasesrc.c:2933:gst_base_src_loop:<udpsrc8> error: str<br>eaming task paused, reason error (-5)<br>0:02:32.291064085  3376   00547960 WARN               rtspmedia rtsp-media.c:3068:gst_rtsp_media_set_state: media 05BE21<br>18 was not prepared<br>--------------------------------8<-------------------------------</div><div>So any chance of getting this to work?</div><div>Thanks for your help!</div><div>Cheers,<br>Martin</div><div> </div></div>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div>