Class MediaBuffer<TFormat, TBuffer>
A media buffer.
Inheritance
Inherited Members
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public abstract class MediaBuffer<TFormat, TBuffer> : Dynamic where TFormat : MediaFormat<TFormat> where TBuffer : MediaBuffer<TFormat, TBuffer>
Type Parameters
Name | Description |
---|---|
TFormat | The type of the format. |
TBuffer | The type of the buffer. |
Constructors
MediaBuffer()
Initializes a new instance of the MediaBuffer<TFormat, TBuffer> class.
Declaration
protected MediaBuffer()
MediaBuffer(DataBuffer, TFormat)
Initializes a new instance of the MediaBuffer<TFormat, TBuffer> class.
Declaration
protected MediaBuffer(DataBuffer dataBuffer, TFormat format)
Parameters
Type | Name | Description |
---|---|---|
DataBuffer | dataBuffer | The data buffer. |
TFormat | format | The format. |
MediaBuffer(DataBuffer[], TFormat)
Initializes a new instance of the MediaBuffer<TFormat, TBuffer> class.
Declaration
protected MediaBuffer(DataBuffer[] dataBuffers, TFormat format)
Parameters
Type | Name | Description |
---|---|---|
DataBuffer[] | dataBuffers | The data buffers. |
TFormat | format | The format. |
Properties
DataBuffer
Gets or sets the data buffer.
Declaration
public DataBuffer DataBuffer { get; set; }
Property Value
Type | Description |
---|---|
DataBuffer |
DataBuffers
Gets or sets the data buffers.
Declaration
public DataBuffer[] DataBuffers { get; set; }
Property Value
Type | Description |
---|---|
DataBuffer[] |
Footprint
Gets the approximate footprint of this media buffer by returning the sum of its data buffer lengths.
Declaration
public int Footprint { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Format
Gets or sets the format.
Declaration
public TFormat Format { get; set; }
Property Value
Type | Description |
---|---|
TFormat |
IsMuted
Gets a value indicating whether this instance has been muted.
Declaration
public abstract bool IsMuted { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
LastSequenceNumber
Gets or sets the last sequence number.
Declaration
public long LastSequenceNumber { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
RecoveredByFec
Gets or sets a value indicating whether this buffer contains data recovered by forward error correction (FEC).
Declaration
public bool RecoveredByFec { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
RtpHeader
Gets or sets the Rtp Packet Header for this media buffer.
Declaration
public RtpPacketHeader RtpHeader { get; set; }
Property Value
Type | Description |
---|---|
RtpPacketHeader |
RtpHeaders
Gets or sets the RTP Packet Headers for this media buffer.
Declaration
public RtpPacketHeader[] RtpHeaders { get; set; }
Property Value
Type | Description |
---|---|
RtpPacketHeader[] |
RtpSequenceNumber
Gets or sets the RTP sequence number.
Declaration
public int RtpSequenceNumber { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
RtpSequenceNumbers
Gets or sets the RTP sequence numbers.
Declaration
public int[] RtpSequenceNumbers { get; }
Property Value
Type | Description |
---|---|
System.Int32[] |
SequenceNumber
Gets or sets the sequence number.
Declaration
public long SequenceNumber { get; set; }
Property Value
Type | Description |
---|---|
System.Int64 |
SequenceNumbers
Gets or sets the sequence numbers.
Declaration
public long[] SequenceNumbers { get; set; }
Property Value
Type | Description |
---|---|
System.Int64[] |
SourceId
Gets or sets the source identifier.
Declaration
public string SourceId { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Methods
Clone()
Clones this instance.
Declaration
public virtual TBuffer Clone()
Returns
Type | Description |
---|---|
TBuffer |
CreateInstance()
Creates a new instance.
Declaration
protected abstract TBuffer CreateInstance()
Returns
Type | Description |
---|---|
TBuffer |
Free()
Frees the data buffers referenced by this instance.
Declaration
public TBuffer Free()
Returns
Type | Description |
---|---|
TBuffer | This instance. |
Keep()
Keeps the data buffers referenced by this instance.
Declaration
public TBuffer Keep()
Returns
Type | Description |
---|---|
TBuffer | This instance. |
Mute()
Mutes this instance. This is a one-way operation that clears
the underlying data buffer. If the buffer has an unsupported
format, this method will return false
.
Declaration
public abstract bool Mute()
Returns
Type | Description |
---|---|
System.Boolean |
ToString()
Returns a string that represents this instance.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
TryKeep()
Attempts to keep the data buffers referenced by this instance.
Declaration
public bool TryKeep()
Returns
Type | Description |
---|---|
System.Boolean | True if succeeded. |