예제 #1
0
 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));
 }
예제 #2
0
 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));
 }