(cc to the list) Hi Andreas! I made some test writing a wrapper between the stream and the real UDP transport. Further I modified the streamtutil.c to create the ports manually and attach it to the UDP transport. This allows to set the IP_ADD_MEMBERSHIP option (if --mcast parameter is used). Currently the transport_multicast implements only a blocking behaviour. This means, if there are multiple RTP streams received, only the first received RTP stream is forwarded to the pj_stream, other packets are dropped. (timeout=1second). What is missing: a callback function which informs the application about a new detected SSRC. Then the application should create a new pj_stream, attach it to the conference bridge, and handle the new pj_Stream over to transport_mutlicast. Further, if there were no packets received from a certain SSRC (e.g. timeout=30 minutes) then the corresponding stream should be removed. I have attached the files. Put transport_mutlicast.[c|h] next to transport_srtp (in pjmedia/[src|include]/pjmedia). Further add it to pjmedia/build/Makefile regards Klaus Andreas Ahland schrieb: > Hi Klaus, > > the reception of a multicast is exactly what I wanted to try next. I > don't think it is very complicated, but you have already done the job. > Are you willing to give me your modified streamutil.c? > > Many thanks in advance, > > Andreas > > PS: A multicast streaming tool which is doing the mixing for several > multicasts on the same socket is RAT (Robust audio tool) > > > > ----- Original Message ----- From: "Klaus Darilion" > <klaus.mailinglists at pernau.at> > To: "pjsip list" <pjsip at lists.pjsip.org> > Sent: Monday, July 28, 2008 5:11 PM > Subject: Re: multiple RTP streams received on multicast > > >> >> >> Benny Prijono schrieb: >>> On Mon, Jul 28, 2008 at 10:19 AM, Klaus Darilion >>> <klaus.mailinglists at pernau.at <mailto:klaus.mailinglists at pernau.at>> >>> wrote: >>> >>> Hi Benny! >>> >>> I have modified the streamutil.c sample to send/receive from >>> multicast >>> IP and subscribe to the multicast group. This works fine if there is >>> only one sender in the multicast group. If there are multiple >>> senders to >>> the same mutlicast group, the audio played back by pjsip is broken. >>> >>> >>> That's probably because you use one stream (i.e. one jitter buffer) for >>> everyone. If the multiple senders are talking at the same time, I can >>> imagine that the jitter buffer will get confused because of this. Even >>> when talkers are talking in turns, the jitter buffer will also get >>> confused if senders have different RTP timestamp reference (in other >>> words, you need to make sure that all participants have the same RTP >>> timestamp clock). >>> >>> The later problem probably could be alleviated with using the jitter >>> buffer in fixed mode. >>> >>> To solve this issue I want to have multiple choices, e.g: >>> - conference all the incoming streams >>> - use only the first stream (and some timeout to change to another >>> stream if the current stream stops) >>> - manual selection of the stream (SSRC) >>> >>> Can you give me some hints how to implement this? >>> >>> >>> If you want to create one stream for each participant, you'd need to >>> implement some sort of wrapper to the media transport, which will check >>> the SSRC in incoming RTP and distribute it to the appropriate stream >>> instance (or create the stream if it doesn't exist). This kind of >>> adapter is explained a bit in >>> http://trac.pjsip.org/repos/wiki/SRTP#pjmedia_transport_srtpImplementation >>> >> >> So, the RTP packet is decoded twice? >> 1. In my adapter (between the UDP transport and the multiple streams) >> to get the SSRC and the corresponding stream >> 2. In the corresponding stream? >> >> >> regards >> klaus >> >> _______________________________________________ >> Visit our blog: http://blog.pjsip.org >> >> pjsip mailing list >> pjsip at lists.pjsip.org >> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >> >> No virus found in this incoming message. >> Checked by AVG - http://www.avg.com >> Version: 8.0.138 / Virus Database: 270.5.6/1575 - Release Date: >> 26.07.2008 16:18 >> >> >> > -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: streamutil.c Url: http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080731/81a2bd02/attachment-0002.c -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: transport_multicast.c Url: http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080731/81a2bd02/attachment-0003.c -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: transport_multicast.h Url: http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080731/81a2bd02/attachment-0001.h