public static Rtp GetInstance() { if (instance == null) { instance = new Rtp(); } return(instance); }
public Rtsp(string url) { RtspUrl = url; RtspUri = new Uri(RtspUrl, UriKind.Absolute); RtspMessages = new RtspCommands(RtspUrl); RtspSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); RtspEvntArgs = new SocketAsyncEventArgs(); RtpStream = Rtp.GetInstance(); RtspEvntArgs.RemoteEndPoint = new DnsEndPoint(RtspUri.Host, RtspPort); RtspEvntArgs.Completed += RtspEvntArgs_Completed; RtspEvntArgs.SetBuffer(0, MaxBufferSize); CurrentState = State.Init; //RtpStream.DeterminePort(new AsyncCallback(CB)); }
public static Rtp GetInstance() { if (instance == null) instance = new Rtp(); return instance; }