コード例 #1
0
        public void RTSPTransportHeaderParseTest()
        {
            string header = "RTP/AVP;unicast;destination=192.168.33.170;source=192.168.33.103;client_port=61132-61133;server_port=6970-6971";

            var transportHeader = RTSPTransportHeader.Parse(header);

            Assert.AreEqual("RTP/AVP", transportHeader.TransportSpecifier);
            Assert.AreEqual("unicast", transportHeader.BroadcastType);
            Assert.AreEqual("192.168.33.170", transportHeader.Destination);
            Assert.AreEqual("192.168.33.103", transportHeader.Source);
            Assert.AreEqual("61132-61133", transportHeader.ClientRTPPortRange);
            Assert.AreEqual("6970-6971", transportHeader.ServerRTPPortRange);
        }
コード例 #2
0
        public void RTSPTransportHeaderParseTest()
        {
            logger.LogDebug("--> " + System.Reflection.MethodBase.GetCurrentMethod().Name);
            logger.BeginScope(System.Reflection.MethodBase.GetCurrentMethod().Name);

            string header = "RTP/AVP;unicast;destination=192.168.33.170;source=192.168.33.103;client_port=61132-61133;server_port=6970-6971";

            var transportHeader = RTSPTransportHeader.Parse(header);

            Assert.Equal("RTP/AVP", transportHeader.TransportSpecifier);
            Assert.Equal("unicast", transportHeader.BroadcastType);
            Assert.Equal("192.168.33.170", transportHeader.Destination);
            Assert.Equal("192.168.33.103", transportHeader.Source);
            Assert.Equal("61132-61133", transportHeader.ClientRTPPortRange);
            Assert.Equal("6970-6971", transportHeader.ServerRTPPortRange);
        }