Class RtpPacketHeader
An RTP packet header.
Inheritance
Inherited Members
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public class RtpPacketHeader
Constructors
RtpPacketHeader()
Creates a new instance of the RtpPacketHeader class.
Declaration
public RtpPacketHeader()
Properties
ContributingSourceCount
Gets or sets the number of contributing sources.
Declaration
public int ContributingSourceCount { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
ContributingSources
Gets or sets the contributing sources.
Declaration
public long[] ContributingSources { get; set; }
Property Value
Type | Description |
---|---|
System.Int64[] |
Extension
Gets or sets if there is an extension.
Declaration
public bool Extension { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
FixedHeaderLength
Gets the length of the fixed header.
Declaration
public static int FixedHeaderLength { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
HeaderExtension
Gets or sets the header extension.
Declaration
public IRtpHeaderExtension HeaderExtension { get; set; }
Property Value
Type | Description |
---|---|
IRtpHeaderExtension |
Marker
Gets or sets if the marker bit is set.
Declaration
public bool Marker { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Padding
Gets or sets if the packet has padding.
Declaration
public bool Padding { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
PaddingLength
Gets the number of bytes of padding.
Declaration
public int PaddingLength { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
PayloadType
Gets or sets the payload type.
Declaration
public int PayloadType { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
SequenceNumber
Gets or sets the sequence number.
Declaration
public int SequenceNumber { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
SynchronizationSource
Gets or sets the synchronization source.
Declaration
public long SynchronizationSource { get; set; }
Property Value
Type | Description |
---|---|
System.Int64 |
Timestamp
Gets or sets the timestamp.
Declaration
public long Timestamp { get; set; }
Property Value
Type | Description |
---|---|
System.Int64 |
Version
Gets or sets the version of the packet. Should be 2.
Declaration
public int Version { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
CalculateHeaderLength()
Calculates the length of the header. At least 12 bytes.
Declaration
public int CalculateHeaderLength()
Returns
Type | Description |
---|---|
System.Int32 |
Clone()
Clones this instance.
Declaration
public RtpPacketHeader Clone()
Returns
Type | Description |
---|---|
RtpPacketHeader |
ReadFrom(DataBuffer)
Reads a header from a buffer. If padding exists, also calculates the padding length.
Declaration
public static RtpPacketHeader ReadFrom(DataBuffer buffer)
Parameters
Type | Name | Description |
---|---|---|
DataBuffer | buffer | The source buffer |
Returns
Type | Description |
---|---|
RtpPacketHeader |
WriteTo(DataBuffer, Int32)
Writes this header to a buffer starting at the offset.
Declaration
public void WriteTo(DataBuffer buffer, int offset)
Parameters
Type | Name | Description |
---|---|---|
DataBuffer | buffer | The target buffer. |
System.Int32 | offset | The starting offset. |