Exemple #1
0
        private void SetSdpInformation(Sdp sdp)
        {
            var address = sdp.Parameters.FirstOrDefault(a => a.Key == "c").Value.Split(' ').Last();

            var remotePort =
                sdp.Parameters.FirstOrDefault(a => a.Key == "m" && a.Value.StartsWith("audio"))
                .Value.Split(' ')
                .Skip(1)
                .First();

            this.rtp.SetRemoteEndpoint(new IPEndPoint(IPAddress.Parse(address), int.Parse(remotePort)));
        }
Exemple #2
0
            public static Sdp GetBody(ByteStream bs, string contentType)
            {
                var sdp = Sdp.Deserialize(contentType, bs.Lines().TakeWhile(a => a != string.Empty));

                return(sdp);
            }