Class AudioEncoder
An audio encoder.
Inheritance
Implements
Inherited Members
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public abstract class AudioEncoder : 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
AudioEncoder(AudioFormat, AudioFormat)
Initializes a new instance of the AudioEncoder class.
Declaration
public AudioEncoder(AudioFormat inputFormat, AudioFormat outputFormat)
Parameters
Type | Name | Description |
---|---|---|
AudioFormat | inputFormat | The input format. |
AudioFormat | outputFormat | The output format. |
Properties
Bitrate
Gets or sets the current bitrate, in kbps. A value of -1 indicates unset.
Declaration
public virtual int Bitrate { get; protected set; }
Property Value
Type | Description |
---|---|
System.Int32 |
CanChangeBitrate
Gets whether this pipe can change the output bitrate.
Declaration
protected override bool CanChangeBitrate { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
FramesEncoded
Gets the number of encoded frames.
Declaration
public long FramesEncoded { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
MaxBitrate
Gets or sets the maximum bitrate, in kbps. A value of -1 indicates unset (no maximum).
Declaration
public virtual int MaxBitrate { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
MaxCodecBitrate
Gets the maximum possible codec bitrate, in kbps. A value of -1 indicates unset (no maximum).
Declaration
public virtual int MaxCodecBitrate { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
MaxOutputBitrate
Gets or sets the maximum output bitrate, in kbps. A value of -1 indicates unset (no maximum).
Declaration
public override int MaxOutputBitrate { get; protected set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Overrides
MinBitrate
Gets or sets the minimum bitrate, in kbps. A value of -1 indicates unset (no minimum).
Declaration
public virtual int MinBitrate { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
MinCodecBitrate
Gets the minimum possible codec bitrate, in kbps. A value of -1 indicates unset (no minimum).
Declaration
public virtual int MinCodecBitrate { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
MinOutputBitrate
Gets or sets the minimum output bitrate, in kbps. A value of -1 indicates unset (no minimum).
Declaration
public override int MinOutputBitrate { get; protected set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Overrides
StaticOutputBitrate
Gets or sets whether MinOutputBitrate and MaxOutputBitrate should return MinCodecBitrate and MaxCodecBitrate, respectively, or response to changes in MinBitrate and MaxBitrate.
Declaration
public bool StaticOutputBitrate { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
TargetBitrate
Gets or sets the target bitrate, in kbps. A value of -1 indicates unset (no target).
Declaration
public virtual int TargetBitrate { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
TargetOutputBitrate
Gets or sets the target output bitrate, in kbps. A value of -1 indicates unset (no target).
Declaration
public override int TargetOutputBitrate { get; protected set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Overrides
Methods
DoProcessTrackStatsFromOutput(MediaTrackStats)
Processes track stats from an output.
Declaration
protected override void DoProcessTrackStatsFromOutput(MediaTrackStats trackStats)
Parameters
Type | Name | Description |
---|---|---|
MediaTrackStats | trackStats | The track stats. |
Overrides
RaiseFrame(AudioFrame)
Raises the frame.
Declaration
protected override void RaiseFrame(AudioFrame frame)
Parameters
Type | Name | Description |
---|---|---|
AudioFrame | frame | The frame. |
Overrides
Events
OnBitrateChange
Raised when the bitrate changes.
Declaration
public event Action0 OnBitrateChange
Event Type
Type | Description |
---|---|
Action0 |