Class MediaCodecDecoder
A MediaCodec decoder.
Inheritance
System.Object
MediaPipe<IVideoOutput, IVideoOutputCollection, IVideoInput, IVideoInputCollection, VideoPipe, VideoFrame, VideoBuffer, VideoBufferCollection, VideoFormat>
MediaCodecDecoder
Implements
Inherited Members
Namespace: FM.LiveSwitch.Android
Assembly: FM.LiveSwitch.Android.dll
Syntax
public class MediaCodecDecoder : 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
MediaCodecDecoder(MediaCodecInfo, IVideoOutput, VideoFormat)
Initializes a new instance of the MediaCodecDecoder class.
Declaration
public MediaCodecDecoder(MediaCodecInfo decoderInfo, IVideoOutput input, VideoFormat outputFormat)
Parameters
Type | Name | Description |
---|---|---|
MediaCodecInfo | decoderInfo | The decoder information. |
IVideoOutput | input | The input. |
VideoFormat | outputFormat | The output format. |
MediaCodecDecoder(MediaCodecInfo, VideoFormat, VideoFormat)
Initializes a new instance of the MediaCodecDecoder class.
Declaration
public MediaCodecDecoder(MediaCodecInfo decoderInfo, VideoFormat inputFormat, VideoFormat outputFormat)
Parameters
Type | Name | Description |
---|---|---|
MediaCodecInfo | decoderInfo | The decoder information. |
VideoFormat | inputFormat | The input format. |
VideoFormat | outputFormat | The output format. |
Properties
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 or sets a boolean indicating if decoder needs a key frame.
Declaration
public bool NeedsKeyFrame { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
Decode(VideoBuffer)
Decodes the specified input buffer.
Declaration
public void Decode(VideoBuffer inputBuffer)
Parameters
Type | Name | Description |
---|---|---|
VideoBuffer | inputBuffer | The input buffer. |
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 buffer)
Parameters
Type | Name | Description |
---|---|---|
VideoFrame | frame | The frame. |
VideoBuffer | buffer | The 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 |