C# Class RtpLib.RtpStream

Class is used to queue up and order RTP packets
Inheritance: Stream
显示文件 Open project: kthompson/RtpLib Class Usage Examples

Public Methods

Method Description
Concat ( byte array1, byte array2 ) : byte[]
Flush ( ) : void

Clears all buffers for this stream and updates position and length accordingly

OnPacketReceived ( object sender, EventArgs e ) : void
Open ( string uri ) : RtpStream
Read ( byte buffer, int offset, int count ) : int
RtpStream ( IPEndPoint localEp ) : System
RtpStream ( int port ) : System
Seek ( long offset, SeekOrigin origin ) : long
SetLength ( long value ) : void
Write ( byte buffer, int offset, int count ) : void

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Private Methods

Method Description
EnsureBufferOf ( long size ) : void

Ensures the buffer of a specified [size]. Throws a [TimeoutException] when it takes longer then 1000ms to fill the buffer.

RunAutoFlush ( ) : void

Internal method to run the auto flush if required.

Method Details

Concat() public static method

public static Concat ( byte array1, byte array2 ) : byte[]
array1 byte
array2 byte
return byte[]

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

Flush() public method

Clears all buffers for this stream and updates position and length accordingly
An I/O error occurs.
public Flush ( ) : void
return void

OnPacketReceived() public method

public OnPacketReceived ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void

Open() public static method

public static Open ( string uri ) : RtpStream
uri string
return RtpStream

Read() public method

public Read ( byte buffer, int offset, int count ) : int
buffer byte
offset int
count int
return int

RtpStream() public method

public RtpStream ( IPEndPoint localEp ) : System
localEp System.Net.IPEndPoint
return System

RtpStream() public method

public RtpStream ( int port ) : System
port int
return System

Seek() public method

public Seek ( long offset, SeekOrigin origin ) : long
offset long
origin SeekOrigin
return long

SetLength() public method

public SetLength ( long value ) : void
value long
return void

Write() public method

public Write ( byte buffer, int offset, int count ) : void
buffer byte
offset int
count int
return void