C# Class NewTOAPIA.Net.Rtp.SdesData

SdesData structure, used extensively among Rtcp and Rtp objects to describe the common properties associated with the Rtp data / Rtcp Participant. See RFC 3550 for definitions on the data it contains.
Inheritance: RtcpData
ファイルを表示 Open project: Wiladams/NewTOAPIA Class Usage Examples

Public Methods

Method Description
GetPrivateExtension ( string prefix ) : string
GetPrivateExtensions ( ) : string>.Dictionary

Gets the private extensions for this stream in a Hashtable with (string, string) key/value pairs.

ReadDataFromBuffer ( BufferChunk buffer ) : void

Deserializes the provided buffer into this object

SdesData ( BufferChunk buffer ) : System

Constructs an SdesData instance by reading its properties from a BufferChunk

SdesData ( SdesData sdes ) : System

Constructs an SdesData instance by reading its properties from another instance

SdesData ( string cName, string name ) : System

Most common constructor, setting the most relevant data

SetPrivateExtension ( string prefix, string data ) : void

Add a private extension to the SDES data This method validates the data will fit in the 255 bytes (length = (1 Byte) = 255 max) available when converted to UTF8 for transmission across the wire and then stores it --------------------------------------------------------------------------------------- Structure: --------------------------------------------------------------------------------------- 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | PRIV=8 | length | prefix length |prefix string... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ... | value string ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

SetTool ( bool wantSet ) : void

Flag indicating whether you want the tool field to be set or not

ToString ( ) : string
WriteDataToBuffer ( BufferChunk buffer ) : void

Serializes this object into the provided buffer

Private Methods

Method Description
GetProperty ( SDESType type ) : string
ReadPrivatePropertyFromBuffer ( BufferChunk buffer ) : void
ReadPropertyFromBuffer ( int type, BufferChunk buffer ) : void
SetCName ( string cName ) : void
SetPrivateExtension ( byte prefix, byte data ) : void
SetProperty ( string data, SDESType type ) : void

--------------------------------------------------------------------------------------- Purpose: --------------------------------------------------------------------------------------- Make sure the data will fit in the 255 bytes (length == 1 byte == byte.MaxValue) available to it when converted to UTF8 for transmission across the wire --------------------------------------------------------------------------------------- General structure of an SDES property: --------------------------------------------------------------------------------------- 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SDES=N | length | data ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

UpdateData ( SdesData sdes ) : bool

This method is called to update the local data from another SdesData

WritePrivatePropertyToBuffer ( byte prefix, byte data, BufferChunk buffer ) : void
WritePropertyToBuffer ( SDESType type, byte data, BufferChunk buffer ) : void

Method Details

GetPrivateExtension() public method

public GetPrivateExtension ( string prefix ) : string
prefix string
return string

GetPrivateExtensions() public method

Gets the private extensions for this stream in a Hashtable with (string, string) key/value pairs.
public GetPrivateExtensions ( ) : string>.Dictionary
return string>.Dictionary

ReadDataFromBuffer() public method

Deserializes the provided buffer into this object
public ReadDataFromBuffer ( BufferChunk buffer ) : void
buffer BufferChunk
return void

SdesData() public method

Constructs an SdesData instance by reading its properties from a BufferChunk
public SdesData ( BufferChunk buffer ) : System
buffer BufferChunk
return System

SdesData() public method

Constructs an SdesData instance by reading its properties from another instance
public SdesData ( SdesData sdes ) : System
sdes SdesData
return System

SdesData() public method

Most common constructor, setting the most relevant data
public SdesData ( string cName, string name ) : System
cName string Canonical name - Unique network identifier for this participant
name string Friendly name for this participant
return System

SetPrivateExtension() public method

Add a private extension to the SDES data This method validates the data will fit in the 255 bytes (length = (1 Byte) = 255 max) available when converted to UTF8 for transmission across the wire and then stores it --------------------------------------------------------------------------------------- Structure: --------------------------------------------------------------------------------------- 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | PRIV=8 | length | prefix length |prefix string... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ... | value string ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
public SetPrivateExtension ( string prefix, string data ) : void
prefix string Name of the extension
data string Value of the extension
return void

SetTool() public method

Flag indicating whether you want the tool field to be set or not
public SetTool ( bool wantSet ) : void
wantSet bool
return void

ToString() public method

public ToString ( ) : string
return string

WriteDataToBuffer() public method

Serializes this object into the provided buffer
public WriteDataToBuffer ( BufferChunk buffer ) : void
buffer BufferChunk
return void