Class Decoder
An OpenH264-based decoder.
Inheritance
System.Object
MediaPipe<IVideoOutput, IVideoOutputCollection, IVideoInput, IVideoInputCollection, VideoPipe, VideoFrame, VideoBuffer, VideoBufferCollection, VideoFormat>
Decoder
Implements
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: FM.LiveSwitch.OpenH264
Assembly: FM.LiveSwitch.OpenH264.dll
Syntax
public class Decoder : VideoDecoder, 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
Decoder()
Initializes a new instance of the Decoder class.
Declaration
public Decoder()
Decoder(ProfileLevelId)
Initializes a new instance of the Decoder class with a profile level ID.
Declaration
public Decoder(ProfileLevelId profileLevelId)
Parameters
Type | Name | Description |
---|---|---|
ProfileLevelId | profileLevelId | The profile level ID. |
Decoder(IVideoOutput)
Initializes a new instance of the Decoder class.
Declaration
public Decoder(IVideoOutput input)
Parameters
Type | Name | Description |
---|---|---|
IVideoOutput | input | The input. |
Decoder(IVideoOutput, ProfileLevelId)
Initializes a new instance of the Decoder class.
Declaration
public Decoder(IVideoOutput input, ProfileLevelId profileLevelId)
Parameters
Type | Name | Description |
---|---|---|
IVideoOutput | input | The input. |
ProfileLevelId | profileLevelId | The profile level ID. |
Properties
CodecConfig
Gets the decoder configuration.
Declaration
public DecoderConfig CodecConfig { get; }
Property Value
Type | Description |
---|---|
DecoderConfig |
Label
Gets a label that identifies this class.
Declaration
public override string Label { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
FM.LiveSwitch.MediaPipe<FM.LiveSwitch.IVideoOutput, FM.LiveSwitch.IVideoOutputCollection, FM.LiveSwitch.IVideoInput, FM.LiveSwitch.IVideoInputCollection, FM.LiveSwitch.VideoPipe, FM.LiveSwitch.VideoFrame, FM.LiveSwitch.VideoBuffer, FM.LiveSwitch.VideoBufferCollection, FM.LiveSwitch.VideoFormat>.Label
NeedsKeyFrame
Gets a value indicating whether the decoder needs a key frame.
Declaration
public bool NeedsKeyFrame { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
ProfileLevelId
Gets the profile level identifier.
Declaration
public ProfileLevelId ProfileLevelId { get; }
Property Value
Type | Description |
---|---|
ProfileLevelId |
Methods
DoDestroy()
Destroys this instance.
Declaration
protected override void DoDestroy()
Overrides
FM.LiveSwitch.MediaPipe<FM.LiveSwitch.IVideoOutput, FM.LiveSwitch.IVideoOutputCollection, FM.LiveSwitch.IVideoInput, FM.LiveSwitch.IVideoInputCollection, FM.LiveSwitch.VideoPipe, FM.LiveSwitch.VideoFrame, FM.LiveSwitch.VideoBuffer, FM.LiveSwitch.VideoBufferCollection, FM.LiveSwitch.VideoFormat>.DoDestroy()
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
IsKeyFrame(DataBuffer)
Determines whether a data buffer represents a keyframe.
Declaration
protected override bool IsKeyFrame(DataBuffer dataBuffer)
Parameters
Type | Name | Description |
---|---|---|
DataBuffer | dataBuffer | The data buffer. |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
SetCodecConfig(DecoderConfig)
Sets the decoder configuration.
Declaration
public int SetCodecConfig(DecoderConfig config)
Parameters
Type | Name | Description |
---|---|---|
DecoderConfig | config |
Returns
Type | Description |
---|---|
System.Int32 | 0 on success, non-zero on failure. |