Android.Media.MediaCodec.CreateDecoderByType Method
Instantiate a decoder supporting input data of the given mime type.

Syntax

[Android.Runtime.Register("createDecoderByType", "(Ljava/lang/String;)Landroid/media/MediaCodec;", "")]
public static MediaCodec CreateDecoderByType (string type)

Parameters

type
The mime type of the input data.

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.IO.IOExceptionif the codec cannot be created.
Java.Lang.IllegalArgumentExceptionif type is not a valid mime type.
Java.Lang.NullPointerExceptionif type is null.

Remarks

Instantiate a decoder supporting input data of the given mime type. The following is a partial list of defined mime types and their semantics:

  • "video/x-vnd.on2.vp8" - VP8 video (i.e. video in .webm)
  • "video/x-vnd.on2.vp9" - VP9 video (i.e. video in .webm)
  • "video/avc" - H.264/AVC video
  • "video/hevc" - H.265/HEVC video
  • "video/mp4v-es" - MPEG4 video
  • "video/3gpp" - H.263 video
  • "audio/3gpp" - AMR narrowband audio
  • "audio/amr-wb" - AMR wideband audio
  • "audio/mpeg" - MPEG1/2 audio layer III
  • "audio/mp4a-latm" - AAC audio (note, this is raw AAC packets, not packaged in LATM!)
  • "audio/vorbis" - vorbis audio
  • "audio/g711-alaw" - G.711 alaw audio
  • "audio/g711-mlaw" - G.711 ulaw audio

[Android Documentation]

Requirements

Namespace: Android.Media
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 16