Class MediaCodecEncoder
A MediaCodec Encoder.
Inheritance
System.Object
MediaPipe<IVideoOutput, IVideoOutputCollection, IVideoInput, IVideoInputCollection, VideoPipe, VideoFrame, VideoBuffer, VideoBufferCollection, VideoFormat>
MediaCodecEncoder
Implements
Inherited Members
Namespace: FM.LiveSwitch.Android
Assembly: FM.LiveSwitch.Android.dll
Syntax
public class MediaCodecEncoder : 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
MediaCodecEncoder(MediaCodecInfo, IVideoOutput, VideoFormat)
Initializes a new instance of the MediaCodecEncoder class.
Declaration
public MediaCodecEncoder(MediaCodecInfo encoderInfo, IVideoOutput input, VideoFormat outputFormat)
Parameters
Type | Name | Description |
---|---|---|
MediaCodecInfo | encoderInfo | The encoder information. |
IVideoOutput | input | The input. |
VideoFormat | outputFormat | The output format. |
MediaCodecEncoder(MediaCodecInfo, VideoFormat, VideoFormat)
Initializes a new instance of the MediaCodecEncoder class.
Declaration
public MediaCodecEncoder(MediaCodecInfo encoderInfo, VideoFormat inputFormat, VideoFormat outputFormat)
Parameters
Type | Name | Description |
---|---|---|
MediaCodecInfo | encoderInfo | The encoder information. |
VideoFormat | inputFormat | The input format. |
VideoFormat | outputFormat | The output format. |
Properties
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
MaxCodecBitrate
Declaration
public override int MaxCodecBitrate { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Overrides
MinCodecBitrate
Declaration
public override int MinCodecBitrate { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Overrides
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)
Encode(VideoBuffer, VideoFormat)
Encodes the specified input buffer.
Declaration
public void Encode(VideoBuffer inputBuffer, VideoFormat outputFormat)
Parameters
Type | Name | Description |
---|---|---|
VideoBuffer | inputBuffer | The input buffer. |
VideoFormat | outputFormat | The output format. |