Class Encoder
An OpenH264-based encoder.
Inheritance
System.Object
MediaPipe<IVideoOutput, IVideoOutputCollection, IVideoInput, IVideoInputCollection, VideoPipe, VideoFrame, VideoBuffer, VideoBufferCollection, VideoFormat>
Encoder
Implements
Inherited Members
Namespace: FM.LiveSwitch.OpenH264
Assembly: FM.LiveSwitch.OpenH264.dll
Syntax
public class Encoder : VideoEncoder, 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
Encoder()
Initializes a new instance of the Encoder class.
Declaration
public Encoder()
Encoder(ProfileLevelId)
Initializes a new instance of the Encoder class with a profile level ID.
Declaration
public Encoder(ProfileLevelId profileLevelId)
Parameters
Type | Name | Description |
---|---|---|
ProfileLevelId | profileLevelId | The profile level ID. |
Encoder(IVideoOutput)
Initializes a new instance of the Encoder class.
Declaration
public Encoder(IVideoOutput input)
Parameters
Type | Name | Description |
---|---|---|
IVideoOutput | input | The input. |
Encoder(IVideoOutput, ProfileLevelId)
Initializes a new instance of the Encoder class.
Declaration
public Encoder(IVideoOutput input, ProfileLevelId profileLevelId)
Parameters
Type | Name | Description |
---|---|---|
IVideoOutput | input | The input. |
ProfileLevelId | profileLevelId | The profile level ID. |
Properties
CodecConfig
Gets a copy of the encoder configuration.
Declaration
public EncoderConfig CodecConfig { get; }
Property Value
Type | Description |
---|---|
EncoderConfig |
ForceKeyFrame
Gets or sets a value indicating whether a keyframe should be forced.
Declaration
public override bool ForceKeyFrame { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
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
ProfileLevelId
Gets the profile level identifier.
Declaration
public ProfileLevelId ProfileLevelId { get; }
Property Value
Type | Description |
---|---|
ProfileLevelId |
Quality
Gets or sets the target output quality.
Declaration
public double Quality { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The quality. |
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
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>.DoProcessFrame(FM.LiveSwitch.VideoFrame, FM.LiveSwitch.VideoBuffer)
SetCodecConfig(EncoderConfig)
Sets the encoder configuration.
Declaration
public int SetCodecConfig(EncoderConfig config)
Parameters
Type | Name | Description |
---|---|---|
EncoderConfig | config |
Returns
Type | Description |
---|---|
System.Int32 | 0 on success, non-zero on failure. |