RTP Multicast

Topics: Question
May 31, 2015 at 11:11 PM
I have an application that has been using the MSR.LST.NET.RTP to handle the RTPSession, StreamAdded and to send and receive between instances of the application.

It looks like you library can offer more but i'm not sure if it can work the same way for RTP Multicast?

I've looked at the test samples and most seem for RTSP. I read that I can parse a socket to the RTPClient but have been unsuccessful to get anything going.

Here is what i've tried so far:
            _receiving = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
            IPAddress ip = IPAddress.Parse("");
            _receiving.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.AddMembership, new MulticastOption(ip));
            _receiving.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.MulticastTimeToLive, 118);
            ipep = new IPEndPoint(ip, 1001);
                    System.IAsyncResult connectResult = null;
                    connectResult = _receiving.BeginConnect(_rtspServer, new System.AsyncCallback((iar) =>
                        try { _receiving.EndConnect(iar); }
                        catch { }
                    }), null);

           //         _receiving.Listen(5);
                    //  Get the sender socket to be used by the "server".
                    _sender = _receiving.Accept();

                    //  RtspClient default size
                    byte[] buffer = new byte[8192];

                    _client = new Media.Rtp.RtpClient(new Media.Common.MemorySegment(buffer, Media.Rtsp.RtspMessage.MaximumLength, buffer.Length - Media.Rtsp.RtspMessage.MaximumLength));
                    _client.InterleavedData += ProcessInterleaveData;
                    _client.RtpPacketReceieved += ProcessRtpPacket;

                    Media.Sdp.MediaDescription md = new Media.Sdp.MediaDescription(Media.Sdp.MediaType.video, 999, "H.264", 0);

                    Media.Rtp.RtpClient.TransportContext tc = new Media.Rtp.RtpClient.TransportContext(0, 1,
                        Media.RFC3550.Random32(9876), md, false, _senderSSRC);
                    //  Create a Duplexed reciever using the RtspClient socket.
                    tc.Initialize(_receiving, _receiving);

I am sending frames via a thread:
        public void SendStreamDesktop(byte[] bytesOut)
            RtpPacket testPacket = new RtpPacket(bytesOut, 0, bytesOut.Length);
            RtpFrame testFrame = new RtpFrame(testPacket, true);

Any help or pointers would be great as i would love to test this. Thanks