Android.Media.MediaCodecInfo Class
Provides information about a given media codec available on the device.

See Also: MediaCodecInfo Members

Syntax

[Android.Runtime.Register("android/media/MediaCodecInfo", DoNotGenerateAcw=true)]
public sealed class MediaCodecInfo : Java.Lang.Object

Remarks

Provides information about a given media codec available on the device. You can iterate through all codecs available by querying Android.Media.MediaCodecList. For example, here's how to find an encoder that supports a given MIME type:

java Example

 private static MediaCodecInfo selectCodec(String mimeType) {
     int numCodecs = MediaCodecList.getCodecCount();
     for (int i = 0; i < numCodecs; i++) {
         MediaCodecInfo codecInfo = MediaCodecList.getCodecInfoAt(i);

         if (!codecInfo.isEncoder()) {
             continue;
         }

         String[] types = codecInfo.getSupportedTypes();
         for (int j = 0; j < types.length; j++) {
             if (types[j].equalsIgnoreCase(mimeType)) {
                 return codecInfo;
             }
         }
     }
     return null;
 }

[Android Documentation]

Requirements

Namespace: Android.Media
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0