Skip to main content
Version: 12 Dec 2024

ml_media_codeclist.h

Classes

Name
structMLMediaCodecListQueryResults
structMLMediaCodecListProfileLevel
Used to store the list of codec profile levels.

Types

Name
typedef struct MLMediaCodecListQueryResultsMLMediaCodecListQueryResults
typedef struct MLMediaCodecListProfileLevelMLMediaCodecListProfileLevel
Used to store the list of codec profile levels.

Enums

Name
enumMLMediaCodecListCodecTypeFlag
{
MLMediaCodecListCodecTypeFlag_Software = 1 << 0,
MLMediaCodecListCodecTypeFlag_Hardware = 1 << 1,
MLMediaCodecListCodecTypeFlag_Ensure32Bits = 0x7FFFFFFF
}
enumMLMediaCodecListCapabilityFlag
{
MLMediaCodecListCapabilityFlag_AdaptivePlayback = 1 << 0,
MLMediaCodecListCapabilityFlag_SecurePlayback = 1 << 1,
MLMediaCodecListCapabilityFlag_TunneledPlayback = 1 << 2,
MLMediaCodecListCapabilityFlag_Ensure32Bits = 0x7FFFFFFF
}
enumMLMediaCodecColorFormat
{
MLMediaCodecColorFormat_Unused = 0,
MLMediaCodecColorFormat_Monochrome = 1,
MLMediaCodecColorFormat_8BitRGB332 = 2,
MLMediaCodecColorFormat_12BitRGB444 = 3,
MLMediaCodecColorFormat_16BitARGB4444 = 4,
MLMediaCodecColorFormat_16BitARGB1555 = 5,
MLMediaCodecColorFormat_16BitRGB565 = 6,
MLMediaCodecColorFormat_16BitBGR565 = 7,
MLMediaCodecColorFormat_18BitRGB666 = 8,
MLMediaCodecColorFormat_18BitARGB1665 = 9,
MLMediaCodecColorFormat_19BitARGB1666 = 10,
MLMediaCodecColorFormat_24BitRGB888 = 11,
MLMediaCodecColorFormat_24BitBGR888 = 12,
MLMediaCodecColorFormat_24BitARGB1887 = 13,
MLMediaCodecColorFormat_25BitARGB1888 = 14,
MLMediaCodecColorFormat_32BitBGRA8888 = 15,
MLMediaCodecColorFormat_32BitARGB8888 = 16,
MLMediaCodecColorFormat_YUV411Planar = 17,
MLMediaCodecColorFormat_YUV411PackedPlanar = 18,
MLMediaCodecColorFormat_YUV420Planar = 19,
MLMediaCodecColorFormat_YUV420PackedPlanar = 20,
MLMediaCodecColorFormat_YUV420SemiPlanar = 21,
MLMediaCodecColorFormat_YUV422Planar = 22,
MLMediaCodecColorFormat_YUV422PackedPlanar = 23,
MLMediaCodecColorFormat_YUV422SemiPlanar = 24,
MLMediaCodecColorFormat_YCbYCr = 25,
MLMediaCodecColorFormat_YCrYCb = 26,
MLMediaCodecColorFormat_CbYCrY = 27,
MLMediaCodecColorFormat_CrYCbY = 28,
MLMediaCodecColorFormat_YUV444Interleaved = 29,
MLMediaCodecColorFormat_RawBayer8Bit = 30,
MLMediaCodecColorFormat_RawBayer10Bit = 31,
MLMediaCodecColorFormat_RawBayer8Bitcompressed = 32,
MLMediaCodecColorFormat_L2 = 33,
MLMediaCodecColorFormat_L4 = 34,
MLMediaCodecColorFormat_L8 = 35,
MLMediaCodecColorFormat_L16 = 36,
MLMediaCodecColorFormat_L24 = 37,
MLMediaCodecColorFormat_L32 = 38,
MLMediaCodecColorFormat_YUV420PackedSemiPlanar,
MLMediaCodecColorFormat_YUV422PackedSemiPlanar,
MLMediaCodecColorFormat_18BitBGR666,
MLMediaCodecColorFormat_24BitARGB6666,
MLMediaCodecColorFormat_24BitABGR6666,
MLMediaCodecColorFormat_KhronosExtensions = 0x6F000000,
MLMediaCodecColorFormat_VendorStartUnused = 0x7F000000,
MLMediaCodecColorFormat_AndroidOpaque = 0x7F000789,
MLMediaCodecColorFormat_32BitRGBA8888 = 0x7F00A000,
MLMediaCodecColorFormat_YUV420Flexible = 0x7F420888,
MLMediaCodecColorFormat_YUV420Planar16 = 0x7F42016B,
MLMediaCodecColorFormat_YUV444Y410 = 0x7F444AAA,
MLMediaCodecColorFormat_TIYUV420PackedSemiPlanar = 0x7F000100,
MLMediaCodecColorFormat_QCOMYVU420SemiPlanar = 0x7FA30C00,
MLMediaCodecColorFormat_QCOMYUV420PackedSemiPlanar64x32Tile2m8ka = 0x7FA30C03,
MLMediaCodecColorFormat_QCOMYUV420PackedSemiPlanar32m = 0x7FA30C04,
MLMediaCodecColorFormat_SECNV12Tiled = 0x7FC00002,
MLMediaCodecColorFormat_Ensure32Bits = 0x7FFFFFFF
}
Enumeration defining possible uncompressed image/video formats.
enumMLMediaCodecPriority
{
MLMediaCodecPriority_RealTime = 0,
MLMediaCodecPriority_NonRealTime = 1,
MLMediaCodecPriority_Ensure32Bits = 0x7FFFFFFF
}
Enumeration defining the Codec priority.
enumMLMediaCodecIntraRefreshMode
{
MLMediaCodecIntraRefreshMode_Cyclic = 0,
MLMediaCodecIntraRefreshMode_Adaptive = 1,
MLMediaCodecIntraRefreshMode_Both = 2,
MLMediaCodecIntraRefreshMode_Ensure32Bits = 0x7FFFFFFF
}
Enumeration of possible methods to use for Intra Refresh.
enumMLMediaCodecBitrateMode
{
MLMediaCodecBitrateMode_CQ = 0,
MLMediaCodecBitrateMode_VBR = 1,
MLMediaCodecBitrateMode_CBR = 2,
MLMediaCodecBitrateMode_Ensure32Bits = 0x7FFFFFFF
}
Enumeration defining Codec Bitrate modes.
enumMLMediaCodecProfileType
{
MLMediaCodecProfileType_H263Baseline = 0x01,
MLMediaCodecProfileType_H263H320Coding = 0x02,
MLMediaCodecProfileType_H263BackwardCompatible = 0x04,
MLMediaCodecProfileType_H263ISWV2 = 0x08,
MLMediaCodecProfileType_H263ISWV3 = 0x10,
MLMediaCodecProfileType_H263HighCompression = 0x20,
MLMediaCodecProfileType_H263Internet = 0x40,
MLMediaCodecProfileType_H263Interlace = 0x80,
MLMediaCodecProfileType_H263HighLatency = 0x100,
MLMediaCodecProfileType_MPEG2Simple = 0,
MLMediaCodecProfileType_MPEG2Main = 1,
MLMediaCodecProfileType_MPEG2422 = 2,
MLMediaCodecProfileType_MPEG2SNR = 3,
MLMediaCodecProfileType_MPEG2Spatial = 4,
MLMediaCodecProfileType_MPEG2High = 5,
MLMediaCodecProfileType_MPEG4Simple = 0x01,
MLMediaCodecProfileType_MPEG4SimpleScalable = 0x02,
MLMediaCodecProfileType_MPEG4Core = 0x04,
MLMediaCodecProfileType_MPEG4Main = 0x08,
MLMediaCodecProfileType_MPEG4Nbit = 0x10,
MLMediaCodecProfileType_MPEG4ScalableTexture = 0x20,
MLMediaCodecProfileType_MPEG4SimpleFace = 0x40,
MLMediaCodecProfileType_MPEG4SimpleFBA = 0x80,
MLMediaCodecProfileType_MPEG4BasicAnimated = 0x100,
MLMediaCodecProfileType_MPEG4Hybrid = 0x200,
MLMediaCodecProfileType_MPEG4AdvancedRealTime = 0x400,
MLMediaCodecProfileType_MPEG4CoreScalable = 0x800,
MLMediaCodecProfileType_MPEG4AdvancedCoding = 0x1000,
MLMediaCodecProfileType_MPEG4AdvancedCore = 0x2000,
MLMediaCodecProfileType_MPEG4AdvancedScalable = 0x4000,
MLMediaCodecProfileType_MPEG4AdvancedSimple = 0x8000,
MLMediaCodecProfileType_AVCBaseline = 0x01,
MLMediaCodecProfileType_AVCMain = 0x02,
MLMediaCodecProfileType_AVCExtended = 0x04,
MLMediaCodecProfileType_AVCHigh = 0x08,
MLMediaCodecProfileType_AVCHigh10 = 0x10,
MLMediaCodecProfileType_AVCHigh422 = 0x20,
MLMediaCodecProfileType_AVCHigh444 = 0x40,
MLMediaCodecProfileType_VP8Main = 0x01,
MLMediaCodecProfileType_VP90 = 0x01,
MLMediaCodecProfileType_VP91 = 0x02,
MLMediaCodecProfileType_VP92 = 0x04,
MLMediaCodecProfileType_VP93 = 0x08,
MLMediaCodecProfileType_VP92HDR = 0x1000,
MLMediaCodecProfileType_VP93HDR = 0x2000,
MLMediaCodecProfileType_VP92HDR10Plus = 0x4000,
MLMediaCodecProfileType_VP93HDR10Plus = 0x8000,
MLMediaCodecProfileType_HEVCMain = 0x01,
MLMediaCodecProfileType_HEVCMain10 = 0x02,
MLMediaCodecProfileType_HEVCMainStill = 0x04,
MLMediaCodecProfileType_HEVCMain10HDR10 = 0x1000,
MLMediaCodecProfileType_HEVCMain10HDR10Plus = 0x2000,
MLMediaCodecProfileType_AACObjectNull = 0,
MLMediaCodecProfileType_AACObjectMain = 1,
MLMediaCodecProfileType_AACObjectLC = 2,
MLMediaCodecProfileType_AACObjectSS = 3,
MLMediaCodecProfileType_AACObjectLTP = 4,
MLMediaCodecProfileType_AACObjectHE = 5,
MLMediaCodecProfileType_AACObjectScalable = 6,
MLMediaCodecProfileType_AACObjectERLC = 17,
MLMediaCodecProfileType_AACObjectLD = 23,
MLMediaCodecProfileType_AACObjectHE_PS = 29,
MLMediaCodecProfileType_WMAProfileUnused = 0,
MLMediaCodecProfileType_WMAProfileL1 = 1,
MLMediaCodecProfileType_WMAProfileL2 = 2,
MLMediaCodecProfileType_WMAProfileL3 = 3,
MLMediaCodecProfileType_Ensure32Bits = 0x7FFFFFFF
}
Enumeration defining Codec profile types.
enumMLMediaCodecLevelType
{
MLMediaCodecLevelType_H263Level10 = 0x01,
MLMediaCodecLevelType_H263Level20 = 0x02,
MLMediaCodecLevelType_H263Level30 = 0x04,
MLMediaCodecLevelType_H263Level40 = 0x08,
MLMediaCodecLevelType_H263Level45 = 0x10,
MLMediaCodecLevelType_H263Level50 = 0x20,
MLMediaCodecLevelType_H263Level60 = 0x40,
MLMediaCodecLevelType_H263Level70 = 0x80,
MLMediaCodecLevelType_MPEG2LevelLL = 0,
MLMediaCodecLevelType_MPEG2LevelML = 1,
MLMediaCodecLevelType_MPEG2LevelH14 = 2,
MLMediaCodecLevelType_MPEG2LevelHL = 3,
MLMediaCodecLevelType_MPEG4Level0 = 0x01,
MLMediaCodecLevelType_MPEG4Level0b = 0x02,
MLMediaCodecLevelType_MPEG4Level1 = 0x04,
MLMediaCodecLevelType_MPEG4Level2 = 0x08,
MLMediaCodecLevelType_MPEG4Level3 = 0x10,
MLMediaCodecLevelType_MPEG4Level4 = 0x20,
MLMediaCodecLevelType_MPEG4Level4a = 0x40,
MLMediaCodecLevelType_MPEG4Level5 = 0x80,
MLMediaCodecLevelType_AVCLevel1 = 0x01,
MLMediaCodecLevelType_AVCLevel1b = 0x02,
MLMediaCodecLevelType_AVCLevel11 = 0x04,
MLMediaCodecLevelType_AVCLevel12 = 0x08,
MLMediaCodecLevelType_AVCLevel13 = 0x10,
MLMediaCodecLevelType_AVCLevel2 = 0x20,
MLMediaCodecLevelType_AVCLevel21 = 0x40,
MLMediaCodecLevelType_AVCLevel22 = 0x80,
MLMediaCodecLevelType_AVCLevel3 = 0x100,
MLMediaCodecLevelType_AVCLevel31 = 0x200,
MLMediaCodecLevelType_AVCLevel32 = 0x400,
MLMediaCodecLevelType_AVCLevel4 = 0x800,
MLMediaCodecLevelType_AVCLevel41 = 0x1000,
MLMediaCodecLevelType_AVCLevel42 = 0x2000,
MLMediaCodecLevelType_AVCLevel5 = 0x4000,
MLMediaCodecLevelType_AVCLevel51 = 0x8000,
MLMediaCodecLevelType_VP8LevelVersion0 = 0x01,
MLMediaCodecLevelType_VP8LevelVersion1 = 0x02,
MLMediaCodecLevelType_VP8LevelVersion2 = 0x04,
MLMediaCodecLevelType_VP8LevelVersion3 = 0x08,
MLMediaCodecLevelType_VP9Level1 = 0x1,
MLMediaCodecLevelType_VP9Level11 = 0x2,
MLMediaCodecLevelType_VP9Level2 = 0x4,
MLMediaCodecLevelType_VP9Level21 = 0x8,
MLMediaCodecLevelType_VP9Level3 = 0x10,
MLMediaCodecLevelType_VP9Level31 = 0x20,
MLMediaCodecLevelType_VP9Level4 = 0x40,
MLMediaCodecLevelType_VP9Level41 = 0x80,
MLMediaCodecLevelType_VP9Level5 = 0x100,
MLMediaCodecLevelType_VP9Level51 = 0x200,
MLMediaCodecLevelType_VP9Level52 = 0x400,
MLMediaCodecLevelType_VP9Level6 = 0x800,
MLMediaCodecLevelType_VP9Level61 = 0x1000,
MLMediaCodecLevelType_VP9Level62 = 0x2000,
MLMediaCodecLevelType_HEVCMainTierLevel1 = 0x1,
MLMediaCodecLevelType_HEVCHighTierLevel1 = 0x2,
MLMediaCodecLevelType_HEVCMainTierLevel2 = 0x4,
MLMediaCodecLevelType_HEVCHighTierLevel2 = 0x8,
MLMediaCodecLevelType_HEVCMainTierLevel21 = 0x10,
MLMediaCodecLevelType_HEVCHighTierLevel21 = 0x20,
MLMediaCodecLevelType_HEVCMainTierLevel3 = 0x40,
MLMediaCodecLevelType_HEVCHighTierLevel3 = 0x80,
MLMediaCodecLevelType_HEVCMainTierLevel31 = 0x100,
MLMediaCodecLevelType_HEVCHighTierLevel31 = 0x200,
MLMediaCodecLevelType_HEVCMainTierLevel4 = 0x400,
MLMediaCodecLevelType_HEVCHighTierLevel4 = 0x800,
MLMediaCodecLevelType_HEVCMainTierLevel41 = 0x1000,
MLMediaCodecLevelType_HEVCHighTierLevel41 = 0x2000,
MLMediaCodecLevelType_HEVCMainTierLevel5 = 0x4000,
MLMediaCodecLevelType_HEVCHighTierLevel5 = 0x8000,
MLMediaCodecLevelType_HEVCMainTierLevel51 = 0x10000,
MLMediaCodecLevelType_HEVCHighTierLevel51 = 0x20000,
MLMediaCodecLevelType_HEVCMainTierLevel52 = 0x40000,
MLMediaCodecLevelType_HEVCHighTierLevel52 = 0x80000,
MLMediaCodecLevelType_HEVCMainTierLevel6 = 0x100000,
MLMediaCodecLevelType_HEVCHighTierLevel6 = 0x200000,
MLMediaCodecLevelType_HEVCMainTierLevel61 = 0x400000,
MLMediaCodecLevelType_HEVCHighTierLevel61 = 0x800000,
MLMediaCodecLevelType_HEVCMainTierLevel62 = 0x1000000,
MLMediaCodecLevelType_HEVCHighTierLevel62 = 0x2000000,
MLMediaCodecLevelType_Ensure32Bits = 0x7FFFFFFF
}
Enumeration defining Codec Level types.

Functions

Name
MLResultMLMediaCodecListCountCodecs(uint64_t * out_codec_count)
Obtain the number of available codecs.
MLResultMLMediaCodecListIsSoftwareCodec(const char codec_name, bool out_val)
Determine whether a codec is a software codec.
MLResultMLMediaCodecListGetMatchingCodecs(const char mime, bool is_encoder, MLMediaCodecListCodecTypeFlag flag, MLMediaCodecListQueryResults out_matching_codecs)
Obtain a list of matching codecs for a given codec mime.
MLResultMLMediaCodecListGetCodecByType(const char type, bool is_encoder, uint64_t start_index, int64_t out_index)
Obtain the codec matching the given codec type from the codec list.
MLResultMLMediaCodecListGetCodecByName(const char name, int64_t out_index)
Obtain the codec from the codec matching the given codec name from the codec list.
MLResultMLMediaCodecListIsEncoder(uint64_t index, bool * out_val)
Confirm whether a component is an Encoder or Decoder.
MLResultMLMediaCodecListGetCodecName(uint64_t index, char * out_name)
Obtain a codec name.
MLResultMLMediaCodecListGetSupportedMimes(uint64_t index, MLMediaCodecListQueryResults * out_supported_mimes)
Obtain the list of mime types supported by a codec.
MLResultMLMediaCodecListGetCapabilityFlag(uint64_t index, const char mime, MLMediaCodecListCapabilityFlag out_capability_flag)
Obtain the capability flag for a codec.
MLResultMLMediaCodecListGetSecureCodecName(const char mime, bool is_decoder, char out_name)
Obtain the name of a secure codec for the given mime type.
MLResultMLMediaCodecListQueryResultsRelease(MLMediaCodecListQueryResults * query_results)
Release the query results.
MLResultMLMediaCodecListGetSupportedProfileLevels(uint64_t index, const char mime, MLMediaCodecListProfileLevel ** out_profile_levels, size_t out_profile_levels_size)
Obtain the supported profile levels for a codec.
MLResultMLMediaCodecListProfileLevelsRelease(MLMediaCodecListProfileLevel * profile_levels)
Release profile levels.
MLResultMLMediaCodecListGetSupportedColorFormats(uint64_t index, const char mime, uint32_t ** out_color_formats, size_t out_color_formats_size)
Obtain the supported color formats for a codec. All the supported color formats are defined by MLMediaCodecColorFormat.
MLResultMLMediaCodecListColorFormatsRelease(uint32_t * color_formats)
Release color formats.
MLResultMLMediaCodecListGetSupportedBitrateModes(uint64_t index, const char mime, MLMediaCodecBitrateMode ** out_bitrate_modes, size_t out_bitrate_modes_size)
Obtain the supported bitrate modes for a codec.
MLResultMLMediaCodecBitrateModesRelease(MLMediaCodecBitrateMode * bitrate_modes)
Release Bitrate modes.
MLResultMLMediaCodecListIsAdaptivePlaybackSupported(uint64_t index, const char mime, bool out_supported)
Check whether Adaptive playback is supported.
MLResultMLMediaCodecListIsSecurePlaybackSupported(uint64_t index, const char mime, bool out_supported)
Check whether Secure playback is supported.
MLResultMLMediaCodecListIsIntraRefreshSupported(uint64_t index, const char mime, bool out_supported)
Check whether Intra Refresh is supported.

Defines

Name
MAX_CODEC_NAME_LENGTH

Enums Documentation

MLMediaCodecListCodecTypeFlag

EnumeratorValueDescription
MLMediaCodecListCodecTypeFlag_Software1 << 0Software.
MLMediaCodecListCodecTypeFlag_Hardware1 << 1Hardware.
MLMediaCodecListCodecTypeFlag_Ensure32Bits0x7FFFFFFFEnsure enum is represented as 32 Bits.

Bit mask for specifying the type of codec being queried using MLMediaCodecListGetMatchingCodecs().


MLMediaCodecListCapabilityFlag

EnumeratorValueDescription
MLMediaCodecListCapabilityFlag_AdaptivePlayback1 << 0Adaptive playback.
MLMediaCodecListCapabilityFlag_SecurePlayback1 << 1Secure playback.
MLMediaCodecListCapabilityFlag_TunneledPlayback1 << 2Tunneled playback.
MLMediaCodecListCapabilityFlag_Ensure32Bits0x7FFFFFFFEnsure enum is represented as 32 Bits.

Bit mask for checking the capability of a codec after queried via MLMediaCodecListGetCapabilityFlag.


MLMediaCodecColorFormat

EnumeratorValueDescription
MLMediaCodecColorFormat_Unused0Unused: Placeholder value when format is N/A.
MLMediaCodecColorFormat_Monochrome1Monochrome: black and white.
MLMediaCodecColorFormat_8BitRGB33228BitRGB332: Red 7:5, Green 4:2, Blue 1:0.
MLMediaCodecColorFormat_12BitRGB444312BitRGB444: Red 11:8, Green 7:4, Blue 3:0.
MLMediaCodecColorFormat_16BitARGB4444416BitARGB4444: Alpha 15:12, Red 11:8, Green 7:4, Blue 3:0.
MLMediaCodecColorFormat_16BitARGB1555516BitARGB1555: Alpha 15, Red 14:10, Green 9:5, Blue 4:0.
MLMediaCodecColorFormat_16BitRGB565616BitRGB565: Red 15:11, Green 10:5, Blue 4:0.
MLMediaCodecColorFormat_16BitBGR565716BitBGR565: Blue 15:11, Green 10:5, Red 4:0.
MLMediaCodecColorFormat_18BitRGB666818BitRGB666: Red 17:12, Green 11:6, Blue 5:0.
MLMediaCodecColorFormat_18BitARGB1665918BitARGB1665: Alpha 17, Red 16:11, Green 10:5, Blue 4:0.
MLMediaCodecColorFormat_19BitARGB16661019BitARGB1666: Alpha 18, Red 17:12, Green 11:6, Blue 5:0.
MLMediaCodecColorFormat_24BitRGB8881124BitRGB888: Red 24:16, Green 15:8, Blue 7:0.
MLMediaCodecColorFormat_24BitBGR8881224BitBGR888: Blue 24:16, Green 15:8, Red 7:0.
MLMediaCodecColorFormat_24BitARGB18871324BitARGB1887: Alpha 23, Red 22:15, Green 14:7, Blue 6:0.
MLMediaCodecColorFormat_25BitARGB18881425BitARGB1888: Alpha 24, Red 23:16, Green 15:8, Blue 7:0.
MLMediaCodecColorFormat_32BitBGRA88881532BitBGRA8888: Blue 31:24, Green 23:16, Red 15:8, Alpha 7:0.
MLMediaCodecColorFormat_32BitARGB88881632BitARGB8888: Alpha 31:24, Red 23:16, Green 15:8, Blue 7:0.
MLMediaCodecColorFormat_YUV411Planar17YUV411Planar: U,Y are subsampled by a factor of 4 horizontally.
MLMediaCodecColorFormat_YUV411PackedPlanar18YUV411PackedPlanar: packed per payload in planar slices.
MLMediaCodecColorFormat_YUV420Planar19YUV420Planar: Three arrays Y,U,V.
MLMediaCodecColorFormat_YUV420PackedPlanar20YUV420PackedPlanar: packed per payload in planar slices.
MLMediaCodecColorFormat_YUV420SemiPlanar21YUV420SemiPlanar: Two arrays, one is all Y, the other is U and V.
MLMediaCodecColorFormat_YUV422Planar22YUV422Planar: Three arrays Y,U,V.
MLMediaCodecColorFormat_YUV422PackedPlanar23YUV422PackedPlanar: packed per payload in planar slices.
MLMediaCodecColorFormat_YUV422SemiPlanar24YUV422SemiPlanar: Two arrays, one is all Y, the other is U and V.
MLMediaCodecColorFormat_YCbYCr25YCbYCr: Organized as 16Bit YUYV (i.e. YCbYCr).
MLMediaCodecColorFormat_YCrYCb26YCrYCb: Organized as 16Bit YVYU (i.e. YCrYCb).
MLMediaCodecColorFormat_CbYCrY27CbYCrY: Organized as 16Bit UYVY (i.e. CbYCrY).
MLMediaCodecColorFormat_CrYCbY28CrYCbY: Organized as 16Bit VYUY (i.e. CrYCbY).
MLMediaCodecColorFormat_YUV444Interleaved29YUV444Interleaved: Each pixel contains equal parts YUV.
MLMediaCodecColorFormat_RawBayer8Bit30RawBayer8Bit: SMIA camera output format.
MLMediaCodecColorFormat_RawBayer10Bit31RawBayer10Bit: SMIA camera output format.
MLMediaCodecColorFormat_RawBayer8Bitcompressed32RawBayer8Bitcompressed: SMIA camera output format.
MLMediaCodecColorFormat_L233Deprecated. Use MLMediaCodecColorFormat_L8.
MLMediaCodecColorFormat_L434Deprecated. Use MLMediaCodecColorFormat_L8.
MLMediaCodecColorFormat_L8358 Bits per pixel Y color format.
MLMediaCodecColorFormat_L163616 Bits per pixel, little-endian Y color format.
MLMediaCodecColorFormat_L2437Deprecated. Use MLMediaCodecColorFormat_L16.
MLMediaCodecColorFormat_L3238Deprecated. Use MLMediaCodecColorFormat_L16.
MLMediaCodecColorFormat_YUV420PackedSemiPlanarYUV420PackedSemiPlanar.
MLMediaCodecColorFormat_YUV422PackedSemiPlanarYUV422PackedSemiPlanar.
MLMediaCodecColorFormat_18BitBGR66618BitBGR666.
MLMediaCodecColorFormat_24BitARGB666624BitARGB6666.
MLMediaCodecColorFormat_24BitABGR666624BitABGR6666.
MLMediaCodecColorFormat_KhronosExtensions0x6F000000Reserved region for introducing Khronos Standard Extensions.
MLMediaCodecColorFormat_VendorStartUnused0x7F000000Reserved region for introducing Vendor Extensions.
MLMediaCodecColorFormat_AndroidOpaque0x7F000789Reserved android opaque color format. Tells the encoder that the actual color format will be relayed by the Graphics memory allocator Buffers.
MLMediaCodecColorFormat_32BitRGBA88880x7F00A00032BitRGBA8888.
MLMediaCodecColorFormat_YUV420Flexible0x7F420888Flexible 8-bit YUV format. Codec should report this format as being supported if it supports any YUV420 packed planar or semiplanar formats. When port is set to use this format, codec can substitute any YUV420 packed planar or semiplanar format for it.
MLMediaCodecColorFormat_YUV420Planar160x7F42016B10-bit or 12-bit YUV format, LSB-justified (0's on higher bits).
MLMediaCodecColorFormat_YUV444Y4100x7F444AAAPacked 10-bit YUV444 representation that includes 2 bits of alpha. Each pixel is 32-bit. Bits 0-9 contain the U sample, bits 10-19 contain the Y sample, bits 20-29 contain the V sample, and bits 30-31 contain the alpha value.
MLMediaCodecColorFormat_TIYUV420PackedSemiPlanar0x7F000100TI's YUV420PackedSemiPlanar.
MLMediaCodecColorFormat_QCOMYVU420SemiPlanar0x7FA30C00QCOM's YVU420SemiPlanar.
MLMediaCodecColorFormat_QCOMYUV420PackedSemiPlanar64x32Tile2m8ka0x7FA30C03QCOM's YUV420PackedSemiPlanar64x32Tile2m8ka.
MLMediaCodecColorFormat_QCOMYUV420PackedSemiPlanar32m0x7FA30C04QCOM's YUV420PackedSemiPlanar32m.
MLMediaCodecColorFormat_SECNV12Tiled0x7FC00002SEC's NV12Tiled.
MLMediaCodecColorFormat_Ensure32Bits0x7FFFFFFFEnsure enum is represented as 32 Bits.

Enumeration defining possible uncompressed image/video formats.

API Level:

  • 9

MLMediaCodecPriority

EnumeratorValueDescription
MLMediaCodecPriority_RealTime0Realtime priority. The codec shall support the given performance configuration (e.g. framerate) at realtime. This should only be used by media playback, capture, and possibly by realtime communication scenarios if best effort performance is not suitable.
MLMediaCodecPriority_NonRealTime1Non-realtime priority (best effort).
MLMediaCodecPriority_Ensure32Bits0x7FFFFFFFEnsure enum is represented as 32 Bits.

Enumeration defining the Codec priority.

API Level:

  • 9

MLMediaCodecIntraRefreshMode

EnumeratorValueDescription
MLMediaCodecIntraRefreshMode_Cyclic0Cyclic.
MLMediaCodecIntraRefreshMode_Adaptive1Adaptive.
MLMediaCodecIntraRefreshMode_Both2Both.
MLMediaCodecIntraRefreshMode_Ensure32Bits0x7FFFFFFF

Enumeration of possible methods to use for Intra Refresh.

API Level:

  • 9

MLMediaCodecBitrateMode

EnumeratorValueDescription
MLMediaCodecBitrateMode_CQ0Constant quality mode.
MLMediaCodecBitrateMode_VBR1Variable bitrate mode.
MLMediaCodecBitrateMode_CBR2Constant bitrate mode.
MLMediaCodecBitrateMode_Ensure32Bits0x7FFFFFFFEnsure enum is represented as 32 Bits.

Enumeration defining Codec Bitrate modes.

API Level:

  • 9

MLMediaCodecProfileType

EnumeratorValueDescription
MLMediaCodecProfileType_H263Baseline0x01H263 Baseline Profile: H.263 (V1), no optional modes.
MLMediaCodecProfileType_H263H320Coding0x02H263 H.320 Coding Efficiency Backward Compatibility Profile: H.263+ (V2), includes annexes I, J, L.4 and T.
MLMediaCodecProfileType_H263BackwardCompatible0x04H263 Backward Compatibility Profile: H.263 (V1), includes annex F.
MLMediaCodecProfileType_H263ISWV20x08H263 Interactive Streaming Wireless Profile: H.263+ (V2), includes annexes I, J, K and T.
MLMediaCodecProfileType_H263ISWV30x10H263 Interactive Streaming Wireless Profile: H.263++ (V3), includes profile 3 and annexes V and W.6.3.8.
MLMediaCodecProfileType_H263HighCompression0x20H263 Conversational High Compression Profile: H.263++ (V3), includes profiles 1 & 2 and annexes D and U.
MLMediaCodecProfileType_H263Internet0x40H263 Conversational Internet Profile: H.263++ (V3), includes profile 5 and annex K.
MLMediaCodecProfileType_H263Interlace0x80H263 Conversational Interlace Profile: H.263++ (V3), includes profile 5 and annex W.6.3.11.
MLMediaCodecProfileType_H263HighLatency0x100H263 High Latency Profile: H.263++ (V3), includes profile 6 and annexes O.1 and P.5.
MLMediaCodecProfileType_MPEG2Simple0MPEG-2 Simple Profile.
MLMediaCodecProfileType_MPEG2Main1MPEG-2 Main Profile.
MLMediaCodecProfileType_MPEG24222MPEG-2 4:2:2 Profile.
MLMediaCodecProfileType_MPEG2SNR3MPEG-2 SNR Profile.
MLMediaCodecProfileType_MPEG2Spatial4MPEG-2 Spatial Profile.
MLMediaCodecProfileType_MPEG2High5MPEG-2 High Profile.
MLMediaCodecProfileType_MPEG4Simple0x01MPEG-4 Simple Profile, Levels 1-3.
MLMediaCodecProfileType_MPEG4SimpleScalable0x02MPEG-4 Simple Scalable Profile, Levels 1-2.
MLMediaCodecProfileType_MPEG4Core0x04MPEG-4 Core Profile, Levels 1-2.
MLMediaCodecProfileType_MPEG4Main0x08MPEG-4 Main Profile, Levels 2-4.
MLMediaCodecProfileType_MPEG4Nbit0x10MPEG-4 N-bit Profile, Level 2.
MLMediaCodecProfileType_MPEG4ScalableTexture0x20MPEG-4 Scalable Texture Profile, Level 1.
MLMediaCodecProfileType_MPEG4SimpleFace0x40MPEG-4 Simple Face Animation Profile, Levels 1-2.
MLMediaCodecProfileType_MPEG4SimpleFBA0x80MPEG-4 Simple Face and Body Animation (FBA) Profile, Levels 1-2.
MLMediaCodecProfileType_MPEG4BasicAnimated0x100MPEG-4 Basic Animated Texture Profile, Levels 1-2.
MLMediaCodecProfileType_MPEG4Hybrid0x200MPEG-4 Hybrid Profile, Levels 1-2.
MLMediaCodecProfileType_MPEG4AdvancedRealTime0x400MPEG-4 Advanced Real Time Simple Profiles, Levels 1-4.
MLMediaCodecProfileType_MPEG4CoreScalable0x800MPEG-4 Core Scalable Profile, Levels 1-3.
MLMediaCodecProfileType_MPEG4AdvancedCoding0x1000MPEG-4 Advanced Coding Efficiency Profile, Levels 1-4.
MLMediaCodecProfileType_MPEG4AdvancedCore0x2000MPEG-4 Advanced Core Profile, Levels 1-2.
MLMediaCodecProfileType_MPEG4AdvancedScalable0x4000MPEG-4 Advanced Scalable Texture, Levels 2-3.
MLMediaCodecProfileType_MPEG4AdvancedSimple0x8000MPEG-4 Advanced Simple.
MLMediaCodecProfileType_AVCBaseline0x01AVC Baseline profile.
MLMediaCodecProfileType_AVCMain0x02AVC Main profile.
MLMediaCodecProfileType_AVCExtended0x04AVC Extended profile.
MLMediaCodecProfileType_AVCHigh0x08AVC High profile.
MLMediaCodecProfileType_AVCHigh100x10AVC High 10 profile.
MLMediaCodecProfileType_AVCHigh4220x20AVC High 4:2:2 profile.
MLMediaCodecProfileType_AVCHigh4440x40AVC High 4:4:4 profile.
MLMediaCodecProfileType_VP8Main0x01VP8 Main profile.
MLMediaCodecProfileType_VP900x01VP9 Profile 0 4:2:0 8-bit.
MLMediaCodecProfileType_VP910x02VP9 Profile 1 4:2:2 8-bit.
MLMediaCodecProfileType_VP920x04VP9 Profile 2 4:2:0 10-bit.
MLMediaCodecProfileType_VP930x08VP9 Profile 3 4:2:2 10-bit.
MLMediaCodecProfileType_VP92HDR0x1000VP9 Profile 2 4:2:0 10-bit HDR.
MLMediaCodecProfileType_VP93HDR0x2000VP9 Profile 3 4:2:2 10-bit HDR.
MLMediaCodecProfileType_VP92HDR10Plus0x4000VP9 Profile 2 4:2:0 10-bit HDR10Plus.
MLMediaCodecProfileType_VP93HDR10Plus0x8000VP9 Profile 3 4:2:2 10-bit HDR10Plus.
MLMediaCodecProfileType_HEVCMain0x01HEVC Main profile.
MLMediaCodecProfileType_HEVCMain100x02HEVC Main 1.0 profile.
MLMediaCodecProfileType_HEVCMainStill0x04HEVC Main Still profile.
MLMediaCodecProfileType_HEVCMain10HDR100x1000HEVC Main HDR profile.
MLMediaCodecProfileType_HEVCMain10HDR10Plus0x2000HEVC Main HDR+ profile.
MLMediaCodecProfileType_AACObjectNull0AAC Null, not used.
MLMediaCodecProfileType_AACObjectMain1AAC Main object.
MLMediaCodecProfileType_AACObjectLC2AAC Low Complexity object (AAC profile).
MLMediaCodecProfileType_AACObjectSS3AAC Scalable Sample Rate object.
MLMediaCodecProfileType_AACObjectLTP4AAC Long Term Prediction object.
MLMediaCodecProfileType_AACObjectHE5AAC High Efficiency (object type SBR, HE-AAC profile).
MLMediaCodecProfileType_AACObjectScalable6AAC Scalable object.
MLMediaCodecProfileType_AACObjectERLC17ER AAC Low Complexity object (Error Resilient AAC-LC).
MLMediaCodecProfileType_AACObjectLD23AAC Low Delay object (Error Resilient).
MLMediaCodecProfileType_AACObjectHE_PS29AAC High Efficiency with Parametric Stereo coding (HE-AAC v2, object type PS).
MLMediaCodecProfileType_WMAProfileUnused0WMA profile unused or unknown .
MLMediaCodecProfileType_WMAProfileL11WMA version 9 profile L1.
MLMediaCodecProfileType_WMAProfileL22WMA version 9 profile L2.
MLMediaCodecProfileType_WMAProfileL33WMA version 9 profile L3.
MLMediaCodecProfileType_Ensure32Bits0x7FFFFFFFEnsure enum is represented as 32 Bits.

Enumeration defining Codec profile types.

This is a consolidated list for all the codecs that support profiles. Each profile indicates support for various performance bounds and different annexes.

note

A codec may not support all the profiles and levels listed below. For any given codec, the supported profiles and levels can be queried using MLMediaCodecListGetSupportedProfileLevels.

API Level:

  • 9

MLMediaCodecLevelType

EnumeratorValueDescription
MLMediaCodecLevelType_H263Level100x01H263 Level 1.0.
MLMediaCodecLevelType_H263Level200x02H263 Level 2.0.
MLMediaCodecLevelType_H263Level300x04H263 Level 3.0.
MLMediaCodecLevelType_H263Level400x08H263 Level 4.0.
MLMediaCodecLevelType_H263Level450x10H263 Level 4.5.
MLMediaCodecLevelType_H263Level500x20H263 Level 5.0.
MLMediaCodecLevelType_H263Level600x40H263 Level 6.0.
MLMediaCodecLevelType_H263Level700x80H263 Level 7.0.
MLMediaCodecLevelType_MPEG2LevelLL0MPEG-2 Low Level.
MLMediaCodecLevelType_MPEG2LevelML1MPEG-2 Main Level.
MLMediaCodecLevelType_MPEG2LevelH142MPEG-2 High 1440.
MLMediaCodecLevelType_MPEG2LevelHL3MPEG-2 High Level.
MLMediaCodecLevelType_MPEG4Level00x01MPEG-4 Level 0.
MLMediaCodecLevelType_MPEG4Level0b0x02MPEG-4 Level 0b.
MLMediaCodecLevelType_MPEG4Level10x04MPEG-4 Level 1.
MLMediaCodecLevelType_MPEG4Level20x08MPEG-4 Level 2.
MLMediaCodecLevelType_MPEG4Level30x10MPEG-4 Level 3.
MLMediaCodecLevelType_MPEG4Level40x20MPEG-4 Level 4.
MLMediaCodecLevelType_MPEG4Level4a0x40MPEG-4 Level 4a.
MLMediaCodecLevelType_MPEG4Level50x80MPEG-4 Level 5.
MLMediaCodecLevelType_AVCLevel10x01AVC Level 1.
MLMediaCodecLevelType_AVCLevel1b0x02AVC Level 1.b.
MLMediaCodecLevelType_AVCLevel110x04AVC Level 1.1.
MLMediaCodecLevelType_AVCLevel120x08AVC Level 1.2.
MLMediaCodecLevelType_AVCLevel130x10AVC Level 1.3.
MLMediaCodecLevelType_AVCLevel20x20AVC Level 2.
MLMediaCodecLevelType_AVCLevel210x40AVC Level 2.1.
MLMediaCodecLevelType_AVCLevel220x80AVC Level 2.2.
MLMediaCodecLevelType_AVCLevel30x100AVC Level 3.
MLMediaCodecLevelType_AVCLevel310x200AVC Level 3.1.
MLMediaCodecLevelType_AVCLevel320x400AVC Level 3.2.
MLMediaCodecLevelType_AVCLevel40x800AVC Level 4.
MLMediaCodecLevelType_AVCLevel410x1000AVC Level 4.1.
MLMediaCodecLevelType_AVCLevel420x2000AVC Level 4.2.
MLMediaCodecLevelType_AVCLevel50x4000AVC Level 5.
MLMediaCodecLevelType_AVCLevel510x8000AVC Level 5.1.
MLMediaCodecLevelType_VP8LevelVersion00x01VP8 Level version 0.
MLMediaCodecLevelType_VP8LevelVersion10x02VP8 Level version 1.
MLMediaCodecLevelType_VP8LevelVersion20x04VP8 Level version 2.
MLMediaCodecLevelType_VP8LevelVersion30x08VP8 Level version 3.
MLMediaCodecLevelType_VP9Level10x1VP9 Level 5.1.
MLMediaCodecLevelType_VP9Level110x2VP9 Level 1.1.
MLMediaCodecLevelType_VP9Level20x4VP9 Level 2.
MLMediaCodecLevelType_VP9Level210x8VP9 Level 2.1.
MLMediaCodecLevelType_VP9Level30x10VP9 Level 3.
MLMediaCodecLevelType_VP9Level310x20VP9 Level 3.1.
MLMediaCodecLevelType_VP9Level40x40VP9 Level 4.
MLMediaCodecLevelType_VP9Level410x80VP9 Level 4.1.
MLMediaCodecLevelType_VP9Level50x100VP9 Level 5.
MLMediaCodecLevelType_VP9Level510x200VP9 Level 5.1.
MLMediaCodecLevelType_VP9Level520x400VP9 Level 5.2.
MLMediaCodecLevelType_VP9Level60x800VP9 Level 6.
MLMediaCodecLevelType_VP9Level610x1000VP9 Level 6.1.
MLMediaCodecLevelType_VP9Level620x2000VP9 Level 6.2.
MLMediaCodecLevelType_HEVCMainTierLevel10x1HEVC Main Level 1.
MLMediaCodecLevelType_HEVCHighTierLevel10x2HEVC High Level 1.
MLMediaCodecLevelType_HEVCMainTierLevel20x4HEVC Main Level 2.
MLMediaCodecLevelType_HEVCHighTierLevel20x8HEVC High Level 2.
MLMediaCodecLevelType_HEVCMainTierLevel210x10HEVC Main Level 2.1.
MLMediaCodecLevelType_HEVCHighTierLevel210x20HEVC High Level 2.1.
MLMediaCodecLevelType_HEVCMainTierLevel30x40HEVC Main Level 3.
MLMediaCodecLevelType_HEVCHighTierLevel30x80HEVC High Level 3.
MLMediaCodecLevelType_HEVCMainTierLevel310x100HEVC Main Level 3.1.
MLMediaCodecLevelType_HEVCHighTierLevel310x200HEVC High Level 3.1.
MLMediaCodecLevelType_HEVCMainTierLevel40x400HEVC Main Level 4.
MLMediaCodecLevelType_HEVCHighTierLevel40x800HEVC High Level 4.
MLMediaCodecLevelType_HEVCMainTierLevel410x1000HEVC Main Level 4.1.
MLMediaCodecLevelType_HEVCHighTierLevel410x2000HEVC High Level 4.1.
MLMediaCodecLevelType_HEVCMainTierLevel50x4000HEVC Main Level 5.
MLMediaCodecLevelType_HEVCHighTierLevel50x8000HEVC High Level 5.
MLMediaCodecLevelType_HEVCMainTierLevel510x10000HEVC Main Level 5.1.
MLMediaCodecLevelType_HEVCHighTierLevel510x20000HEVC High Level 5.1.
MLMediaCodecLevelType_HEVCMainTierLevel520x40000HEVC Main Level 5.2.
MLMediaCodecLevelType_HEVCHighTierLevel520x80000HEVC High Level 5.2.
MLMediaCodecLevelType_HEVCMainTierLevel60x100000HEVC Main Level 6.
MLMediaCodecLevelType_HEVCHighTierLevel60x200000HEVC High Level 6.
MLMediaCodecLevelType_HEVCMainTierLevel610x400000HEVC Main Level 6.1.
MLMediaCodecLevelType_HEVCHighTierLevel610x800000HEVC High Level 6.1.
MLMediaCodecLevelType_HEVCMainTierLevel620x1000000HEVC Main Level 6.2.
MLMediaCodecLevelType_HEVCHighTierLevel620x2000000HEVC High Level 6.2.
MLMediaCodecLevelType_Ensure32Bits0x7FFFFFFFEnsure enum is represented as 32 Bits.

Enumeration defining Codec Level types.

This is a consolidated list for all the codecs that support profiles. Each level indicates support for various frame sizes, bit rates, decoder frame rates.

note

A codec may not support all the profiles and levels listed below. For any given codec, the supported profiles and levels can be queried using MLMediaCodecListGetSupportedProfileLevels.

API Level:

  • 9

Types Documentation

MLMediaCodecListQueryResults

typedef struct MLMediaCodecListQueryResults MLMediaCodecListQueryResults;

Used to store the list of available codec names or the list of supported mime types.

More Info


MLMediaCodecListProfileLevel

typedef struct MLMediaCodecListProfileLevel MLMediaCodecListProfileLevel;

Used to store the list of codec profile levels.

More Info

Deprecated

Deprecated since 1.4.0. Scheduled for removal.

API Level:

  • 6

Functions Documentation

MLMediaCodecListCountCodecs

MLResult MLMediaCodecListCountCodecs(
uint64_t * out_codec_count
)

Obtain the number of available codecs.

Parameters

uint64_t *out_codec_countNumber of available codecs.

Returns

MLResultMLResult_InvalidParamOne of the parameters is invalid.
MLResultMLResult_OkIf operation was successful.
MLResultMLResult_UnspecifiedFailureThe operation failed with an unspecified error.

Required Permissions:

  • None
Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaCodecListIsSoftwareCodec

MLResult MLMediaCodecListIsSoftwareCodec(
const char * codec_name,
bool * out_val
)

Determine whether a codec is a software codec.

Parameters

const char *codec_nameName of the codec.
bool *out_valReturns true if the codec is a software codec and false otherwise.

Returns

MLResultMLResult_InvalidParamOne of the parameters is invalid.
MLResultMLResult_OkIf operation was successful.
MLResultMLResult_UnspecifiedFailureThe operation failed with an unspecified error.

Required Permissions:

  • None
Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaCodecListGetMatchingCodecs

MLResult MLMediaCodecListGetMatchingCodecs(
const char * mime,
bool is_encoder,
MLMediaCodecListCodecTypeFlag flag,
MLMediaCodecListQueryResults * out_matching_codecs
)

Obtain a list of matching codecs for a given codec mime.

Parameters

const char *mimeCodec mime.
boolis_encoderSet to true if querying for encoder and false otherwise.
MLMediaCodecListCodecTypeFlagflagWhether querying for software-only or hardware-only, defined by MLMediaCodecListCodecTypeFlag.
MLMediaCodecListQueryResults *out_matching_codecsList of codecs supporting the given mime.

Returns

MLResultMLResult_InvalidParamOne of the parameters is invalid.
MLResultMLResult_OkIf operation was successful.
MLResultMLResult_UnspecifiedFailureThe operation failed with an unspecified error.

Required Permissions:

  • None

The memory used to store the list is maintained by the library. User shall call MLMediaCodecListQueryResultsRelease() to release it.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaCodecListGetCodecByType

MLResult MLMediaCodecListGetCodecByType(
const char * type,
bool is_encoder,
uint64_t start_index,
int64_t * out_index
)

Obtain the codec matching the given codec type from the codec list.

Parameters

const char *typeCodec mime.
boolis_encoderSet to true if querying for encoder and false otherwise.
uint64_tstart_indexIndex from which to search in the codec list. The number shall be between 0 and number of available codecs.
int64_t *out_indexIndex of the matching codec or -2.

Returns

MLResultMLResult_InvalidParamOne of the parameters is invalid.
MLResultMLResult_OkIf operation was successful.
MLResultMLResult_UnspecifiedFailureThe operation failed with an unspecified error.

Required Permissions:

  • None
Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaCodecListGetCodecByName

MLResult MLMediaCodecListGetCodecByName(
const char * name,
int64_t * out_index
)

Obtain the codec from the codec matching the given codec name from the codec list.

Parameters

const char *nameCodec name.
int64_t *out_indexIndex of the matching codec or -2.

Returns

MLResultMLResult_InvalidParamOne of the parameters is invalid.
MLResultMLResult_OkIf operation was successful.
MLResultMLResult_UnspecifiedFailureThe operation failed with an unspecified error.

Required Permissions:

  • None
Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaCodecListIsEncoder

MLResult MLMediaCodecListIsEncoder(
uint64_t index,
bool * out_val
)

Confirm whether a component is an Encoder or Decoder.

Parameters

uint64_tindexIndex of the codec in the codec list. The number shall be between 0 and number of available codecs.
bool *out_valReturns true if the codec is an encoder and false otherwise.

Returns

MLResultMLResult_InvalidParamOne of the parameters is invalid.
MLResultMLResult_OkIf operation was successful.
MLResultMLResult_UnspecifiedFailureThe operation failed with an unspecified error.

Required Permissions:

  • None
Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaCodecListGetCodecName

MLResult MLMediaCodecListGetCodecName(
uint64_t index,
char * out_name
)

Obtain a codec name.

Parameters

uint64_tindexIndex of the codec in the codec list. The number shall be between 0 and number of available codecs.
char *out_namePointer to the user-maintained buffer for storing the output C-style name string.

Returns

MLResultMLResult_InvalidParamOne of the parameters is invalid.
MLResultMLResult_OkIf operation was successful.
MLResultMLResult_UnspecifiedFailureThe operation failed with an unspecified error.

Required Permissions:

  • None

User shall allocate at least MAX_CODEC_NAME_LENGTH bytes of memory for storing the output name string.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaCodecListGetSupportedMimes

MLResult MLMediaCodecListGetSupportedMimes(
uint64_t index,
MLMediaCodecListQueryResults * out_supported_mimes
)

Obtain the list of mime types supported by a codec.

Parameters

uint64_tindexIndex of the codec in the codec list. The number shall be between 0 and number of available codecs.
MLMediaCodecListQueryResults *out_supported_mimesList of supported mimes.

Returns

MLResultMLResult_InvalidParamOne of the parameters is invalid.
MLResultMLResult_OkIf operation was successful.
MLResultMLResult_UnspecifiedFailureThe operation failed with an unspecified error.

Required Permissions:

  • None

The memory used to store the list is maintained by the library. User shall call MLMediaCodecListQueryResultsRelease() to release it.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaCodecListGetCapabilityFlag

MLResult MLMediaCodecListGetCapabilityFlag(
uint64_t index,
const char * mime,
MLMediaCodecListCapabilityFlag * out_capability_flag
)

Obtain the capability flag for a codec.

Parameters

uint64_tindexIndex of the codec in the codec list. The number shall be between 0 and number of available codecs.
const char *mimeMime type of the codec being queried.
MLMediaCodecListCapabilityFlag *out_capability_flagCodec capability flag defined by MLMediaCodecListCapabilityFlag.

Returns

MLResultMLResult_InvalidParamOne of the parameters is invalid.
MLResultMLResult_OkIf operation was successful.
MLResultMLResult_UnspecifiedFailureThe operation failed with an unspecified error.

Required Permissions:

  • None
Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaCodecListGetSecureCodecName

MLResult MLMediaCodecListGetSecureCodecName(
const char * mime,
bool is_decoder,
char * out_name
)

Obtain the name of a secure codec for the given mime type.

Parameters

const char *mimeMime type of the codec.
boolis_decoderSet to true if querying for decoder and false otherwise.
char *out_namePointer to the user-maintained buffer for storing the output C-style name string.

Returns

MLResultMLResult_InvalidParamOne of the parameters is invalid.
MLResultMLResult_OkIf operation was successful.
MLResultMLResult_UnspecifiedFailureThe operation failed with an unspecified error.

Required Permissions:

  • None

User shall allocate at least MAX_CODEC_NAME_LENGTH bytes of memory for storing the output name string.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaCodecListQueryResultsRelease

MLResult MLMediaCodecListQueryResultsRelease(
MLMediaCodecListQueryResults * query_results
)

Release the query results.

Parameters

MLMediaCodecListQueryResults *query_resultsQuery results such as the list of codecs acquired by MLMediaCodecListGetMatchingCodecs() or the list of supported mime types acquired by MLMediaCodecListGetSupportedMimes().

Returns

MLResultMLResult_InvalidParamOne of the parameters is invalid.
MLResultMLResult_OkIf operation was successful.
MLResultMLResult_UnspecifiedFailureThe operation failed with an unspecified error.

Required Permissions:

  • None
Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaCodecListGetSupportedProfileLevels

MLResult MLMediaCodecListGetSupportedProfileLevels(
uint64_t index,
const char * mime,
MLMediaCodecListProfileLevel ** out_profile_levels,
size_t * out_profile_levels_size
)

Obtain the supported profile levels for a codec.

Parameters

uint64_tindexIndex of the codec in the codec list. The number shall be between 0 and number of available codecs.
const char *mimeMime type of the codec being queried.
MLMediaCodecListProfileLevel **out_profile_levelsCodec supported profile levels defined by MLMediaCodecListProfileLevel.
size_t *out_profile_levels_sizeNumber of profile levels.

Returns

MLResultMLResult_InvalidParamOne of the parameters is invalid.
MLResultMLResult_OkIf operation was successful.
MLResultMLResult_UnspecifiedFailureThe operation failed with an unspecified error.

Required Permissions:

  • None

User shall call MLMediaCodecListProfileLevelsRelease() to release it.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.

API Level:

  • 6

MLMediaCodecListProfileLevelsRelease

MLResult MLMediaCodecListProfileLevelsRelease(
MLMediaCodecListProfileLevel * profile_levels
)

Release profile levels.

Parameters

MLMediaCodecListProfileLevel *profile_levelsThe return value of MLMediaCodecListGetSupportedProfileLevels().

Returns

MLResultMLResult_InvalidParamOne of the parameters is invalid.
MLResultMLResult_OkIf operation was successful.
MLResultMLResult_UnspecifiedFailureThe operation failed with an unspecified error.

Required Permissions:

  • None
Deprecated

Deprecated since 1.4.0. Scheduled for removal.

API Level:

  • 6

MLMediaCodecListGetSupportedColorFormats

MLResult MLMediaCodecListGetSupportedColorFormats(
uint64_t index,
const char * mime,
uint32_t ** out_color_formats,
size_t * out_color_formats_size
)

Obtain the supported color formats for a codec. All the supported color formats are defined by MLMediaCodecColorFormat.

Parameters

uint64_tindexIndex of the codec in the codec list. The number shall be between 0 and number of available codecs.
const char *mimeMime type of the codec being queried.
uint32_t **out_color_formatsCodec supported color formats of type MLMediaCodecColorFormat.
size_t *out_color_formats_sizeNumber of color formats.

Returns

MLResultMLResult_InvalidParamOne of the parameters is invalid.
MLResultMLResult_OkIf operation was successful.
MLResultMLResult_UnspecifiedFailureThe operation failed with an unspecified error.

Required Permissions:

  • None

User shall call MLMediaCodecListColorFormatsRelease() to release it.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.

API Level:

  • 6

MLMediaCodecListColorFormatsRelease

MLResult MLMediaCodecListColorFormatsRelease(
uint32_t * color_formats
)

Release color formats.

Parameters

uint32_t *color_formatsThe return value of MLMediaCodecListGetSupportedColorFormats().

Returns

MLResultMLResult_InvalidParamOne of the parameters is invalid.
MLResultMLResult_OkIf operation was successful.
MLResultMLResult_UnspecifiedFailureThe operation failed with an unspecified error.

Required Permissions:

  • None
Deprecated

Deprecated since 1.4.0. Scheduled for removal.

API Level:

  • 6

MLMediaCodecListGetSupportedBitrateModes

MLResult MLMediaCodecListGetSupportedBitrateModes(
uint64_t index,
const char * mime,
MLMediaCodecBitrateMode ** out_bitrate_modes,
size_t * out_bitrate_modes_size
)

Obtain the supported bitrate modes for a codec.

Parameters

uint64_tindexIndex of the codec in the codec list. The number shall be between 0 and number of available codecs.
const char *mimeMime type of the codec being queried.
MLMediaCodecBitrateMode **out_bitrate_modesCodec supported Bitrate modes defined by MLMediaCodecBitrateMode.
size_t *out_bitrate_modes_sizeNumber of Bitrate modes.

Returns

MLResultMLResult_InvalidParamOne of the parameters is invalid.
MLResultMLResult_OkIf operation was successful.
MLResultMLResult_UnspecifiedFailureThe operation failed with an unspecified error.

Required Permissions:

  • None

User shall call MLMediaCodecBitrateModesRelease() to release it.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.

API Level:

  • 9

MLMediaCodecBitrateModesRelease

MLResult MLMediaCodecBitrateModesRelease(
MLMediaCodecBitrateMode * bitrate_modes
)

Release Bitrate modes.

Parameters

MLMediaCodecBitrateMode *bitrate_modesThe return value of MLMediaCodecListGetSupportedBitrateModes().

Returns

MLResultMLResult_InvalidParamOne of the parameters is invalid.
MLResultMLResult_OkIf operation was successful.
MLResultMLResult_UnspecifiedFailureThe operation failed with an unspecified error.

Required Permissions:

  • None
Deprecated

Deprecated since 1.4.0. Scheduled for removal.

API Level:

  • 9

MLMediaCodecListIsAdaptivePlaybackSupported

MLResult MLMediaCodecListIsAdaptivePlaybackSupported(
uint64_t index,
const char * mime,
bool * out_supported
)

Check whether Adaptive playback is supported.

Parameters

uint64_tindexIndex of the codec in the codec list. The number shall be between 0 and number of available codecs.
const char *mimeMime type of the codec being queried.
bool *out_supportedReturns true if supported, false otherwise.

Returns

MLResultMLResult_InvalidParamOne of the parameters is invalid.
MLResultMLResult_OkIf operation was successful.
MLResultMLResult_UnspecifiedFailureThe operation failed with an unspecified error.

Required Permissions:

  • None

This function is used to query a video decoder to see whether it supports seamless resolution changes through Adaptive streaming. If the component is an audio decoder or encoder, it will always return false.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.

API Level:

  • 9

MLMediaCodecListIsSecurePlaybackSupported

MLResult MLMediaCodecListIsSecurePlaybackSupported(
uint64_t index,
const char * mime,
bool * out_supported
)

Check whether Secure playback is supported.

Parameters

uint64_tindexIndex of the codec in the codec list. The number shall be between 0 and number of available codecs.
const char *mimeMime type of the codec being queried.
bool *out_supportedReturns true if supported, false otherwise.

Returns

MLResultMLResult_InvalidParamOne of the parameters is invalid.
MLResultMLResult_OkIf operation was successful.
MLResultMLResult_UnspecifiedFailureThe operation failed with an unspecified error.

Required Permissions:

  • None

If the component is an encoder, it will always return false.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.

API Level:

  • 9

MLMediaCodecListIsIntraRefreshSupported

MLResult MLMediaCodecListIsIntraRefreshSupported(
uint64_t index,
const char * mime,
bool * out_supported
)

Check whether Intra Refresh is supported.

Parameters

uint64_tindexIndex of the codec in the codec list. The number shall be between 0 and number of available codecs.
const char *mimeMime type of the codec being queried.
bool *out_supportedReturns true if supported, false otherwise.

Returns

MLResultMLResult_InvalidParamOne of the parameters is invalid.
MLResultMLResult_OkIf operation was successful.
MLResultMLResult_UnspecifiedFailureThe operation failed with an unspecified error.

Required Permissions:

  • None

If the component is Decoder, it will always return false.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.

API Level:

  • 9

Macros Documentation

MAX_CODEC_NAME_LENGTH

#define MAX_CODEC_NAME_LENGTH 64

Source code

// %BANNER_BEGIN%
// ---------------------------------------------------------------------
// %COPYRIGHT_BEGIN%
// Copyright (c) 2017 Magic Leap, Inc. All Rights Reserved.
// Use of this file is governed by the Software License Agreement,
// located here: https://www.magicleap.com/software-license-agreement-ml2
// Terms and conditions applicable to third-party materials accompanying
// this distribution may also be found in the top-level NOTICE file
// appearing herein.
// %COPYRIGHT_END%
// ---------------------------------------------------------------------
// %BANNER_END%

#pragma once

#include "ml_api.h"

ML_EXTERN_C_BEGIN

#define MAX_CODEC_NAME_LENGTH 64

typedef enum MLMediaCodecListCodecTypeFlag {
MLMediaCodecListCodecTypeFlag_Software = 1 << 0,
MLMediaCodecListCodecTypeFlag_Hardware = 1 << 1,
MLMediaCodecListCodecTypeFlag_Ensure32Bits = 0x7FFFFFFF
} MLMediaCodecListCodecTypeFlag;

typedef enum MLMediaCodecListCapabilityFlag {
MLMediaCodecListCapabilityFlag_AdaptivePlayback = 1 << 0,
MLMediaCodecListCapabilityFlag_SecurePlayback = 1 << 1,
MLMediaCodecListCapabilityFlag_TunneledPlayback = 1 << 2,
MLMediaCodecListCapabilityFlag_Ensure32Bits = 0x7FFFFFFF
} MLMediaCodecListCapabilityFlag;

typedef enum MLMediaCodecColorFormat {
MLMediaCodecColorFormat_Unused = 0,
MLMediaCodecColorFormat_Monochrome = 1,
MLMediaCodecColorFormat_8BitRGB332 = 2,
MLMediaCodecColorFormat_12BitRGB444 = 3,
MLMediaCodecColorFormat_16BitARGB4444 = 4,
MLMediaCodecColorFormat_16BitARGB1555 = 5,
MLMediaCodecColorFormat_16BitRGB565 = 6,
MLMediaCodecColorFormat_16BitBGR565 = 7,
MLMediaCodecColorFormat_18BitRGB666 = 8,
MLMediaCodecColorFormat_18BitARGB1665 = 9,
MLMediaCodecColorFormat_19BitARGB1666 = 10,
MLMediaCodecColorFormat_24BitRGB888 = 11,
MLMediaCodecColorFormat_24BitBGR888 = 12,
MLMediaCodecColorFormat_24BitARGB1887 = 13,
MLMediaCodecColorFormat_25BitARGB1888 = 14,
MLMediaCodecColorFormat_32BitBGRA8888 = 15,
MLMediaCodecColorFormat_32BitARGB8888 = 16,
MLMediaCodecColorFormat_YUV411Planar = 17,
MLMediaCodecColorFormat_YUV411PackedPlanar = 18,
MLMediaCodecColorFormat_YUV420Planar = 19,
MLMediaCodecColorFormat_YUV420PackedPlanar = 20,
MLMediaCodecColorFormat_YUV420SemiPlanar = 21,
MLMediaCodecColorFormat_YUV422Planar = 22,
MLMediaCodecColorFormat_YUV422PackedPlanar = 23,
MLMediaCodecColorFormat_YUV422SemiPlanar = 24,
MLMediaCodecColorFormat_YCbYCr = 25,
MLMediaCodecColorFormat_YCrYCb = 26,
MLMediaCodecColorFormat_CbYCrY = 27,
MLMediaCodecColorFormat_CrYCbY = 28,
MLMediaCodecColorFormat_YUV444Interleaved = 29,
MLMediaCodecColorFormat_RawBayer8Bit = 30,
MLMediaCodecColorFormat_RawBayer10Bit = 31,
MLMediaCodecColorFormat_RawBayer8Bitcompressed = 32,
MLMediaCodecColorFormat_L2 = 33,
MLMediaCodecColorFormat_L4 = 34,
MLMediaCodecColorFormat_L8 = 35,
MLMediaCodecColorFormat_L16 = 36,
MLMediaCodecColorFormat_L24 = 37,
MLMediaCodecColorFormat_L32 = 38,
MLMediaCodecColorFormat_YUV420PackedSemiPlanar,
MLMediaCodecColorFormat_YUV422PackedSemiPlanar,
MLMediaCodecColorFormat_18BitBGR666,
MLMediaCodecColorFormat_24BitARGB6666,
MLMediaCodecColorFormat_24BitABGR6666,
MLMediaCodecColorFormat_KhronosExtensions = 0x6F000000,
MLMediaCodecColorFormat_VendorStartUnused = 0x7F000000,
MLMediaCodecColorFormat_AndroidOpaque = 0x7F000789,
MLMediaCodecColorFormat_32BitRGBA8888 = 0x7F00A000,
MLMediaCodecColorFormat_YUV420Flexible = 0x7F420888,
MLMediaCodecColorFormat_YUV420Planar16 = 0x7F42016B,
MLMediaCodecColorFormat_YUV444Y410 = 0x7F444AAA,

MLMediaCodecColorFormat_TIYUV420PackedSemiPlanar = 0x7F000100,
MLMediaCodecColorFormat_QCOMYVU420SemiPlanar = 0x7FA30C00,
MLMediaCodecColorFormat_QCOMYUV420PackedSemiPlanar64x32Tile2m8ka = 0x7FA30C03,
MLMediaCodecColorFormat_QCOMYUV420PackedSemiPlanar32m = 0x7FA30C04,
MLMediaCodecColorFormat_SECNV12Tiled = 0x7FC00002,

MLMediaCodecColorFormat_Ensure32Bits = 0x7FFFFFFF
} MLMediaCodecColorFormat;

typedef enum MLMediaCodecPriority {
MLMediaCodecPriority_RealTime = 0,
MLMediaCodecPriority_NonRealTime = 1,
MLMediaCodecPriority_Ensure32Bits = 0x7FFFFFFF,
} MLMediaCodecPriority;

typedef enum MLMediaCodecIntraRefreshMode {
MLMediaCodecIntraRefreshMode_Cyclic = 0,
MLMediaCodecIntraRefreshMode_Adaptive = 1,
MLMediaCodecIntraRefreshMode_Both = 2,
MLMediaCodecIntraRefreshMode_Ensure32Bits = 0x7FFFFFFF
} MLMediaCodecIntraRefreshMode;

typedef enum MLMediaCodecBitrateMode {
MLMediaCodecBitrateMode_CQ = 0,
MLMediaCodecBitrateMode_VBR = 1,
MLMediaCodecBitrateMode_CBR = 2,
MLMediaCodecBitrateMode_Ensure32Bits = 0x7FFFFFFF
} MLMediaCodecBitrateMode;

typedef enum MLMediaCodecProfileType {
MLMediaCodecProfileType_H263Baseline = 0x01,
MLMediaCodecProfileType_H263H320Coding = 0x02,
MLMediaCodecProfileType_H263BackwardCompatible = 0x04,
MLMediaCodecProfileType_H263ISWV2 = 0x08,
MLMediaCodecProfileType_H263ISWV3 = 0x10,
MLMediaCodecProfileType_H263HighCompression = 0x20,
MLMediaCodecProfileType_H263Internet = 0x40,
MLMediaCodecProfileType_H263Interlace = 0x80,
MLMediaCodecProfileType_H263HighLatency = 0x100,

MLMediaCodecProfileType_MPEG2Simple = 0,
MLMediaCodecProfileType_MPEG2Main = 1,
MLMediaCodecProfileType_MPEG2422 = 2,
MLMediaCodecProfileType_MPEG2SNR = 3,
MLMediaCodecProfileType_MPEG2Spatial = 4,
MLMediaCodecProfileType_MPEG2High = 5,

MLMediaCodecProfileType_MPEG4Simple = 0x01,
MLMediaCodecProfileType_MPEG4SimpleScalable = 0x02,
MLMediaCodecProfileType_MPEG4Core = 0x04,
MLMediaCodecProfileType_MPEG4Main = 0x08,
MLMediaCodecProfileType_MPEG4Nbit = 0x10,
MLMediaCodecProfileType_MPEG4ScalableTexture = 0x20,
MLMediaCodecProfileType_MPEG4SimpleFace = 0x40,
MLMediaCodecProfileType_MPEG4SimpleFBA = 0x80,
MLMediaCodecProfileType_MPEG4BasicAnimated = 0x100,
MLMediaCodecProfileType_MPEG4Hybrid = 0x200,
MLMediaCodecProfileType_MPEG4AdvancedRealTime = 0x400,
MLMediaCodecProfileType_MPEG4CoreScalable = 0x800,
MLMediaCodecProfileType_MPEG4AdvancedCoding = 0x1000,
MLMediaCodecProfileType_MPEG4AdvancedCore = 0x2000,
MLMediaCodecProfileType_MPEG4AdvancedScalable = 0x4000,
MLMediaCodecProfileType_MPEG4AdvancedSimple = 0x8000,

MLMediaCodecProfileType_AVCBaseline = 0x01,
MLMediaCodecProfileType_AVCMain = 0x02,
MLMediaCodecProfileType_AVCExtended = 0x04,
MLMediaCodecProfileType_AVCHigh = 0x08,
MLMediaCodecProfileType_AVCHigh10 = 0x10,
MLMediaCodecProfileType_AVCHigh422 = 0x20,
MLMediaCodecProfileType_AVCHigh444 = 0x40,

MLMediaCodecProfileType_VP8Main = 0x01,

MLMediaCodecProfileType_VP90 = 0x01,
MLMediaCodecProfileType_VP91 = 0x02,
MLMediaCodecProfileType_VP92 = 0x04,
MLMediaCodecProfileType_VP93 = 0x08,
MLMediaCodecProfileType_VP92HDR = 0x1000,
MLMediaCodecProfileType_VP93HDR = 0x2000,
MLMediaCodecProfileType_VP92HDR10Plus = 0x4000,
MLMediaCodecProfileType_VP93HDR10Plus = 0x8000,

MLMediaCodecProfileType_HEVCMain = 0x01,
MLMediaCodecProfileType_HEVCMain10 = 0x02,
MLMediaCodecProfileType_HEVCMainStill = 0x04,
MLMediaCodecProfileType_HEVCMain10HDR10 = 0x1000,
MLMediaCodecProfileType_HEVCMain10HDR10Plus = 0x2000,

MLMediaCodecProfileType_AACObjectNull = 0,
MLMediaCodecProfileType_AACObjectMain = 1,
MLMediaCodecProfileType_AACObjectLC = 2,
MLMediaCodecProfileType_AACObjectSS = 3,
MLMediaCodecProfileType_AACObjectLTP = 4,
MLMediaCodecProfileType_AACObjectHE = 5,
MLMediaCodecProfileType_AACObjectScalable = 6,
MLMediaCodecProfileType_AACObjectERLC = 17,
MLMediaCodecProfileType_AACObjectLD = 23,
MLMediaCodecProfileType_AACObjectHE_PS = 29,

MLMediaCodecProfileType_WMAProfileUnused = 0,
MLMediaCodecProfileType_WMAProfileL1 = 1,
MLMediaCodecProfileType_WMAProfileL2 = 2,
MLMediaCodecProfileType_WMAProfileL3 = 3,

MLMediaCodecProfileType_Ensure32Bits = 0x7FFFFFFF
} MLMediaCodecProfileType;

typedef enum MLMediaCodecLevelType {
MLMediaCodecLevelType_H263Level10 = 0x01,
MLMediaCodecLevelType_H263Level20 = 0x02,
MLMediaCodecLevelType_H263Level30 = 0x04,
MLMediaCodecLevelType_H263Level40 = 0x08,
MLMediaCodecLevelType_H263Level45 = 0x10,
MLMediaCodecLevelType_H263Level50 = 0x20,
MLMediaCodecLevelType_H263Level60 = 0x40,
MLMediaCodecLevelType_H263Level70 = 0x80,

MLMediaCodecLevelType_MPEG2LevelLL = 0,
MLMediaCodecLevelType_MPEG2LevelML = 1,
MLMediaCodecLevelType_MPEG2LevelH14 = 2,
MLMediaCodecLevelType_MPEG2LevelHL = 3,

MLMediaCodecLevelType_MPEG4Level0 = 0x01,
MLMediaCodecLevelType_MPEG4Level0b = 0x02,
MLMediaCodecLevelType_MPEG4Level1 = 0x04,
MLMediaCodecLevelType_MPEG4Level2 = 0x08,
MLMediaCodecLevelType_MPEG4Level3 = 0x10,
MLMediaCodecLevelType_MPEG4Level4 = 0x20,
MLMediaCodecLevelType_MPEG4Level4a = 0x40,
MLMediaCodecLevelType_MPEG4Level5 = 0x80,

MLMediaCodecLevelType_AVCLevel1 = 0x01,
MLMediaCodecLevelType_AVCLevel1b = 0x02,
MLMediaCodecLevelType_AVCLevel11 = 0x04,
MLMediaCodecLevelType_AVCLevel12 = 0x08,
MLMediaCodecLevelType_AVCLevel13 = 0x10,
MLMediaCodecLevelType_AVCLevel2 = 0x20,
MLMediaCodecLevelType_AVCLevel21 = 0x40,
MLMediaCodecLevelType_AVCLevel22 = 0x80,
MLMediaCodecLevelType_AVCLevel3 = 0x100,
MLMediaCodecLevelType_AVCLevel31 = 0x200,
MLMediaCodecLevelType_AVCLevel32 = 0x400,
MLMediaCodecLevelType_AVCLevel4 = 0x800,
MLMediaCodecLevelType_AVCLevel41 = 0x1000,
MLMediaCodecLevelType_AVCLevel42 = 0x2000,
MLMediaCodecLevelType_AVCLevel5 = 0x4000,
MLMediaCodecLevelType_AVCLevel51 = 0x8000,

MLMediaCodecLevelType_VP8LevelVersion0 = 0x01,
MLMediaCodecLevelType_VP8LevelVersion1 = 0x02,
MLMediaCodecLevelType_VP8LevelVersion2 = 0x04,
MLMediaCodecLevelType_VP8LevelVersion3 = 0x08,

MLMediaCodecLevelType_VP9Level1 = 0x1,
MLMediaCodecLevelType_VP9Level11 = 0x2,
MLMediaCodecLevelType_VP9Level2 = 0x4,
MLMediaCodecLevelType_VP9Level21 = 0x8,
MLMediaCodecLevelType_VP9Level3 = 0x10,
MLMediaCodecLevelType_VP9Level31 = 0x20,
MLMediaCodecLevelType_VP9Level4 = 0x40,
MLMediaCodecLevelType_VP9Level41 = 0x80,
MLMediaCodecLevelType_VP9Level5 = 0x100,
MLMediaCodecLevelType_VP9Level51 = 0x200,
MLMediaCodecLevelType_VP9Level52 = 0x400,
MLMediaCodecLevelType_VP9Level6 = 0x800,
MLMediaCodecLevelType_VP9Level61 = 0x1000,
MLMediaCodecLevelType_VP9Level62 = 0x2000,

MLMediaCodecLevelType_HEVCMainTierLevel1 = 0x1,
MLMediaCodecLevelType_HEVCHighTierLevel1 = 0x2,
MLMediaCodecLevelType_HEVCMainTierLevel2 = 0x4,
MLMediaCodecLevelType_HEVCHighTierLevel2 = 0x8,
MLMediaCodecLevelType_HEVCMainTierLevel21 = 0x10,
MLMediaCodecLevelType_HEVCHighTierLevel21 = 0x20,
MLMediaCodecLevelType_HEVCMainTierLevel3 = 0x40,
MLMediaCodecLevelType_HEVCHighTierLevel3 = 0x80,
MLMediaCodecLevelType_HEVCMainTierLevel31 = 0x100,
MLMediaCodecLevelType_HEVCHighTierLevel31 = 0x200,
MLMediaCodecLevelType_HEVCMainTierLevel4 = 0x400,
MLMediaCodecLevelType_HEVCHighTierLevel4 = 0x800,
MLMediaCodecLevelType_HEVCMainTierLevel41 = 0x1000,
MLMediaCodecLevelType_HEVCHighTierLevel41 = 0x2000,
MLMediaCodecLevelType_HEVCMainTierLevel5 = 0x4000,
MLMediaCodecLevelType_HEVCHighTierLevel5 = 0x8000,
MLMediaCodecLevelType_HEVCMainTierLevel51 = 0x10000,
MLMediaCodecLevelType_HEVCHighTierLevel51 = 0x20000,
MLMediaCodecLevelType_HEVCMainTierLevel52 = 0x40000,
MLMediaCodecLevelType_HEVCHighTierLevel52 = 0x80000,
MLMediaCodecLevelType_HEVCMainTierLevel6 = 0x100000,
MLMediaCodecLevelType_HEVCHighTierLevel6 = 0x200000,
MLMediaCodecLevelType_HEVCMainTierLevel61 = 0x400000,
MLMediaCodecLevelType_HEVCHighTierLevel61 = 0x800000,
MLMediaCodecLevelType_HEVCMainTierLevel62 = 0x1000000,
MLMediaCodecLevelType_HEVCHighTierLevel62 = 0x2000000,

MLMediaCodecLevelType_Ensure32Bits = 0x7FFFFFFF,
} MLMediaCodecLevelType;

typedef ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.") struct MLMediaCodecListQueryResults {
size_t count;
char **data;
} MLMediaCodecListQueryResults;

typedef ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.") struct MLMediaCodecListProfileLevel {
uint32_t profile;
uint32_t level;
} MLMediaCodecListProfileLevel;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API MLResult ML_CALL MLMediaCodecListCountCodecs(uint64_t *out_codec_count);

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API MLResult ML_CALL MLMediaCodecListIsSoftwareCodec(const char *codec_name, bool *out_val);

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API MLResult ML_CALL MLMediaCodecListGetMatchingCodecs(const char *mime, bool is_encoder, MLMediaCodecListCodecTypeFlag flag, MLMediaCodecListQueryResults *out_matching_codecs);

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API MLResult ML_CALL MLMediaCodecListGetCodecByType(const char *type, bool is_encoder, uint64_t start_index, int64_t *out_index);

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API MLResult ML_CALL MLMediaCodecListGetCodecByName(const char *name, int64_t *out_index);

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API MLResult ML_CALL MLMediaCodecListIsEncoder(uint64_t index, bool *out_val);

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API MLResult ML_CALL MLMediaCodecListGetCodecName(uint64_t index, char *out_name);

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API MLResult ML_CALL MLMediaCodecListGetSupportedMimes(uint64_t index, MLMediaCodecListQueryResults *out_supported_mimes);

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API MLResult ML_CALL MLMediaCodecListGetCapabilityFlag(uint64_t index, const char *mime, MLMediaCodecListCapabilityFlag *out_capability_flag);

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API MLResult ML_CALL MLMediaCodecListGetSecureCodecName(const char *mime, bool is_decoder, char *out_name);

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API MLResult ML_CALL MLMediaCodecListQueryResultsRelease(MLMediaCodecListQueryResults *query_results);

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API MLResult ML_CALL MLMediaCodecListGetSupportedProfileLevels(uint64_t index, const char *mime,
MLMediaCodecListProfileLevel **out_profile_levels, size_t *out_profile_levels_size);

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API MLResult ML_CALL MLMediaCodecListProfileLevelsRelease(MLMediaCodecListProfileLevel *profile_levels);

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API MLResult ML_CALL MLMediaCodecListGetSupportedColorFormats(uint64_t index, const char *mime,
uint32_t **out_color_formats, size_t *out_color_formats_size);

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API MLResult ML_CALL MLMediaCodecListColorFormatsRelease(uint32_t *color_formats);

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API MLResult ML_CALL MLMediaCodecListGetSupportedBitrateModes(uint64_t index, const char *mime,
MLMediaCodecBitrateMode **out_bitrate_modes, size_t *out_bitrate_modes_size);

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API MLResult ML_CALL MLMediaCodecBitrateModesRelease(MLMediaCodecBitrateMode *bitrate_modes);

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API MLResult ML_CALL MLMediaCodecListIsAdaptivePlaybackSupported(uint64_t index, const char *mime, bool *out_supported);

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API MLResult ML_CALL MLMediaCodecListIsSecurePlaybackSupported(uint64_t index, const char *mime, bool *out_supported);

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API MLResult ML_CALL MLMediaCodecListIsIntraRefreshSupported(uint64_t index, const char *mime, bool *out_supported);

ML_EXTERN_C_END