Class AudioDecoder
An audio decoder.
Inheritance
Implements
Inherited Members
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public abstract class AudioDecoder : AudioPipe, IAudioInput, IMediaInput<IAudioOutput, IAudioInput, AudioFrame, AudioBuffer, AudioBufferCollection, AudioFormat>, IInput<IAudioOutput, IAudioInput, AudioFrame, AudioBuffer, AudioBufferCollection, AudioFormat>, IAudioOutput, IMediaOutput<IAudioOutput, IAudioInput, AudioFrame, AudioBuffer, AudioBufferCollection, AudioFormat>, IOutput<IAudioOutput, IAudioInput, AudioFrame, AudioBuffer, AudioBufferCollection, AudioFormat>, IAudioElement, IMediaElement, IElement
Constructors
AudioDecoder(AudioFormat, AudioFormat)
Initializes a new instance of the AudioDecoder class.
Declaration
public AudioDecoder(AudioFormat inputFormat, AudioFormat outputFormat)
Parameters
Type | Name | Description |
---|---|---|
AudioFormat | inputFormat | The input format. |
AudioFormat | outputFormat | The output format. |
Properties
DisablePlc
Gets or sets a value indicating whether to disable packet loss concealment (PLC).
Declaration
public bool DisablePlc { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
FramesDecoded
Gets the number of decoded frames.
Declaration
public long FramesDecoded { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
MaxInputBitrate
Gets the maximum allowed input bitrate, in kbps. A value of -1 indicates unset (no maximum). Returns -1 by default.
Declaration
public override int MaxInputBitrate { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Overrides
MaxOutputBitrate
Gets the maximum allowed output bitrate, in kbps. A value of -1 indicates unset (no maximum). Returns -1 by default.
Declaration
public override int MaxOutputBitrate { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Overrides
MinInputBitrate
Gets the minimum allowed input bitrate, in kbps. A value of -1 indicates unset (no maximum). Returns -1 by default.
Declaration
public override int MinInputBitrate { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Overrides
MinOutputBitrate
Gets the minimum allowed output bitrate, in kbps. A value of -1 indicates unset (no minimum). Returns -1 by default.
Declaration
public override int MinOutputBitrate { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Overrides
MissingDuration
Gets or sets the number of milliseconds missing in the stream between the last frame processed and the current frame. This value is updated constantly, just before a frame is processed.
Declaration
protected int MissingDuration { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
DoProcessTrackStatsFromInput(MediaTrackStats)
Process track stats from an input.
Declaration
protected override void DoProcessTrackStatsFromInput(MediaTrackStats trackStats)
Parameters
Type | Name | Description |
---|---|---|
MediaTrackStats | trackStats | The track stats. |
Overrides
GeneratePlc(Int32)
Generates a PLC buffer. This method uses the DataBufferPool so the returned value MUST be freed.
Declaration
protected AudioBuffer GeneratePlc(int duration)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | duration |
Returns
Type | Description |
---|---|
AudioBuffer |
ProcessFrame(AudioFrame)
Processes a frame.
Declaration
public override bool ProcessFrame(AudioFrame frame)
Parameters
Type | Name | Description |
---|---|---|
AudioFrame | frame | The frame. |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
RaiseFrame(AudioFrame)
Raises a frame.
Declaration
protected override void RaiseFrame(AudioFrame frame)
Parameters
Type | Name | Description |
---|---|---|
AudioFrame | frame | The frame. |