The members of Android.Media.MediaCodec are listed below.
See Also: Inherited members from Java.Lang.Object
const | BufferFlagCodecConfig | MediaCodecBufferFlags (2). This indicated that the buffer marked as such contains codec initialization / codec specific data instead of media data. |
const | BufferFlagEndOfStream | MediaCodecBufferFlags (4). This signals the end of stream, i.e. no buffers will be available after this, unless of course, MediaCodec.Flush follows. |
const | BufferFlagKeyFrame | MediaCodecBufferFlags (1). This indicates that the (encoded) buffer marked as such contains the data for a key frame. |
const | BufferFlagSyncFrame | MediaCodecBufferFlags (1). This indicates that the (encoded) buffer marked as such contains the data for a key frame. |
const | ConfigureFlagEncode | MediaCodecConfigFlags (1). If this codec is to be used as an encoder, pass this flag. |
const | CryptoModeAesCtr | MediaCodecCryptoMode (1). |
const | CryptoModeUnencrypted | MediaCodecCryptoMode (0). |
const | InfoOutputBuffersChanged | MediaCodecInfoState (-3). The output buffers have changed, the client must refer to the new set of output buffers returned by MediaCodec.GetOutputBuffers from this point on. |
const | InfoOutputFormatChanged | MediaCodecInfoState (-2). The output format has changed, subsequent data will follow the new format. |
const | InfoTryAgainLater | MediaCodecInfoState (-1). If a non-negative timeout had been specified in the call to MediaCodec.DequeueOutputBuffer(.BufferInfo, System.Int64), indicates that the call timed out. |
const | ParameterKeyRequestSyncFrame | string. Request that the encoder produce a sync frame "soon". |
const | ParameterKeySuspend | string. Temporarily suspend/resume encoding of input data. |
const | ParameterKeyVideoBitrate | string. Change a video encoder's target bitrate on the fly. |
const | VideoScalingModeScaleToFit | VideoScalingMode (1). The content is scaled to the surface dimensions |
const | VideoScalingModeScaleToFitWithCropping | VideoScalingMode (2). The content is scaled, maintaining its aspect ratio, the whole surface area is used, content may be cropped |
[read-only] | CodecInfo | MediaCodecInfo. Get the codec info. |
[read-only] | InputFormat | MediaFormat. Call this after MediaCodec.Configure(MediaFormat, Android.Views.Surface, Android.Views.Surface, Android.Views.Surface) returns successfully to get the input format accepted by the codec. |
[read-only] | Name | string. Get the component name. |
[read-only] | OutputFormat | MediaFormat. Call this after dequeueOutputBuffer signals a format change by returning MediaCodec.InfoOutputFormatChanged. |
[read-only] override | ThresholdClass | IntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code. |
[read-only] override | ThresholdType | Type. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code. |
Configure(MediaFormat, Android.Views.Surface, MediaCrypto, MediaCodecConfigFlags)Configures a component. | ||
static | CreateByCodecName(string)If you know the exact name of the component you want to instantiate use this method to instantiate it. | |
static | CreateDecoderByType(string)Instantiate a decoder supporting input data of the given mime type. | |
static | CreateEncoderByType(string)Instantiate an encoder supporting output data of the given mime type. | |
CreateInputSurface()Requests a Surface to use as the input to an encoder, in place of input buffers. | ||
DequeueInputBuffer(long)Returns the index of an input buffer to be filled with valid data or -1 if no such buffer is currently available. | ||
DequeueOutputBuffer(MediaCodec.BufferInfo, long)Dequeue an output buffer, block at most "timeoutUs" microseconds. | ||
Flush()Flush both input and output ports of the component, all indices previously returned in calls to MediaCodec.DequeueInputBuffer(long) and MediaCodec.DequeueOutputBuffer(.BufferInfo, System.Int64) become invalid. | ||
GetInputBuffer(int)Returns a Java.Nio.Buffer.Clear, writable ByteBuffer object for a dequeued input buffer index to contain the input data. | ||
GetInputBuffers()Retrieve the set of input buffers. | ||
GetInputImage(int)Returns a writable Image object for a dequeued input buffer index to contain the raw input video frame. | ||
GetOutputBuffer(int)Returns a read-only ByteBuffer for a dequeued output buffer index. | ||
GetOutputBuffers()Retrieve the set of output buffers. | ||
GetOutputFormat(int)Returns the output format for a specific output buffer. | ||
GetOutputImage(int)Returns a read-only Image object for a dequeued output buffer index that contains the raw video frame. | ||
QueueInputBuffer(int, int, int, long, MediaCodecBufferFlags)After filling a range of the input buffer at the specified index submit it to the component. | ||
QueueSecureInputBuffer(int, int, MediaCodec.CryptoInfo, long, MediaCodecBufferFlags)Similar to MediaCodec.QueueInputBuffer(int, System.Int32, System.Int32, System.Int32, System.Int32) but submits a buffer that is potentially encrypted. | ||
Release()Make sure you call this when you're done to free up any opened component instance instead of relying on the garbage collector to do this for you at some point in the future. | ||
ReleaseOutputBuffer(int, bool)If you are done with a buffer, use this call to return the buffer to the codec. | ||
ReleaseOutputBuffer(int, long)If you are done with a buffer, use this call to update its surface timestamp and return it to the codec to render it on the output surface. | ||
Reset()Returns the codec to its initial (Initialized) state. | ||
SetCallback(MediaCodec.Callback)Sets an asynchronous callback for actionable MediaCodec events. | ||
SetParameters(Android.OS.Bundle)Communicate additional parameter changes to the component instance. | ||
SetVideoScalingMode(VideoScalingMode)If a surface has been specified in a previous call to MediaCodec.Configure(MediaFormat, Android.Views.Surface, Android.Views.Surface, Android.Views.Surface) specifies the scaling mode to use. | ||
SignalEndOfInputStream()Signals end-of-stream on input. | ||
Start()After successfully configuring the component, call start. | ||
Stop()Finish the decode/encode session, note that the codec instance remains active and ready to be MediaCodec.Started again. |