Class VideoDecoder
A video decoder.
Inheritance
Implements
Inherited Members
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public abstract class VideoDecoder : 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
VideoDecoder(VideoFormat, VideoFormat)
Initializes a new instance of the VideoDecoder class.
Declaration
public VideoDecoder(VideoFormat inputFormat, VideoFormat outputFormat)
Parameters
Type | Name | Description |
---|---|---|
VideoFormat | inputFormat | The input format. |
VideoFormat | outputFormat | The output format. |
Properties
DelayDecode
Gets a value indicating whether decoding should be delayed.
Declaration
protected bool DelayDecode { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
DelayDecodeOnPendingKeyFrame
Gets or sets a flag indicating whether decoding should be bypassed for incoming media packets when a key frame request has been made via a PLI message. Default is true.
Declaration
public bool DelayDecodeOnPendingKeyFrame { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
FrameHeight
Gets the last frame height.
Declaration
public int FrameHeight { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
FrameRate
Gets the current frame rate.
Declaration
public double FrameRate { get; }
Property Value
Type | Description |
---|---|
System.Double |
FramesDecoded
Gets the number of decoded frames.
Declaration
public long FramesDecoded { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
FrameWidth
Gets the last frame width.
Declaration
public int FrameWidth { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
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
Methods
DoProcessFrame(VideoFrame, VideoBuffer)
Processes a frame.
Declaration
protected override void DoProcessFrame(VideoFrame frame, VideoBuffer inputBuffer)
Parameters
Type | Name | Description |
---|---|---|
VideoFrame | frame | The frame. |
VideoBuffer | inputBuffer | The input buffer. |
Overrides
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
IsKeyFrame(DataBuffer)
Determines whether a data buffer represents a keyframe.
Declaration
protected abstract bool IsKeyFrame(DataBuffer dataBuffer)
Parameters
Type | Name | Description |
---|---|---|
DataBuffer | dataBuffer | The data buffer. |
Returns
Type | Description |
---|---|
System.Boolean |
RaiseFrame(VideoFrame)
Raises a frame.
Declaration
protected override void RaiseFrame(VideoFrame frame)
Parameters
Type | Name | Description |
---|---|---|
VideoFrame | frame | The frame. |
Overrides
SendKeyFrameRequest(String)
Sends a key-frame request.
Declaration
protected void SendKeyFrameRequest(string reason)
Parameters
Type | Name | Description |
---|---|---|
System.String | reason |