Class VideoEncoder
A video encoder.
Inheritance
Implements
Inherited Members
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public abstract class VideoEncoder : VideoPipe, IVideoInput, IMediaInput<IVideoOutput, IVideoInput, VideoFrame, VideoBuffer, VideoBufferCollection, VideoFormat>, IInput<IVideoOutput, IVideoInput, VideoFrame, VideoBuffer, VideoBufferCollection, VideoFormat>, IVideoOutput, IMediaOutput<IVideoOutput, IVideoInput, VideoFrame, VideoBuffer, VideoBufferCollection, VideoFormat>, IOutput<IVideoOutput, IVideoInput, VideoFrame, VideoBuffer, VideoBufferCollection, VideoFormat>, IVideoElement, IMediaElement, IElement
Constructors
VideoEncoder(VideoFormat, VideoFormat)
Initializes a new instance of the Video
Declaration
public VideoEncoder(VideoFormat inputFormat, VideoFormat outputFormat)
Parameters
Type | Name | Description |
---|---|---|
Video |
inputFormat | The input format. |
Video |
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. |
CanChangeBitrate
Gets whether this pipe can change the output bitrate.
Declaration
protected override bool CanChangeBitrate { get; }
Property Value
Type | Description |
---|---|
System. |
Overrides
ForceKeyFrame
Gets or sets a value indicating whether a keyframe should be forced.
Declaration
public abstract bool ForceKeyFrame { get; set; }
Property Value
Type | Description |
---|---|
System. |
FrameHeight
Gets the last frame height.
Declaration
public int FrameHeight { get; }
Property Value
Type | Description |
---|---|
System. |
FrameRate
Gets the current frame rate.
Declaration
public double FrameRate { get; }
Property Value
Type | Description |
---|---|
System. |
FramesEncoded
Gets the number of encoded frames.
Declaration
public long FramesEncoded { get; }
Property Value
Type | Description |
---|---|
System. |
FrameWidth
Gets the last frame width.
Declaration
public int FrameWidth { get; }
Property Value
Type | Description |
---|---|
System. |
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. |
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. |
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. |
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. |
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. |
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. |
Overrides
StaticOutputBitrate
Gets or sets whether Min
Declaration
public bool StaticOutputBitrate { get; set; }
Property Value
Type | Description |
---|---|
System. |
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. |
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. |
Overrides
Methods
DoProcessControlFrames(MediaControlFrame[])
Processes the control frames.
Declaration
protected override void DoProcessControlFrames(MediaControlFrame[] controlFrames)
Parameters
Type | Name | Description |
---|---|---|
Media |
controlFrames | The control frames. |
Overrides
DoProcessTrackStatsFromOutput(MediaTrackStats)
Processes track stats from an output.
Declaration
protected override void DoProcessTrackStatsFromOutput(MediaTrackStats trackStats)
Parameters
Type | Name | Description |
---|---|---|
Media |
trackStats | The track stats. |
Overrides
ProcessFrame(VideoFrame)
Processes the frame.
Declaration
public override bool ProcessFrame(VideoFrame frame)
Parameters
Type | Name | Description |
---|---|---|
Video |
frame | The frame. |
Returns
Type | Description |
---|---|
System. |
Overrides
RaiseFrame(VideoFrame)
Raises the frame.
Declaration
protected override void RaiseFrame(VideoFrame frame)
Parameters
Type | Name | Description |
---|---|---|
Video |
frame | The frame. |
Overrides
Events
OnBitrateChange
Raised when the bitrate changes.
Declaration
public event Action0 OnBitrateChange
Event Type
Type | Description |
---|---|
Action0 |