Skip to main content
Version: 21 Aug 2024

ml_media_format.h

Classes

Name
structMLMediaFormatByteArray

Types

Name
typedef struct MLMediaFormatByteArrayMLMediaFormatByteArray

Enums

Name
enumMLMediaFormatAudioEncoding
{
MLMediaFormatAudioEncoding_PCM16Bits = 2,
MLMediaFormatAudioEncoding_PCM8Bits = 3,
MLMediaFormatAudioEncoding_PCMFloat = 4,
MLMediaFormatAudioEncoding_PCM32Bits = 201,
MLMediaFormatAudioEncoding_Ensure32Bits = 0x7FFFFFFF
}

Functions

Name
MLResultMLMediaFormatCreateVideo(const char mime_type, int width, int height, MLHandle out_handle)
Create a video format object.
MLResultMLMediaFormatCreateAudio(const char mime_type, int sample_rate, int channel_count, MLHandle out_handle)
Create a audio format object.
MLResultMLMediaFormatCreateSubtitle(const char mime_type, const char language, MLHandle * out_handle)
Create a subtitle format object.
MLResultMLMediaFormatCreate(MLHandle * out_handle)
Create an empty format object.
MLResultMLMediaFormatCreateCopy(MLHandle handle, MLHandle * out_handle)
Create a copy of the format handle provided.
MLResultMLMediaFormatDestroy(MLHandle handle)
Destroy a MLMediaFormat object.
MLResultMLMediaFormatObjectToString(MLHandle handle, char * out_string)
Obtain the human readable representation of the format.
MLResultMLMediaFormatGetKeyValueInt32(MLHandle handle, MLMediaFormatKey name, int32_t * out_key)
Obtain the value of an integer key.
MLResultMLMediaFormatGetKeyValueInt64(MLHandle handle, MLMediaFormatKey name, int64_t * out_key)
Obtain the value of a long key.
MLResultMLMediaFormatGetKeyValueFloat(MLHandle handle, MLMediaFormatKey name, float * out_key)
Obtain the value of an float key.
MLResultMLMediaFormatGetKeySize(MLHandle handle, MLMediaFormatKey name, size_t * out_size)
Obtain the size of a key.
MLResultMLMediaFormatGetKeyString(MLHandle handle, MLMediaFormatKey name, char * out_string)
Obtain the value of a string key.
MLResultMLMediaFormatGetKeyByteBuffer(MLHandle handle, MLMediaFormatKey name, MLMediaFormatByteArray * out_buffer)
Obtain the value of a ByteBuffer key.
MLResultMLMediaFormatKeyByteBufferRelease(MLHandle handle, MLMediaFormatByteArray * buffer)
Release the ByteBuffer acquired by MLMediaFormatGetKeyByteBuffer.
MLResultMLMediaFormatSetKeyInt32(MLHandle handle, MLMediaFormatKey name, int32_t key_value)
Set the value of an integer key.
MLResultMLMediaFormatSetKeyInt64(MLHandle handle, MLMediaFormatKey name, int64_t key_value)
Set the value of a long key.
MLResultMLMediaFormatSetKeyFloat(MLHandle handle, MLMediaFormatKey name, float key_value)
Set the value of a float key.
MLResultMLMediaFormatSetKeySize(MLHandle handle, MLMediaFormatKey name, size_t key_size)
Set the size of a key.
MLResultMLMediaFormatSetKeyString(MLHandle handle, MLMediaFormatKey name, const char * key_value)
Set the value of a string key.
MLResultMLMediaFormatSetKeyByteBuffer(MLHandle handle, MLMediaFormatKey name, const MLMediaFormatByteArray * buffer)
Set the value of a ByteBuffer key.

Attributes

Name
const typedef char *MLMediaFormatKey
MLMediaFormatKeyMLMediaFormat_Key_AAC_Encoded_Target_Level
The format of media data (video/audio) is specified as key/value pairs. Below is a list of keys used to set/obtain format values.
MLMediaFormatKeyMLMediaFormat_Key_AAC_DRC_Boost_Factor
A key describing the boost factor allowing to adapt the dynamics of the output to the actual listening requirements. This relies on DRC gain sequences that can be transmitted in the encoded bitstream to be able to reduce the dynamics of the output signal upon request. This factor enables the user to select how much of the gains are applied.
MLMediaFormatKeyMLMediaFormat_Key_AAC_DRC_Attenuation_Factor
A key describing the attenuation factor allowing to adapt the dynamics of the output to the actual listening requirements.
MLMediaFormatKeyMLMediaFormat_Key_AAC_DRC_Heavy_Compression
A key describing the selection of the heavy compression profile for DRC.
MLMediaFormatKeyMLMediaFormat_Key_AAC_DRC_Target_Reference_Level
A key describing a gain to be applied so that the output loudness matches the Target Reference Level. This is typically used to normalize loudness across program items.
MLMediaFormatKeyMLMediaFormat_Key_AAC_Max_Output_Channel_Count
A key describing the maximum number of channels that can be output by the AAC decoder.
MLMediaFormatKeyMLMediaFormat_Key_AAC_Profile
A key describing the AAC profile to be used (AAC audio formats only).
MLMediaFormatKeyMLMediaFormat_Key_AAC_SBR_Mode
A key describing the AAC SBR mode to be used (AAC audio formats only).
MLMediaFormatKeyMLMediaFormat_Key_Bit_Rate
A key describing the average bitrate in bits/sec.
MLMediaFormatKeyMLMediaFormat_Key_Bit_Rate_Mode
A key describing the desired bitrate mode to be used by an encoder.
MLMediaFormatKeyMLMediaFormat_Key_Capture_Rate
A key describing the capture rate of a video format in frames/sec.
MLMediaFormatKeyMLMediaFormat_Key_Channel_Count
A key describing the number of channels in an audio format.
MLMediaFormatKeyMLMediaFormat_Key_Channel_Mask
A key describing the channel composition of audio content.
MLMediaFormatKeyMLMediaFormat_Key_Color_Format
A key describing the color format of the content in a video format.
MLMediaFormatKeyMLMediaFormat_Key_Duration
A key describing the duration (in microseconds) of the content.
MLMediaFormatKeyMLMediaFormat_Key_FLAC_Compression_Level
A key describing the FLAC compression level to be used (FLAC audio format only).
MLMediaFormatKeyMLMediaFormat_Key_Frame_Rate
A key describing the frame rate of a video format in frames/sec.
MLMediaFormatKeyMLMediaFormat_Key_Height
A key describing the height of the content in a video format.
MLMediaFormatKeyMLMediaFormat_Key_I_Frame_Interval
A key describing the frequency of key frames expressed in seconds between key frames.
MLMediaFormatKeyMLMediaFormat_Key_Intra_Refresh_Period
An optional key describing the period of intra refresh in frames.
MLMediaFormatKeyMLMediaFormat_Key_Is_ADTS
A key mapping to a value of 1 if the content is AAC audio and audio frames are prefixed with an ADTS header.
MLMediaFormatKeyMLMediaFormat_Key_Is_Autoselect
A key for boolean AUTOSELECT behavior for the track. Tracks with AUTOSELECT=true are considered when automatically selecting a track without specific user choice, based on the current locale. This is currently only used for subtitle tracks, when the user selected 'Default' for the captioning locale. The associated value is an integer, where non-0 means TRUE. This is an optional field; if not specified, AUTOSELECT defaults to TRUE.
MLMediaFormatKeyMLMediaFormat_Key_Is_Default
A key for boolean DEFAULT behavior for the track. The track with DEFAULT=true is selected in the absence of a specific user choice.
MLMediaFormatKeyMLMediaFormat_Key_Is_Forced_Subtitle
A key for the FORCED field for subtitle tracks.
MLMediaFormatKeyMLMediaFormat_Key_Language
A key describing the language of the content, using either ISO 639-1 or 639-2/T codes.
MLMediaFormatKeyMLMediaFormat_Key_Max_Height
A key describing the maximum expected height of the content in a video decoder format, in case there are resolution changes in the video content.
MLMediaFormatKeyMLMediaFormat_Key_Max_Input_Size
Described by this MediaFormat.
MLMediaFormatKeyMLMediaFormat_Key_Max_Width
A key describing the maximum expected width of the content in a video decoder format, in case there are resolution changes in the video content.
MLMediaFormatKeyMLMediaFormat_Key_Mime
A key describing the mime type of the MediaFormat.
MLMediaFormatKeyMLMediaFormat_Key_PCM_Encoding
A key describing the raw audio sample encoding/format.
MLMediaFormatKeyMLMediaFormat_Key_Push_Blank_Buffers_On_Stop
If specified when configuring a video decoder rendering to a surface, causes the decoder to output "blank", i.e. black frames to the surface.
MLMediaFormatKeyMLMediaFormat_Key_Repeat_Previous_Frame_After
Applies only when configuring a video encoder in "surface-input" mode.
MLMediaFormatKeyMLMediaFormat_Key_Sample_Rate
A key describing the sample rate of an audio format.
MLMediaFormatKeyMLMediaFormat_Key_Stride
A key describing the stride of the video bytebuffer layout.
MLMediaFormatKeyMLMediaFormat_Key_Temporal_Layering
A key describing the temporal layering schema.
MLMediaFormatKeyMLMediaFormat_Key_Width
A key describing the width of the content in a video format.
MLMediaFormatKeyMLMediaFormat_Key_Crop_Left
The left-coordinate (x) of the crop rectangle.
MLMediaFormatKeyMLMediaFormat_Key_Crop_Right
The right-coordinate (x) MINUS 1 of the crop rectangle.
MLMediaFormatKeyMLMediaFormat_Key_Crop_Bottom
The bottom-coordinate (y) MINUS 1 of the crop rectangle.
MLMediaFormatKeyMLMediaFormat_Key_Crop_Top
The top-coordinate (y) of the crop rectangle.
MLMediaFormatKeyMLMediaFormat_Key_Operating_Rate
A key describing the desired operating frame rate for video or sample rate for audio that the codec will need to operate at.
MLMediaFormatKeyMLMediaFormat_Key_Latency
An optional key describing the desired encoder latency in frames.
MLMediaFormatKeyMLMediaFormat_Key_Parameter_Video_Bitrate
A key describing the desired video bitrate.
MLMediaFormatKeyMLMediaFormat_Key_Parameter_Request_Sync_Frame
Request that the encoder produce a sync frame "soon".
MLMediaFormatKeyMLMediaFormat_Key_Parameter_Set_Suspend
Temporarily suspend/resume encoding of input data.
MLMediaFormatKeyMLMediaFormat_Key_Parameter_Set_Suspend_Time
When PARAMETER_KEY_SUSPEND is present, the client can also optionally use this key to specify the timestamp (in micro-second) at which the suspend/resume operation takes effect.
MLMediaFormatKeyMLMediaFormat_Key_Parameter_Drop_Before
A key describing the desired before which frames are to be skipped.
MLMediaFormatKeyMLMediaFormat_Key_Parameter_Drop_After
A key describing the desired after which frames are to be skipped.
MLMediaFormatKeyMLMediaFormat_Key_Parameter_Offset_Time
Specify an offset (in micro-second) to be added on top of the timestamps onward.
MLMediaFormatKeyMLMediaFormat_Key_Priority
A key describing the desired codec priority.
MLMediaFormatKeyMLMediaFormat_Key_Max_B_Frames
A key describing the maximum number of B frames between I or P frames, to be used by a video encoder.
MLMediaFormatKeyMLMediaFormat_Key_Intra_Refresh_Mode
An optional key describing the mode of intra refresh in frames. The associated value is an integer.
MLMediaFormatKeyMLMediaFormat_Key_Intra_Refresh_CIR_Num
Number of consecutive macroblocks to be coded as intra when CIR is enabled.
MLMediaFormatKeyMLMediaFormat_Key_Intra_Refresh_AIR_Num
Number of intra macroblocks to refresh in a frame when AIR is enabled.
MLMediaFormatKeyMLMediaFormat_Key_Intra_Refresh_AIR_Ref
Number of times a motion marked macroblock has to be intra coded.
MLMediaFormatKeyMLMediaFormat_Key_Profile
A key describing the desired profile to be used by an encoder.
MLMediaFormatKeyMLMediaFormat_Key_Level
A key describing the desired level to be used by an encoder.
MLMediaFormatKeyMLMediaFormat_Key_Prepend_Header_To_Sync_Frames
An optional key describing whether encoders prepend headers to sync frames (e.g. SPS and PPS to IDR frames for H.264).
MLMediaFormatKeyMLMediaFormat_Key_Color_Range
An optional key describing the range of the component values of the video content.
MLMediaFormatKeyMLMediaFormat_Key_Color_Standard
An optional key describing the color primaries, white point and luminance factors for video content.
MLMediaFormatKeyMLMediaFormat_Key_Color_Transfer
An optional key describing the opto-electronic transfer function used for the video content.
MLMediaFormatKeyMLMediaFormat_Key_HDR_Static_Info
An optional key describing the static metadata of HDR (high-dynamic-range) video content.
MLMediaFormatKeyMLMediaFormat_Key_CSD
A key describing the codec specific data.
MLMediaFormatKeyMLMediaFormat_Key_CSD0
A key describing the codec specific data buffer #0.
MLMediaFormatKeyMLMediaFormat_Key_CSD1
A key describing the codec specific data buffer #1.
MLMediaFormatKeyMLMediaFormat_Key_CSD2
A key describing the codec specific data buffer #2.
MLMediaFormatKeyMLMediaFormat_Key_CSD_Avc
A key describing the codec specific data buffer for AVC (h.264).
MLMediaFormatKeyMLMediaFormat_Key_CSD_Hevc
A key describing the codec specific data buffer for HEVC (h.265).
MLMediaFormatKeyMLMediaFormat_Key_Album
A key describing metadata - album title of the media.
MLMediaFormatKeyMLMediaFormat_Key_Albumart
A key describing metadata. The artwork for the album of the media's original source as a Bitmap.
MLMediaFormatKeyMLMediaFormat_Key_Albumartist
A key describing metadata. The artist for the album of the media's original source.
MLMediaFormatKeyMLMediaFormat_Key_Artist
A key describing metadata. The artist of the media.
MLMediaFormatKeyMLMediaFormat_Key_Audio_Presentation_Info
A key describing metadata. The media presentation info.
MLMediaFormatKeyMLMediaFormat_Key_Audio_Presentation_Presentation_Id
A key describing metadata. The media presentation Id.
MLMediaFormatKeyMLMediaFormat_Key_Audio_Presentation_Program_Id
A key describing metadata. The media program Id.
MLMediaFormatKeyMLMediaFormat_Key_Audio_Session_Id
A key describing the audio session ID of the AudioTrack associated to a tunneled video codec.
MLMediaFormatKeyMLMediaFormat_Key_Author
A key describing metadata. The author of the media.
MLMediaFormatKeyMLMediaFormat_Key_Bits_Per_Sample
Key representing media number of bits per sample.
MLMediaFormatKeyMLMediaFormat_Key_Cdtracknumber
A key describing metadata. The cd track number.
MLMediaFormatKeyMLMediaFormat_Key_Compilation
A key describing metadata. The media compilation.
MLMediaFormatKeyMLMediaFormat_Key_Complexity
A key describing the encoding complexity.
MLMediaFormatKeyMLMediaFormat_Key_Composer
A key describing metadata - composer of the media.
MLMediaFormatKeyMLMediaFormat_Key_Create_Input_Surface_Suspended
If specified when configuring a video encoder that's in "surface-input" mode, it will instruct the encoder to put the surface source in suspended state when it's connected.
MLMediaFormatKeyMLMediaFormat_Key_Crypto_Default_Iv_Size
MLMediaFormatKeyMLMediaFormat_Key_Crypto_Encrypted_Byte_Block
MLMediaFormatKeyMLMediaFormat_Key_Crypto_Encrypted_Sizes
MLMediaFormatKeyMLMediaFormat_Key_Crypto_Iv
MLMediaFormatKeyMLMediaFormat_Key_Crypto_Key
MLMediaFormatKeyMLMediaFormat_Key_Crypto_Mode
MLMediaFormatKeyMLMediaFormat_Key_Crypto_Plain_Sizes
MLMediaFormatKeyMLMediaFormat_Key_Crypto_Skip_Byte_Block
MLMediaFormatKeyMLMediaFormat_Key_D263
MLMediaFormatKeyMLMediaFormat_Key_Date
A key describing metadata - The date the media was created or published. The format is unspecified but RFC 3339 is recommended.
MLMediaFormatKeyMLMediaFormat_Key_Discnumber
A key describing metadata. The disc number for the media's original source.
MLMediaFormatKeyMLMediaFormat_Key_Display_Crop
A key describing display crop rectangle.
MLMediaFormatKeyMLMediaFormat_Key_Display_Height
MLMediaFormatKeyMLMediaFormat_Key_Display_Width
MLMediaFormatKeyMLMediaFormat_Key_Encoder_Delay
A key describing the number of frames to trim from the start of the decoded audio stream.
MLMediaFormatKeyMLMediaFormat_Key_Encoder_Padding
A key describing the number of frames to trim from the end of the decoded audio stream.
MLMediaFormatKeyMLMediaFormat_Key_Esds
A key describing the electrostatic discharge and soldering (ESDS).
MLMediaFormatKeyMLMediaFormat_Key_Exif_Offset
MLMediaFormatKeyMLMediaFormat_Key_Exif_Size
MLMediaFormatKeyMLMediaFormat_Key_Frame_Count
MLMediaFormatKeyMLMediaFormat_Key_Genre
A key describing metadata. The media genre.
MLMediaFormatKeyMLMediaFormat_Key_Grid_Columns
A key describing the number of grid columns in the content in a MIMETYPE_IMAGE_ANDROID_HEIC track.
MLMediaFormatKeyMLMediaFormat_Key_Grid_Rows
A key describing the number of grid rows in the content in a MIMETYPE_IMAGE_ANDROID_HEIC track.
MLMediaFormatKeyMLMediaFormat_Key_Haptic_Channel_Count
A key describing the number of haptic channels in an audio format.
MLMediaFormatKeyMLMediaFormat_Key_Hdr10_Plus_Info
An optional key describing the HDR10+ metadata of the video content.
MLMediaFormatKeyMLMediaFormat_Key_Icc_Profile
MLMediaFormatKeyMLMediaFormat_Key_Is_Sync_Frame
MLMediaFormatKeyMLMediaFormat_Key_Location
A key describing metadata. The media location.
MLMediaFormatKeyMLMediaFormat_Key_Loop
A key describing metadata. The media loop.
MLMediaFormatKeyMLMediaFormat_Key_Lyricist
A key describing metadata. The media lyricist.
MLMediaFormatKeyMLMediaFormat_Key_Manufacturer
A key describing metadata. The media manufacturer.
MLMediaFormatKeyMLMediaFormat_Key_Max_Bit_Rate
A key describing the max bitrate in bits/sec.
MLMediaFormatKeyMLMediaFormat_Key_Max_Fps_To_Encoder
Instruct the video encoder in "surface-input" mode to drop excessive frames from the source, so that the input frame rate to the encoder does not exceed the specified fps.
MLMediaFormatKeyMLMediaFormat_Key_Max_Pts_Gap_To_Encoder
Instruct the video encoder in "surface-input" mode to limit the gap of timestamp between any two adjacent frames fed to the encoder to the specified amount (in micro-second).
MLMediaFormatKeyMLMediaFormat_Key_Mpeg_User_Data
MLMediaFormatKeyMLMediaFormat_Key_Mpeg2_Stream_Header
MLMediaFormatKeyMLMediaFormat_Key_PCM_Big_Endian
MLMediaFormatKeyMLMediaFormat_Key_Pssh
MLMediaFormatKeyMLMediaFormat_Key_Rotation
A key describing the desired clockwise rotation on an output surface.
MLMediaFormatKeyMLMediaFormat_Key_Sar_Height
MLMediaFormatKeyMLMediaFormat_Key_Sar_Width
MLMediaFormatKeyMLMediaFormat_Key_Sei
MLMediaFormatKeyMLMediaFormat_Key_Slice_Height
A key describing the plane height of a multi-planar (YUV) video bytebuffer layout.
MLMediaFormatKeyMLMediaFormat_Key_Target_Time
MLMediaFormatKeyMLMediaFormat_Key_Temporal_Layer_Count
MLMediaFormatKeyMLMediaFormat_Key_Temporal_Layer_Id
MLMediaFormatKeyMLMediaFormat_Key_Text_Format_Data
MLMediaFormatKeyMLMediaFormat_Key_Thumbnail_CSD_Hevc
MLMediaFormatKeyMLMediaFormat_Key_Thumbnail_Height
MLMediaFormatKeyMLMediaFormat_Key_Thumbnail_Time
MLMediaFormatKeyMLMediaFormat_Key_Thumbnail_Width
MLMediaFormatKeyMLMediaFormat_Key_Tile_Height
A key describing the height (in pixels) of each tile of the content in a MIMETYPE_IMAGE_ANDROID_HEIC track. The associated value is an integer.
MLMediaFormatKeyMLMediaFormat_Key_Tile_Width
A key describing the width (in pixels) of each tile of the content in a MIMETYPE_IMAGE_ANDROID_HEIC track. The associated value is an integer.
MLMediaFormatKeyMLMediaFormat_Key_Time_Us
MLMediaFormatKeyMLMediaFormat_Key_Title
A key describing metadata. The title of the media.
MLMediaFormatKeyMLMediaFormat_Key_Track_Id
A key describing a unique ID for the content of a media track.
MLMediaFormatKeyMLMediaFormat_Key_Track_Index
MLMediaFormatKeyMLMediaFormat_Key_Valid_Samples
MLMediaFormatKeyMLMediaFormat_Key_Year
A key describing metadata. The year the media was created or published as a long.
MLMediaFormatKeyMLMediaFormat_Key_AAC_DRC_Effect_Type
A key describing for selecting the DRC effect type for MPEG-D DRC.
MLMediaFormatKeyMLMediaFormat_Key_Quality
A key describing the desired encoding quality.
MLMediaFormatKeyMLMediaFormat_Key_Output_Reorder_Depth
An optional key describing the maximum number of non-display-order coded frames.
MLMediaFormatKeyMLMediaFormat_Key_Is_Timed_Text
MLMediaFormatKeyMLMediaFormat_Key_Ca_System_Id
A key describing the system id of the conditional access system used to scramble a media track.
MLMediaFormatKeyMLMediaFormat_Key_Ca_Session_Id
A key describing the MediaCas.Session object associated with a media track.
MLMediaFormatKeyMLMediaFormat_Key_Ca_Private_Data
A key describing the private data in the CA_descriptor associated with a media track.
MLMediaFormatKeyMLMediaFormatKey_Feature
A key prefix used together with a MLMediaCodecBitrateMode feature name describing a required or optional feature for a codec capabilities query.

Defines

Name
MAX_FORMAT_STRING_SIZE
MAX_KEY_STRING_SIZE

Enums Documentation

MLMediaFormatAudioEncoding

EnumeratorValueDescription
MLMediaFormatAudioEncoding_PCM16Bits2Audio data format: PCM 16 bits per sample.
MLMediaFormatAudioEncoding_PCM8Bits3Audio data format: PCM 8 bits per sample.
MLMediaFormatAudioEncoding_PCMFloat4Audio data format: single-precision floating-point per sample.
MLMediaFormatAudioEncoding_PCM32Bits201Audio data format: PCM 32 bits per sample.
MLMediaFormatAudioEncoding_Ensure32Bits0x7FFFFFFFEnsure enum is represented as 32 bits.

Types Documentation

MLMediaFormatByteArray

typedef struct MLMediaFormatByteArray MLMediaFormatByteArray;

Data type containing byte array buffer and the size.

More Info


Functions Documentation

MLMediaFormatCreateVideo

MLResult MLMediaFormatCreateVideo(
const char * mime_type,
int width,
int height,
MLHandle * out_handle
)

Create a video format object.

Parameters

const char *mime_typeMime type of the content.
intwidthWidth of the content in pixels.
intheightHeight of the content in pixels.
MLHandle *out_handleA handle to the created video format object. If there is an error during creation, it will return ML_INVALID_HANDLE.

Returns

MLResultMLResult_AllocFailedIf handle cannot be allocated.
MLResultMLResult_InvalidParamIf one of parameters is invalid.
MLResultMLResult_OkIf operation succeeded.

Required Permissions:

  • None
Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormatCreateAudio

MLResult MLMediaFormatCreateAudio(
const char * mime_type,
int sample_rate,
int channel_count,
MLHandle * out_handle
)

Create a audio format object.

Parameters

const char *mime_typeMime type of the content.
intsample_rateSample rate of the content.
intchannel_countNumber of audio channels.
MLHandle *out_handleA handle to the created audio format object. If there is an error during creation, it will return ML_INVALID_HANDLE.

Returns

MLResultMLResult_AllocFailedIf handle cannot be allocated.
MLResultMLResult_InvalidParamIf one of parameters is invalid.
MLResultMLResult_OkIf operation succeeded.
MLResultMLResult_UnspecifiedFailureThe operation failed with an unspecified error.

Required Permissions:

  • None
Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormatCreateSubtitle

MLResult MLMediaFormatCreateSubtitle(
const char * mime_type,
const char * language,
MLHandle * out_handle
)

Create a subtitle format object.

Parameters

const char *mime_typeMime type of the content.
const char *languageLanguage of the content, using either ISO 639-1 or 639-2/T codes. Specify null or "und" if language information is only included in the content (This will also work if there are multiple language tracks in the content).
MLHandle *out_handleA handle to the created subtitle format object. If there is an error during creation, it will return ML_INVALID_HANDLE.

Returns

MLResultMLResult_AllocFailedIf handle cannot be allocated.
MLResultMLResult_InvalidParamIf one of parameters is invalid.
MLResultMLResult_OkIf operation succeeded.
MLResultMLResult_UnspecifiedFailureThe operation failed with an unspecified error.

Required Permissions:

  • None
Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormatCreate

MLResult MLMediaFormatCreate(
MLHandle * out_handle
)

Create an empty format object.

Parameters

MLHandle *out_handleA handle to the created empty format object. If there is an error during creation, it will return ML_INVALID_HANDLE.

Returns

MLResultMLResult_AllocFailedIf handle cannot be allocated.
MLResultMLResult_OkIf operation succeeded.
MLResultMLResult_InvalidParamIf one of parameters is invalid.

Required Permissions:

  • None
Deprecated

Deprecated since 1.4.0. Scheduled for removal.

API Level:

  • 9

MLMediaFormatCreateCopy

MLResult MLMediaFormatCreateCopy(
MLHandle handle,
MLHandle * out_handle
)

Create a copy of the format handle provided.

Parameters

MLHandlehandleMLHandle to the MLMediaFormat object.
MLHandle *out_handleA handle to the created copy of the format object. If there is an error during creation, it will return ML_INVALID_HANDLE.

Returns

MLResultMLResult_AllocFailedIf handle cannot be allocated.
MLResultMLResult_OkIf operation succeeded.
MLResultMLResult_InvalidParamIf one of parameters is invalid.

Required Permissions:

  • None

This can be particularly useful to persist the media format handle/object that was received through the callbacks (as life cycle of those media format objects are with in the callback context only).

The API call to make a copy ensures that the copied object exists until released with MLMediaFormatDestroy call.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.

API Level:

  • 20

MLMediaFormatDestroy

MLResult MLMediaFormatDestroy(
MLHandle handle
)

Destroy a MLMediaFormat object.

Parameters

MLHandlehandleMLHandle to the MLMediaFormat object.

Returns

MLResultMLResult_InvalidParamIf handle is invalid.
MLResultMLResult_OkIf MLMediaCodec object was successfully destroyed.
MLResultMLResult_UnspecifiedFailureThe operation failed with an unspecified error.

Required Permissions:

  • None
Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormatObjectToString

MLResult MLMediaFormatObjectToString(
MLHandle handle,
char * out_string
)

Obtain the human readable representation of the format.

Parameters

MLHandlehandleMLHandle to the MLMediaFormat object.
char *out_stringBuffer to which stringify the media format. Shouldn't be NULL.

Returns

MLResultMLResult_InvalidParamIf one of parameters is invalid.
MLResultMLResult_OkIf operation succeeded.
MLResultMLResult_UnspecifiedFailureThe operation failed with an unspecified error.

Required Permissions:

  • None

User shall allocate at least MAX_FORMAT_STRING_SIZE bytes of memory for storing the output format string. The format string contains a list of key-value pairs, which can be extracted individually via the suitable "GetKeyValue" APIs.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormatGetKeyValueInt32

MLResult MLMediaFormatGetKeyValueInt32(
MLHandle handle,
MLMediaFormatKey name,
int32_t * out_key
)

Obtain the value of an integer key.

Parameters

MLHandlehandleMLHandle to the MLMediaFormat object.
MLMediaFormatKeynameC-string representation of the key. Must be one of the MLMediaFormatKey tags defined above.
int32_t *out_keyValue of the key.

Returns

MLResultMLResult_InvalidParamIf one of parameters is invalid.
MLResultMLResult_OkIf operation succeeded.
MLResultMLResult_UnspecifiedFailureThe operation failed with an unspecified error.
MLResultMLMediaGenericResult_NameNotFoundIf name is not one of the media format key name.

Required Permissions:

  • None

For example, use MLMediaFormat_Key_Frame_Rate key to get the framerate of a video track.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormatGetKeyValueInt64

MLResult MLMediaFormatGetKeyValueInt64(
MLHandle handle,
MLMediaFormatKey name,
int64_t * out_key
)

Obtain the value of a long key.

Parameters

MLHandlehandleMLHandle to the MLMediaFormat object.
MLMediaFormatKeynameC-string representation of the key. Must be one of the MLMediaFormatKey tags defined above.
int64_t *out_keyValue of the key.

Returns

MLResultMLResult_InvalidParamIf one of parameters is invalid.
MLResultMLResult_OkIf operation succeeded.
MLResultMLResult_UnspecifiedFailureThe operation failed with an unspecified error.
MLResultMLMediaGenericResult_NameNotFoundIf name is not one of the media format key name.

Required Permissions:

  • None

For example, use MLMediaFormat_Key_Duration key to get duration of a track.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormatGetKeyValueFloat

MLResult MLMediaFormatGetKeyValueFloat(
MLHandle handle,
MLMediaFormatKey name,
float * out_key
)

Obtain the value of an float key.

Parameters

MLHandlehandleMLHandle to the MLMediaFormat object.
MLMediaFormatKeynameC-string representation of the key. Must be one of the MLMediaFormatKey tags defined above.
float *out_keyValue of the key.

Returns

MLResultMLResult_InvalidParamIf one of parameters is invalid.
MLResultMLResult_OkIf operation succeeded.
MLResultMLResult_UnspecifiedFailureThe operation failed with an unspecified error.
MLResultMLMediaGenericResult_NameNotFoundIf name is not one of the media format key name.

Required Permissions:

  • None
Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormatGetKeySize

MLResult MLMediaFormatGetKeySize(
MLHandle handle,
MLMediaFormatKey name,
size_t * out_size
)

Obtain the size of a key.

Parameters

MLHandlehandleMLHandle to the MLMediaFormat object.
MLMediaFormatKeynameC-string representation of the key. Must be one of the MLMediaFormatKey tags defined above.
size_t *out_sizeSize of the key.

Returns

MLResultMLResult_InvalidParamIf one of parameters is invalid.
MLResultMLResult_OkIf operation succeeded.
MLResultMLResult_UnspecifiedFailureThe operation failed with an unspecified error.
MLResultMLMediaGenericResult_NameNotFoundIf name is not one of the media format key name.

Required Permissions:

  • None
Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormatGetKeyString

MLResult MLMediaFormatGetKeyString(
MLHandle handle,
MLMediaFormatKey name,
char * out_string
)

Obtain the value of a string key.

Parameters

MLHandlehandleMLHandle to the MLMediaFormat object.
MLMediaFormatKeynameC-string representation of the key. Must be one of the MLMediaFormatKey tags defined above.
char *out_stringPointer to the C-string representation of the string key.

Returns

MLResultMLResult_InvalidParamIf one of parameters is invalid.
MLResultMLResult_OkIf operation succeeded.
MLResultMLResult_UnspecifiedFailureThe operation failed with an unspecified error.
MLResultMLMediaGenericResult_NameNotFoundIf name is not one of the media format key name.

Required Permissions:

  • None

User shall allocate at least MAX_KEY_STRING_SIZE bytes of memory for storing the output key string.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormatGetKeyByteBuffer

MLResult MLMediaFormatGetKeyByteBuffer(
MLHandle handle,
MLMediaFormatKey name,
MLMediaFormatByteArray * out_buffer
)

Obtain the value of a ByteBuffer key.

Parameters

MLHandlehandleMLHandle to the MLMediaFormat object.
MLMediaFormatKeynameC-string representation of the key. Must be one of the MLMediaFormatKey tags defined above.
MLMediaFormatByteArray *out_bufferPointer to byte buffer that needs to be allocated and copied to. To free/release, call MLMediaFormatKeyByteBufferRelease().

Returns

MLResultMLResult_InvalidParamIf one of parameters is invalid.
MLResultMLResult_OkIf operation succeeded.
MLResultMLResult_UnspecifiedFailureThe operation failed with an unspecified error.
MLResultMLMediaGenericResult_NameNotFoundIf name is not one of the media format key name.

Required Permissions:

  • None
Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormatKeyByteBufferRelease

MLResult MLMediaFormatKeyByteBufferRelease(
MLHandle handle,
MLMediaFormatByteArray * buffer
)

Release the ByteBuffer acquired by MLMediaFormatGetKeyByteBuffer.

Parameters

MLHandlehandleMLHandle to the MLMediaFormat object.
MLMediaFormatByteArray *bufferByte buffer that needs to be released.

Returns

MLResultMLResult_InvalidParamIf one of parameters is invalid.
MLResultMLResult_OkIf operation succeeded.
MLResultMLResult_UnspecifiedFailureThe operation failed with an unspecified error.

Required Permissions:

  • None
Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormatSetKeyInt32

MLResult MLMediaFormatSetKeyInt32(
MLHandle handle,
MLMediaFormatKey name,
int32_t key_value
)

Set the value of an integer key.

Parameters

MLHandlehandleMLHandle to the MLMediaFormat object.
MLMediaFormatKeynameC-string representation of the key. Must be one of the MLMediaFormatKey tags defined above.
int32_tkey_valueKey value.

Returns

MLResultMLResult_InvalidParamIf one of parameters is invalid.
MLResultMLResult_OkIf operation succeeded.
MLResultMLResult_UnspecifiedFailureThe operation failed with an unspecified error.

Required Permissions:

  • None
Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormatSetKeyInt64

MLResult MLMediaFormatSetKeyInt64(
MLHandle handle,
MLMediaFormatKey name,
int64_t key_value
)

Set the value of a long key.

Parameters

MLHandlehandleMLHandle to the MLMediaFormat object.
MLMediaFormatKeynameC-string representation of the key. Must be one of the MLMediaFormatKey tags defined above.
int64_tkey_valueKey value.

Returns

MLResultMLResult_InvalidParamIf one of parameters is invalid.
MLResultMLResult_OkIf operation succeeded.
MLResultMLResult_UnspecifiedFailureThe operation failed with an unspecified error.

Required Permissions:

  • None
Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormatSetKeyFloat

MLResult MLMediaFormatSetKeyFloat(
MLHandle handle,
MLMediaFormatKey name,
float key_value
)

Set the value of a float key.

Parameters

MLHandlehandleMLHandle to the MLMediaFormat object.
MLMediaFormatKeynameC-string representation of the key. Must be one of the MLMediaFormatKey tags defined above.
floatkey_valueKey value.

Returns

MLResultMLResult_InvalidParamIf one of parameters is invalid.
MLResultMLResult_OkIf operation succeeded.
MLResultMLResult_UnspecifiedFailureThe operation failed with an unspecified error.

Required Permissions:

  • None
Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormatSetKeySize

MLResult MLMediaFormatSetKeySize(
MLHandle handle,
MLMediaFormatKey name,
size_t key_size
)

Set the size of a key.

Parameters

MLHandlehandleMLHandle to the MLMediaFormat object.
MLMediaFormatKeynameC-string representation of the key. Must be one of the MLMediaFormatKey tags defined above.
size_tkey_sizeKey size.

Returns

MLResultMLResult_InvalidParamIf one of parameters is invalid.
MLResultMLResult_OkIf operation succeeded.
MLResultMLResult_UnspecifiedFailureThe operation failed with an unspecified error.

Required Permissions:

  • None
Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormatSetKeyString

MLResult MLMediaFormatSetKeyString(
MLHandle handle,
MLMediaFormatKey name,
const char * key_value
)

Set the value of a string key.

Parameters

MLHandlehandleMLHandle to the MLMediaFormat object.
MLMediaFormatKeynameC-string representation of the key. Must be one of the MLMediaFormatKey tags defined above.
const char *key_valueC-string representation of key value.

Returns

MLResultMLResult_InvalidParamIf one of parameters is invalid.
MLResultMLResult_OkIf operation succeeded.
MLResultMLResult_UnspecifiedFailureThe operation failed with an unspecified error.

Required Permissions:

  • None
Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormatSetKeyByteBuffer

MLResult MLMediaFormatSetKeyByteBuffer(
MLHandle handle,
MLMediaFormatKey name,
const MLMediaFormatByteArray * buffer
)

Set the value of a ByteBuffer key.

Parameters

MLHandlehandleMLHandle to the MLMediaFormat object.
MLMediaFormatKeynameC-string representation of the key. Must be one of the MLMediaFormatKey tags defined above.
const MLMediaFormatByteArray *bufferPointer to the data buffer for the corresponding key.

Returns

MLResultMLResult_InvalidParamIf one of parameters is invalid.
MLResultMLResult_OkIf operation succeeded.
MLResultMLResult_UnspecifiedFailureThe operation failed with an unspecified error.

Required Permissions:

  • None
Deprecated

Deprecated since 1.4.0. Scheduled for removal.


Attributes Documentation

MLMediaFormatKey

const typedef char * MLMediaFormatKey;

MLMediaFormat_Key_AAC_Encoded_Target_Level

MLMediaFormatKey MLMediaFormat_Key_AAC_Encoded_Target_Level;

The format of media data (video/audio) is specified as key/value pairs. Below is a list of keys used to set/obtain format values.

A key describing the target reference level that was assumed at the encoder for calculation of attenuation gains for clipping prevention.

If it is known, this information can be provided as an integer value between 0 and 127, which is calculated as -4 * Encoded Target Level in LKFS. If the Encoded Target Level is unknown, the value can be set to -1.

The default value is -1 (unknown).

The value is ignored when heavy compression is used (see {}). This key is only used during decoding.

The associated value is an integer.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_AAC_DRC_Boost_Factor

MLMediaFormatKey MLMediaFormat_Key_AAC_DRC_Boost_Factor;

A key describing the boost factor allowing to adapt the dynamics of the output to the actual listening requirements. This relies on DRC gain sequences that can be transmitted in the encoded bitstream to be able to reduce the dynamics of the output signal upon request. This factor enables the user to select how much of the gains are applied.

Positive gains (boost) and negative gains (attenuation, see {}) can be controlled separately for a better match to different use-cases. Typically, attenuation gains are sent for loud signal segments, and boost gains are sent for soft signal segments. If the output is listened to in a noisy environment, for example, the boost factor is used to enable the positive gains, i.e. to amplify soft signal segments beyond the noise floor. But for listening late at night, the attenuation factor is used to enable the negative gains, to prevent loud signal from surprising the listener. In applications which generally need a low dynamic range, both the boost factor and the attenuation factor are used to enable all DRC gains.

In order to prevent clipping, it is also recommended to apply the attenuation gains in case of a downmix and/or loudness normalization to high target reference levels.

Both the boost and the attenuation factor parameters are given as integer values between 0 and 127, representing the range of the factor of 0 (i.e. don't apply) to 1 (i.e. fully apply boost/attenuation gains respectively).

The default value is 127 (fully apply boost DRC gains).

This key is only used during decoding.

The associated value is an integer.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_AAC_DRC_Attenuation_Factor

MLMediaFormatKey MLMediaFormat_Key_AAC_DRC_Attenuation_Factor;

A key describing the attenuation factor allowing to adapt the dynamics of the output to the actual listening requirements.

See {} for a description of the role of this attenuation factor and the value range. The default value is 127 (fully apply attenuation DRC gains).

This key is only used during decoding.

The associated value is an integer.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_AAC_DRC_Heavy_Compression

MLMediaFormatKey MLMediaFormat_Key_AAC_DRC_Heavy_Compression;

A key describing the selection of the heavy compression profile for DRC.

Two separate DRC gain sequences can be transmitted in one bitstream: MPEG-4 DRC light compression, and DVB-specific heavy compression. When selecting the application of the heavy compression, one of the sequences is selected:

  • 0 enables light compression,
  • 1 enables heavy compression instead.

Note that only light compression offers the features of scaling of DRC gains (see {} and { #MLMediaFormat_Key_AAC_DRC_Attenuation_Factor} for the boost and attenuation factors, and frequency-selective (multiband) DRC. Light compression usually contains clipping prevention for stereo downmixing while heavy compression, if additionally provided in the bitstream, is usually stronger, and contains clipping prevention for stereo and mono downmixing. The default is 1 (heavy compression).

This key is only used during decoding.

The associated value is an integer.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_AAC_DRC_Target_Reference_Level

MLMediaFormatKey MLMediaFormat_Key_AAC_DRC_Target_Reference_Level;

A key describing a gain to be applied so that the output loudness matches the Target Reference Level. This is typically used to normalize loudness across program items.

The gain is derived as the difference between the Target Reference Level and the Program Reference Level. The latter can be given in the bitstream and indicates the actual loudness value of the program item.

The Target Reference Level controls loudness normalization for both MPEG-4 DRC and MPEG-D DRC.

The value is given as an integer value between 40 and 127, and is calculated as -4 * Target Reference Level in LKFS. Therefore, it represents the range of -10 to -31.75 LKFS.

The default value on mobile devices is 64 (-16 LKFS).

This key is only used during decoding.

The associated value is an integer.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_AAC_Max_Output_Channel_Count

MLMediaFormatKey MLMediaFormat_Key_AAC_Max_Output_Channel_Count;

A key describing the maximum number of channels that can be output by the AAC decoder.

By default, the decoder will output the same number of channels as present in the encoded stream, if supported. Set this value to limit the number of output channels, and use the downmix information in the stream, if available.

Values larger than the number of channels in the content to decode are ignored.

This key is only used during decoding.

The associated value is an integer.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_AAC_Profile

MLMediaFormatKey MLMediaFormat_Key_AAC_Profile;

A key describing the AAC profile to be used (AAC audio formats only).

Constants are declared in MLMediaCodecListGetSupportedProfileLevels.

The associated value is an integer.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_AAC_SBR_Mode

MLMediaFormatKey MLMediaFormat_Key_AAC_SBR_Mode;

A key describing the AAC SBR mode to be used (AAC audio formats only).

The associated value is an integer and can be set to following values:

  • 0 - no SBR should be applied.
  • 1 - single rate SBR.
  • 2 - double rate SBR.

Note: If this key is not defined the default SRB mode for the desired AAC profile will be used.

This key is only used during encoding.

The associated value is an integer.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Bit_Rate

MLMediaFormatKey MLMediaFormat_Key_Bit_Rate;

A key describing the average bitrate in bits/sec.

The associated value is an integer.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Bit_Rate_Mode

MLMediaFormatKey MLMediaFormat_Key_Bit_Rate_Mode;

A key describing the desired bitrate mode to be used by an encoder.

Constants are declared in MLMediaCodecBitrateMode.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Capture_Rate

MLMediaFormatKey MLMediaFormat_Key_Capture_Rate;

A key describing the capture rate of a video format in frames/sec.

When capture rate is different than the frame rate, it means that the video is acquired at a different rate than the playback, which produces slow motion or timelapse effect during playback. Application can use the value of this key to tell the relative speed ratio between capture and playback rates when the video was recorded.

The associated value is an integer or a float.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Channel_Count

MLMediaFormatKey MLMediaFormat_Key_Channel_Count;

A key describing the number of channels in an audio format.

The associated value is an integer.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Channel_Mask

MLMediaFormatKey MLMediaFormat_Key_Channel_Mask;

A key describing the channel composition of audio content.

This mask is composed of bits drawn from channel mask definitions in android.media.AudioFormat.

The associated value is an integer.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Color_Format

MLMediaFormatKey MLMediaFormat_Key_Color_Format;

A key describing the color format of the content in a video format.

Constants are declared in MLMediaCodecBitrateMode.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Duration

MLMediaFormatKey MLMediaFormat_Key_Duration;

A key describing the duration (in microseconds) of the content.

The associated value is a long.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_FLAC_Compression_Level

MLMediaFormatKey MLMediaFormat_Key_FLAC_Compression_Level;

A key describing the FLAC compression level to be used (FLAC audio format only).

The associated value is an integer ranging from 0 (fastest, least compression) to 8 (slowest, most compression).

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Frame_Rate

MLMediaFormatKey MLMediaFormat_Key_Frame_Rate;

A key describing the frame rate of a video format in frames/sec.

The associated value is normally an integer when the value is used by the platform, but video codecs also accept float configuration values. Specifically, MLMediaExtractor::getTrackFormat provides an integer value corresponding to the frame rate information of the track if specified and non-zero. Otherwise, this key is not present. MLMediaCodec::configure accepts both float and integer values. This represents the desired operating frame rate if the {} is not present and { #MLMediaFormat_Key_Priority} is 0 (realtime). For video encoders this value corresponds to the intended frame rate, although encoders are expected to support variable frame rate based on MLMediaCodec.BufferInfo#presentationTimeUs buffer timestamp. This key is not used in the MLMediaCodec#getInputFormat input/ MLMediaCodec#getOutputFormat output formats, nor by MLMediaMuxer#addTrack.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Height

MLMediaFormatKey MLMediaFormat_Key_Height;

A key describing the height of the content in a video format.

The associated value is an integer.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_I_Frame_Interval

MLMediaFormatKey MLMediaFormat_Key_I_Frame_Interval;

A key describing the frequency of key frames expressed in seconds between key frames.

This key is used by video encoders. A negative value means no key frames are requested after the first frame. A zero value means a stream containing all key frames is requested.

Most video encoders will convert this value of the number of non-key-frames between key-frames, using the {frame rate} information; therefore, if the actual frame rate differs (e.g. input frames are dropped or the frame rate changes), the time interval between key frames will not be the configured value. The associated value is an integer (or float since android.os.Build.VERSION_CODES::N_MR1 ).

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Intra_Refresh_Period

MLMediaFormatKey MLMediaFormat_Key_Intra_Refresh_Period;

An optional key describing the period of intra refresh in frames.

This is an optional parameter that applies only to video encoders. If encoder supports it (MLMediaCodecListIsIntraRefreshSupported), the whole frame is completely refreshed after the specified period. Also for each frame, a fix subset of macroblocks must be intra coded which leads to a more constant bitrate than inserting a key frame. This key is recommended for video streaming applications as it provides low-delay and good error-resilience. This key is ignored if the video encoder does not support the intra refresh feature. Use the output format to verify that this feature was enabled.

The associated value is an integer.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Is_ADTS

MLMediaFormatKey MLMediaFormat_Key_Is_ADTS;

A key mapping to a value of 1 if the content is AAC audio and audio frames are prefixed with an ADTS header.

The associated value is an integer (0 or 1). This key is only supported when decoding content, it cannot be used to configure an encoder to emit ADTS output.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Is_Autoselect

MLMediaFormatKey MLMediaFormat_Key_Is_Autoselect;

A key for boolean AUTOSELECT behavior for the track. Tracks with AUTOSELECT=true are considered when automatically selecting a track without specific user choice, based on the current locale. This is currently only used for subtitle tracks, when the user selected 'Default' for the captioning locale. The associated value is an integer, where non-0 means TRUE. This is an optional field; if not specified, AUTOSELECT defaults to TRUE.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Is_Default

MLMediaFormatKey MLMediaFormat_Key_Is_Default;

A key for boolean DEFAULT behavior for the track. The track with DEFAULT=true is selected in the absence of a specific user choice.

This is currently used in two scenarios:

  1. For subtitle tracks, when the user selected 'Default' for the captioning locale.
  2. For a MIMETYPE_IMAGE_ANDROID_HEIC track, indicating the image is the primary item in the file.

The associated value is an integer, where non-0 means TRUE. This is an optional field; if not specified, DEFAULT is considered to be FALSE.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Is_Forced_Subtitle

MLMediaFormatKey MLMediaFormat_Key_Is_Forced_Subtitle;

A key for the FORCED field for subtitle tracks.

True if it is a forced subtitle track. Forced subtitle tracks are essential for the content and are shown even when the user turns off Captions. They are used for example to translate foreign/alien dialogs or signs. The associated value is an integer, where non-0 means TRUE. This is an optional field; if not specified, FORCED defaults to FALSE.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Language

MLMediaFormatKey MLMediaFormat_Key_Language;

A key describing the language of the content, using either ISO 639-1 or 639-2/T codes.

The associated value is a string.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Max_Height

MLMediaFormatKey MLMediaFormat_Key_Max_Height;

A key describing the maximum expected height of the content in a video decoder format, in case there are resolution changes in the video content.

The associated value is an integer.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Max_Input_Size

MLMediaFormatKey MLMediaFormat_Key_Max_Input_Size;

Described by this MediaFormat.

The associated value is an integer.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Max_Width

MLMediaFormatKey MLMediaFormat_Key_Max_Width;

A key describing the maximum expected width of the content in a video decoder format, in case there are resolution changes in the video content.

The associated value is an integer.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Mime

MLMediaFormatKey MLMediaFormat_Key_Mime;

A key describing the mime type of the MediaFormat.

The associated value is a string.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_PCM_Encoding

MLMediaFormatKey MLMediaFormat_Key_PCM_Encoding;

A key describing the raw audio sample encoding/format.

The associated value is an integer, using one of the AudioFormat.ENCODINGPCM values.

This is an optional key for audio decoders and encoders specifying the desired raw audio sample format during MLMediaCodec::configure MediaCodec.configure() call. Use MLMediaCodec::getInputFormat MediaCodec.getInput / MLMediaCodec::getOutputFormatOutputFormat() to confirm the actual format. For the PCM decoder this key specifies both input and output sample encodings.

This key is also used by MLMediaExtractor to specify the sample format of audio data, if it is specified.

If this key is missing, the raw audio sample format is signed 16-bit short.

The associated value is an integer with keys defined by MLMediaFormatAudioEncoding.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Push_Blank_Buffers_On_Stop

MLMediaFormatKey MLMediaFormat_Key_Push_Blank_Buffers_On_Stop;

If specified when configuring a video decoder rendering to a surface, causes the decoder to output "blank", i.e. black frames to the surface.

when stopped to clear out any previously displayed contents. The associated value is an integer of value 1.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Repeat_Previous_Frame_After

MLMediaFormatKey MLMediaFormat_Key_Repeat_Previous_Frame_After;

Applies only when configuring a video encoder in "surface-input" mode.

The associated value is a long and gives the time in microseconds after which the frame previously submitted to the encoder will be repeated (once) if no new frame became available since.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Sample_Rate

MLMediaFormatKey MLMediaFormat_Key_Sample_Rate;

A key describing the sample rate of an audio format.

The associated value is an integer.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Stride

MLMediaFormatKey MLMediaFormat_Key_Stride;

A key describing the stride of the video bytebuffer layout.

Stride (or row increment) is the difference between the index of a pixel and that of the pixel directly underneath. For YUV 420 formats, the stride corresponds to the Y plane; the stride of the U and V planes can be calculated based on the color format, though it is generally undefined and depends on the device and release. The associated value is an integer, representing the number of bytes.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Temporal_Layering

MLMediaFormatKey MLMediaFormat_Key_Temporal_Layering;

A key describing the temporal layering schema.

This is an optional parameter that applies only to video encoders. Use MediaCodec::getOutputFormat after MediaCodec::configure to query if the encoder supports the desired schema. Supported values are webrtc.vp8.N-layer, android.generic.N, android.generic.N+M and none, where N denotes the total number of non-bidirectional layers (which must be at least 1) and M denotes the total number of bidirectional layers (which must be non-negative).

android.generic.* schemas have been added in android.os.Build.VERSION_CODES::N_MR1.

The encoder may support fewer temporal layers, in which case the output format will contain the configured schema. If the encoder does not support temporal layering, the output format will not have an entry with this key. The associated value is a string.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Width

MLMediaFormatKey MLMediaFormat_Key_Width;

A key describing the width of the content in a video format.

The associated value is an integer.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Crop_Left

MLMediaFormatKey MLMediaFormat_Key_Crop_Left;

The left-coordinate (x) of the crop rectangle.

The associated value is an integer.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Crop_Right

MLMediaFormatKey MLMediaFormat_Key_Crop_Right;

The right-coordinate (x) MINUS 1 of the crop rectangle.

The associated value is an integer.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Crop_Bottom

MLMediaFormatKey MLMediaFormat_Key_Crop_Bottom;

The bottom-coordinate (y) MINUS 1 of the crop rectangle.

The associated value is an integer.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Crop_Top

MLMediaFormatKey MLMediaFormat_Key_Crop_Top;

The top-coordinate (y) of the crop rectangle.

The associated value is an integer.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Operating_Rate

MLMediaFormatKey MLMediaFormat_Key_Operating_Rate;

A key describing the desired operating frame rate for video or sample rate for audio that the codec will need to operate at.

The associated value is an integer or a float representing frames-per-second or samples-per-second.

This is used for cases like high-speed/slow-motion video capture, where the video encoder format contains the target playback rate (e.g. 30fps), but the component must be able to handle the high operating capture rate (e.g. 240fps).

This rate will be used by codec for resource planning and setting the operating points.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Latency

MLMediaFormatKey MLMediaFormat_Key_Latency;

An optional key describing the desired encoder latency in frames.

parameter that applies only to video encoders. If encoder supports it, it should ouput at least one output frame after being queued the specified number of frames. This key is ignored if the video encoder does not support the latency feature. Use the output format to verify that this feature was enabled and the actual value used by the encoder.

If the key is not specified, the default latency will be implementation specific. The associated value is an integer.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Parameter_Video_Bitrate

MLMediaFormatKey MLMediaFormat_Key_Parameter_Video_Bitrate;

A key describing the desired video bitrate.

The associated value is an integer.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Parameter_Request_Sync_Frame

MLMediaFormatKey MLMediaFormat_Key_Parameter_Request_Sync_Frame;

Request that the encoder produce a sync frame "soon".

Provide an Integer with the value 0.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Parameter_Set_Suspend

MLMediaFormatKey MLMediaFormat_Key_Parameter_Set_Suspend;

Temporarily suspend/resume encoding of input data.

While suspended input data is effectively discarded instead of being fed into the encoder. This parameter really only makes sense to use with an encoder in "surface-input" mode, as the client code has no control over the input-side of the encoder in that case.

The value is an Integer object containing the value 1 to suspend or the value 0 to resume.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Parameter_Set_Suspend_Time

MLMediaFormatKey MLMediaFormat_Key_Parameter_Set_Suspend_Time;

When PARAMETER_KEY_SUSPEND is present, the client can also optionally use this key to specify the timestamp (in micro-second) at which the suspend/resume operation takes effect.

Note that the specified timestamp must be greater than or equal to the timestamp of any previously queued suspend/resume operations.

The value is a long int, indicating the timestamp to suspend/resume.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Parameter_Drop_Before

MLMediaFormatKey MLMediaFormat_Key_Parameter_Drop_Before;

A key describing the desired before which frames are to be skipped.

The associated value is a long int, indicating the timestamp (in microseconds) to be applied.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Parameter_Drop_After

MLMediaFormatKey MLMediaFormat_Key_Parameter_Drop_After;

A key describing the desired after which frames are to be skipped.

The associated value is a long int, indicating the timestamp (in microseconds) to be applied.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Parameter_Offset_Time

MLMediaFormatKey MLMediaFormat_Key_Parameter_Offset_Time;

Specify an offset (in micro-second) to be added on top of the timestamps onward.

A typical use case is to apply adjustment to the timestamps after a period of pause by the user. This parameter can only be used on an encoder in "surface-input" mode.

The value is a long int, indicating the timestamp offset to be applied.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Priority

MLMediaFormatKey MLMediaFormat_Key_Priority;

A key describing the desired codec priority.

The associated value can be one of the MLMediaCodecPriority enumeration. This is a hint used at codec configuration and resource planning - to understand the realtime requirements of the application; however, due to the nature of media components, performance is not guaranteed.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Max_B_Frames

MLMediaFormatKey MLMediaFormat_Key_Max_B_Frames;

A key describing the maximum number of B frames between I or P frames, to be used by a video encoder.

The associated value is an integer. The default value is 0, which means that no B frames are allowed. Note that non-zero value does not guarantee B frames; it's up to the encoder to decide.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Intra_Refresh_Mode

MLMediaFormatKey MLMediaFormat_Key_Intra_Refresh_Mode;

An optional key describing the mode of intra refresh in frames. The associated value is an integer.

This is an optional parameter that applies only to video encoders. If encoder supports it (MLMediaCodecListIsIntraRefreshSupported), the whole frame is completely refreshed after the specified period. Also for each frame, a fixed subset of macroblocks must be intra-coded which leads to a more constant bitrate than inserting a key frame. This key is recommended for video streaming applications as it provides low-delay and good error-resilience. This key is ignored if the video encoder does not support the intra refresh feature. Use the output format to verify that this feature was enabled.

The possible values are defined in MLMediaCodecIntraRefreshMode.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Intra_Refresh_CIR_Num

MLMediaFormatKey MLMediaFormat_Key_Intra_Refresh_CIR_Num;

Number of consecutive macroblocks to be coded as intra when CIR is enabled.

The associated value is an integer.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Intra_Refresh_AIR_Num

MLMediaFormatKey MLMediaFormat_Key_Intra_Refresh_AIR_Num;

Number of intra macroblocks to refresh in a frame when AIR is enabled.

The associated value is an integer.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Intra_Refresh_AIR_Ref

MLMediaFormatKey MLMediaFormat_Key_Intra_Refresh_AIR_Ref;

Number of times a motion marked macroblock has to be intra coded.

The associated value is an integer.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Profile

MLMediaFormatKey MLMediaFormat_Key_Profile;

A key describing the desired profile to be used by an encoder.

The associated value is an integer.

The supported profiles can be queries through MLMediaCodecListGetSupportedProfileLevels. The values are defined in MLMediaCodecProfileType enumeration. This key is used as a further hint when specifying a desired profile, and is only supported for codecs that specify a level. This key is ignored if the profile is not specified.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Level

MLMediaFormatKey MLMediaFormat_Key_Level;

A key describing the desired level to be used by an encoder.

The associated value is an integer.

The supported profiles can be queries through MLMediaCodecListGetSupportedProfileLevels. The values are defined in MLMediaCodecLevelType enumeration. This key is used as a further hint when specifying a desired profile, and is only supported for codecs that specify a level. This key is ignored if the level is not specified.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Prepend_Header_To_Sync_Frames

MLMediaFormatKey MLMediaFormat_Key_Prepend_Header_To_Sync_Frames;

An optional key describing whether encoders prepend headers to sync frames (e.g. SPS and PPS to IDR frames for H.264).

This is an optional parameter that applies only to video encoders. A video encoder may not support this feature; the component will fail to configure in that case. For other components, this key is ignored. The value is an integer, with 1 indicating to prepend headers to every sync frame, or 0 otherwise. The default value is 0.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Color_Range

MLMediaFormatKey MLMediaFormat_Key_Color_Range;

An optional key describing the range of the component values of the video content.

The associated value is an integer: 0 if unspecified, or one of the COLORRANGE values.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Color_Standard

MLMediaFormatKey MLMediaFormat_Key_Color_Standard;

An optional key describing the color primaries, white point and luminance factors for video content.

The associated value is an integer: 0 if unspecified, or one of the COLORSTANDARD values.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Color_Transfer

MLMediaFormatKey MLMediaFormat_Key_Color_Transfer;

An optional key describing the opto-electronic transfer function used for the video content.

The associated value is an integer: 0 if unspecified, or one of the COLORTRANSFER values.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_HDR_Static_Info

MLMediaFormatKey MLMediaFormat_Key_HDR_Static_Info;

An optional key describing the static metadata of HDR (high-dynamic-range) video content.

The associated value is a ByteBuffer. This buffer contains the raw contents of the Static Metadata Descriptor (including the descriptor ID) of an HDMI Dynamic Range and Mastering InfoFrame as defined by CTA-861.3. This key must be provided to video decoders for HDR video content unless this information is contained in the bitstream and the video decoder supports an HDR-capable profile. This key must be provided to video encoders for HDR video content.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_CSD

MLMediaFormatKey MLMediaFormat_Key_CSD;

A key describing the codec specific data.

Codec-specific data in the format is automatically submitted to the codec upon start(); you MUST NOT submit this data explicitly.

The associated value is an MLMediaFormatByteArray.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_CSD0

MLMediaFormatKey MLMediaFormat_Key_CSD0;

A key describing the codec specific data buffer #0.

Codec-specific data in the format is automatically submitted to the codec upon start(); you MUST NOT submit this data explicitly.

The associated value is an MLMediaFormatByteArray.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_CSD1

MLMediaFormatKey MLMediaFormat_Key_CSD1;

A key describing the codec specific data buffer #1.

Codec-specific data in the format is automatically submitted to the codec upon start(); you MUST NOT submit this data explicitly.

The associated value is an MLMediaFormatByteArray.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_CSD2

MLMediaFormatKey MLMediaFormat_Key_CSD2;

A key describing the codec specific data buffer #2.

Codec-specific data in the format is automatically submitted to the codec upon start(); you MUST NOT submit this data explicitly.

The associated value is an MLMediaFormatByteArray.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_CSD_Avc

MLMediaFormatKey MLMediaFormat_Key_CSD_Avc;

A key describing the codec specific data buffer for AVC (h.264).

Codec-specific data in the format is automatically submitted to the codec upon start(); you MUST NOT submit this data explicitly.

The associated value is an MLMediaFormatByteArray.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_CSD_Hevc

MLMediaFormatKey MLMediaFormat_Key_CSD_Hevc;

A key describing the codec specific data buffer for HEVC (h.265).

Codec-specific data in the format is automatically submitted to the codec upon start(); you MUST NOT submit this data explicitly.

The associated value is an MLMediaFormatByteArray.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Album

MLMediaFormatKey MLMediaFormat_Key_Album;

A key describing metadata - album title of the media.

The associated value is a string.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Albumart

MLMediaFormatKey MLMediaFormat_Key_Albumart;

A key describing metadata. The artwork for the album of the media's original source as a Bitmap.

The associated value is an MLMediaFormatByteArray.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Albumartist

MLMediaFormatKey MLMediaFormat_Key_Albumartist;

A key describing metadata. The artist for the album of the media's original source.

The associated value is a string.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Artist

MLMediaFormatKey MLMediaFormat_Key_Artist;

A key describing metadata. The artist of the media.

The associated value is a string.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Audio_Presentation_Info

MLMediaFormatKey MLMediaFormat_Key_Audio_Presentation_Info;

A key describing metadata. The media presentation info.

The associated value is an MLMediaFormatByteArray.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Audio_Presentation_Presentation_Id

MLMediaFormatKey MLMediaFormat_Key_Audio_Presentation_Presentation_Id;

A key describing metadata. The media presentation Id.

The associated value is a string.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Audio_Presentation_Program_Id

MLMediaFormatKey MLMediaFormat_Key_Audio_Presentation_Program_Id;

A key describing metadata. The media program Id.

The associated value is a string.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Audio_Session_Id

MLMediaFormatKey MLMediaFormat_Key_Audio_Session_Id;

A key describing the audio session ID of the AudioTrack associated to a tunneled video codec.

The associated value is an integer.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.

See: MLMediaCodecBitrateMode::FEATURE_TunneledPlayback


MLMediaFormat_Key_Author

MLMediaFormatKey MLMediaFormat_Key_Author;

A key describing metadata. The author of the media.

The associated value is a string.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Bits_Per_Sample

MLMediaFormatKey MLMediaFormat_Key_Bits_Per_Sample;

Key representing media number of bits per sample.

The associated value is an integer.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Cdtracknumber

MLMediaFormatKey MLMediaFormat_Key_Cdtracknumber;

A key describing metadata. The cd track number.

The associated value is an integer.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Compilation

MLMediaFormatKey MLMediaFormat_Key_Compilation;

A key describing metadata. The media compilation.

The associated value is an integer.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Complexity

MLMediaFormatKey MLMediaFormat_Key_Complexity;

A key describing the encoding complexity.

The associated value is an integer. These values are device and codec specific, but lower values generally result in faster and/or less power-hungry encoding.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.

See: MediaCodecInfo.EncoderCapabilities::getComplexityRange()


MLMediaFormat_Key_Composer

MLMediaFormatKey MLMediaFormat_Key_Composer;

A key describing metadata - composer of the media.

The associated value is a string.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Create_Input_Surface_Suspended

MLMediaFormatKey MLMediaFormat_Key_Create_Input_Surface_Suspended;

If specified when configuring a video encoder that's in "surface-input" mode, it will instruct the encoder to put the surface source in suspended state when it's connected.

No video frames will be accepted until a resume operation (see MediaCodec::PARAMETER_KEY_SUSPEND ), optionally with timestamp specified via MediaCodec::PARAMETER_KEY_SUSPEND_TIME , is received.

The value is an integer, with 1 indicating to create with the surface source suspended, or 0 otherwise. The default value is 0.

If this key is not set or set to 0, the surface source will accept buffers as soon as it's connected to the encoder (although they may not be encoded immediately). This key can be used when the client wants to prepare the encoder session in advance, but do not want to accept buffers immediately.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Crypto_Default_Iv_Size

MLMediaFormatKey MLMediaFormat_Key_Crypto_Default_Iv_Size;

The associated value is an integer.


MLMediaFormat_Key_Crypto_Encrypted_Byte_Block

MLMediaFormatKey MLMediaFormat_Key_Crypto_Encrypted_Byte_Block;

The associated value is an integer.


MLMediaFormat_Key_Crypto_Encrypted_Sizes

MLMediaFormatKey MLMediaFormat_Key_Crypto_Encrypted_Sizes;

The associated value is an MLMediaFormatByteArray.


MLMediaFormat_Key_Crypto_Iv

MLMediaFormatKey MLMediaFormat_Key_Crypto_Iv;

The associated value is an MLMediaFormatByteArray.


MLMediaFormat_Key_Crypto_Key

MLMediaFormatKey MLMediaFormat_Key_Crypto_Key;

The associated value is an MLMediaFormatByteArray.


MLMediaFormat_Key_Crypto_Mode

MLMediaFormatKey MLMediaFormat_Key_Crypto_Mode;

The associated value is an integer.


MLMediaFormat_Key_Crypto_Plain_Sizes

MLMediaFormatKey MLMediaFormat_Key_Crypto_Plain_Sizes;

The associated value is an MLMediaFormatByteArray.


MLMediaFormat_Key_Crypto_Skip_Byte_Block

MLMediaFormatKey MLMediaFormat_Key_Crypto_Skip_Byte_Block;

The associated value is an MLMediaFormatByteArray.


MLMediaFormat_Key_D263

MLMediaFormatKey MLMediaFormat_Key_D263;

The associated value is an MLMediaFormatByteArray.


MLMediaFormat_Key_Date

MLMediaFormatKey MLMediaFormat_Key_Date;

A key describing metadata - The date the media was created or published. The format is unspecified but RFC 3339 is recommended.

The associated value is a string.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Discnumber

MLMediaFormatKey MLMediaFormat_Key_Discnumber;

A key describing metadata. The disc number for the media's original source.

The associated value is a string.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Display_Crop

MLMediaFormatKey MLMediaFormat_Key_Display_Crop;

A key describing display crop rectangle.

The associated value is a string of format "Rect %s(%d, %d, %d, %d)" where the value meaning is: "Rect name(left, top, right, bottom)".

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Display_Height

MLMediaFormatKey MLMediaFormat_Key_Display_Height;

The associated value is an integer.


MLMediaFormat_Key_Display_Width

MLMediaFormatKey MLMediaFormat_Key_Display_Width;

The associated value is an integer.


MLMediaFormat_Key_Encoder_Delay

MLMediaFormatKey MLMediaFormat_Key_Encoder_Delay;

A key describing the number of frames to trim from the start of the decoded audio stream.

The associated value is an integer.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Encoder_Padding

MLMediaFormatKey MLMediaFormat_Key_Encoder_Padding;

A key describing the number of frames to trim from the end of the decoded audio stream.

The associated value is an integer.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Esds

MLMediaFormatKey MLMediaFormat_Key_Esds;

A key describing the electrostatic discharge and soldering (ESDS).

The associated value is an MLMediaFormatByteArray.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Exif_Offset

MLMediaFormatKey MLMediaFormat_Key_Exif_Offset;

The associated value is a long integer.


MLMediaFormat_Key_Exif_Size

MLMediaFormatKey MLMediaFormat_Key_Exif_Size;

The associated value is a long integer.


MLMediaFormat_Key_Frame_Count

MLMediaFormatKey MLMediaFormat_Key_Frame_Count;

The associated value is an integer.


MLMediaFormat_Key_Genre

MLMediaFormatKey MLMediaFormat_Key_Genre;

A key describing metadata. The media genre.

The associated value is a string.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Grid_Columns

MLMediaFormatKey MLMediaFormat_Key_Grid_Columns;

A key describing the number of grid columns in the content in a MIMETYPE_IMAGE_ANDROID_HEIC track.

The associated value is an integer.

Refer to MIMETYPE_IMAGE_ANDROID_HEIC on decoding instructions of such tracks.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.

See:


MLMediaFormat_Key_Grid_Rows

MLMediaFormatKey MLMediaFormat_Key_Grid_Rows;

A key describing the number of grid rows in the content in a MIMETYPE_IMAGE_ANDROID_HEIC track.

The associated value is an integer.

Refer to MIMETYPE_IMAGE_ANDROID_HEIC on decoding instructions of such tracks.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.

See:


MLMediaFormat_Key_Haptic_Channel_Count

MLMediaFormatKey MLMediaFormat_Key_Haptic_Channel_Count;

A key describing the number of haptic channels in an audio format.

The associated value is an integer.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Hdr10_Plus_Info

MLMediaFormatKey MLMediaFormat_Key_Hdr10_Plus_Info;

An optional key describing the HDR10+ metadata of the video content.

The associated value is a ByteBuffer containing HDR10+ metadata conforming to the user_data_registered_itu_t_t35() syntax of SEI message for ST 2094-40. This key will be present on:

  • The formats of output buffers of a decoder configured for HDR10+ profiles (such as MLMediaCodecListGetSupportedProfileLevels::VP9Profile2HDR10Plus, MLMediaCodecListGetSupportedProfileLevels::VP9Profile3HDR10Plus or MLMediaCodecListGetSupportedProfileLevels::HEVCProfileMain10HDR10Plus), or
  • The formats of output buffers of an encoder configured for an HDR10+ profiles that uses out-of-band metadata (such as MLMediaCodecListGetSupportedProfileLevels::VP9Profile2HDR10Plus or MLMediaCodecListGetSupportedProfileLevels::VP9Profile3HDR10Plus).
Deprecated

Deprecated since 1.4.0. Scheduled for removal.

See: MediaCodec::PARAMETER_KEY_HDR10_PLUS_INFO.


MLMediaFormat_Key_Icc_Profile

MLMediaFormatKey MLMediaFormat_Key_Icc_Profile;

The associated value is an MLMediaFormatByteArray.


MLMediaFormat_Key_Is_Sync_Frame

MLMediaFormatKey MLMediaFormat_Key_Is_Sync_Frame;

The associated value is an integer.


MLMediaFormat_Key_Location

MLMediaFormatKey MLMediaFormat_Key_Location;

A key describing metadata. The media location.

The associated value is a string.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Loop

MLMediaFormatKey MLMediaFormat_Key_Loop;

A key describing metadata. The media loop.

The associated value is a string.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Lyricist

MLMediaFormatKey MLMediaFormat_Key_Lyricist;

A key describing metadata. The media lyricist.

The associated value is a string.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Manufacturer

MLMediaFormatKey MLMediaFormat_Key_Manufacturer;

A key describing metadata. The media manufacturer.

The associated value is a string.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Max_Bit_Rate

MLMediaFormatKey MLMediaFormat_Key_Max_Bit_Rate;

A key describing the max bitrate in bits/sec.

This is usually over a one-second sliding window (e.g. over any window of one second). The associated value is an integer. \hide

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Max_Fps_To_Encoder

MLMediaFormatKey MLMediaFormat_Key_Max_Fps_To_Encoder;

Instruct the video encoder in "surface-input" mode to drop excessive frames from the source, so that the input frame rate to the encoder does not exceed the specified fps.

The associated value is a float, representing the max frame rate to feed the encoder at.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Max_Pts_Gap_To_Encoder

MLMediaFormatKey MLMediaFormat_Key_Max_Pts_Gap_To_Encoder;

Instruct the video encoder in "surface-input" mode to limit the gap of timestamp between any two adjacent frames fed to the encoder to the specified amount (in micro-second).

The associated value is a long int. When positive, it represents the max timestamp gap between two adjacent frames fed to the encoder. When negative, the absolute value represents a fixed timestamp gap between any two adjacent frames fed to the encoder. Note that this will also apply even when the original timestamp goes backward in time. Under normal conditions, such frames would be dropped and not sent to the encoder.

The output timestamp will be restored to the original timestamp and will not be affected.

This is used in some special scenarios where input frames arrive sparingly but it's undesirable to allocate more bits to any single frame, or when it's important to ensure all frames are captured (rather than captured in the correct order).

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Mpeg_User_Data

MLMediaFormatKey MLMediaFormat_Key_Mpeg_User_Data;

The associated value is an MLMediaFormatByteArray.


MLMediaFormat_Key_Mpeg2_Stream_Header

MLMediaFormatKey MLMediaFormat_Key_Mpeg2_Stream_Header;

The associated value is an MLMediaFormatByteArray.


MLMediaFormat_Key_PCM_Big_Endian

MLMediaFormatKey MLMediaFormat_Key_PCM_Big_Endian;

The associated value is an integer.


MLMediaFormat_Key_Pssh

MLMediaFormatKey MLMediaFormat_Key_Pssh;

The associated value is an MLMediaFormatByteArray.


MLMediaFormat_Key_Rotation

MLMediaFormatKey MLMediaFormat_Key_Rotation;

A key describing the desired clockwise rotation on an output surface.

This key is only used when the codec is configured using an output surface. The associated value is an integer, representing degrees. Supported values are 0, 90, 180 or 270. This is an optional field; if not specified, rotation defaults to 0.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.

See: MLMediaCodecBitrateMode::profileLevels


MLMediaFormat_Key_Sar_Height

MLMediaFormatKey MLMediaFormat_Key_Sar_Height;

The associated value is an integer.


MLMediaFormat_Key_Sar_Width

MLMediaFormatKey MLMediaFormat_Key_Sar_Width;

The associated value is an integer.


MLMediaFormat_Key_Sei

MLMediaFormatKey MLMediaFormat_Key_Sei;

The associated value is an MLMediaFormatByteArray.


MLMediaFormat_Key_Slice_Height

MLMediaFormatKey MLMediaFormat_Key_Slice_Height;

A key describing the plane height of a multi-planar (YUV) video bytebuffer layout.

Slice height (or plane height/vertical stride) is the number of rows that must be skipped to get from the top of the Y plane to the top of the U plane in the bytebuffer. In essence the offset of the U plane is sliceHeight * stride. The height of the U/V planes can be calculated based on the color format, though it is generally undefined and depends on the device and release. The associated value is an integer, representing the number of rows.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Target_Time

MLMediaFormatKey MLMediaFormat_Key_Target_Time;

The associated value is a long integer.


MLMediaFormat_Key_Temporal_Layer_Count

MLMediaFormatKey MLMediaFormat_Key_Temporal_Layer_Count;

The associated value is an integer.


MLMediaFormat_Key_Temporal_Layer_Id

MLMediaFormatKey MLMediaFormat_Key_Temporal_Layer_Id;

The associated value is an integer.


MLMediaFormat_Key_Text_Format_Data

MLMediaFormatKey MLMediaFormat_Key_Text_Format_Data;

The associated value is an MLMediaFormatByteArray.


MLMediaFormat_Key_Thumbnail_CSD_Hevc

MLMediaFormatKey MLMediaFormat_Key_Thumbnail_CSD_Hevc;

The associated value is an MLMediaFormatByteArray.


MLMediaFormat_Key_Thumbnail_Height

MLMediaFormatKey MLMediaFormat_Key_Thumbnail_Height;

The associated value is an integer.


MLMediaFormat_Key_Thumbnail_Time

MLMediaFormatKey MLMediaFormat_Key_Thumbnail_Time;

The associated value is a long integer.


MLMediaFormat_Key_Thumbnail_Width

MLMediaFormatKey MLMediaFormat_Key_Thumbnail_Width;

The associated value is an integer.


MLMediaFormat_Key_Tile_Height

MLMediaFormatKey MLMediaFormat_Key_Tile_Height;

A key describing the height (in pixels) of each tile of the content in a MIMETYPE_IMAGE_ANDROID_HEIC track. The associated value is an integer.

Refer to MIMETYPE_IMAGE_ANDROID_HEIC on decoding instructions of such tracks.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.

See:


MLMediaFormat_Key_Tile_Width

MLMediaFormatKey MLMediaFormat_Key_Tile_Width;

A key describing the width (in pixels) of each tile of the content in a MIMETYPE_IMAGE_ANDROID_HEIC track. The associated value is an integer.

Refer to MIMETYPE_IMAGE_ANDROID_HEIC on decoding instructions of such tracks.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.

See:


MLMediaFormat_Key_Time_Us

MLMediaFormatKey MLMediaFormat_Key_Time_Us;

The associated value is a long integer.


MLMediaFormat_Key_Title

MLMediaFormatKey MLMediaFormat_Key_Title;

A key describing metadata. The title of the media.

The associated value is a string.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Track_Id

MLMediaFormatKey MLMediaFormat_Key_Track_Id;

A key describing a unique ID for the content of a media track.

This key is used by MLMediaExtractor. Some extractors provide multiple encodings of the same track (e.g. float audio tracks for FLAC and WAV may be expressed as two tracks via MediaExtractor: a normal PCM track for backward compatibility, and a float PCM track for added fidelity. Similarly, Dolby Vision extractor may provide a baseline SDR version of a DV track.) This key can be used to identify which MediaExtractor tracks refer to the same underlying content.

The associated value is an integer.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Track_Index

MLMediaFormatKey MLMediaFormat_Key_Track_Index;

The associated value is an integer.


MLMediaFormat_Key_Valid_Samples

MLMediaFormatKey MLMediaFormat_Key_Valid_Samples;

The associated value is an integer.


MLMediaFormat_Key_Year

MLMediaFormatKey MLMediaFormat_Key_Year;

A key describing metadata. The year the media was created or published as a long.

The associated value is a string.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_AAC_DRC_Effect_Type

MLMediaFormatKey MLMediaFormat_Key_AAC_DRC_Effect_Type;

A key describing for selecting the DRC effect type for MPEG-D DRC.

The supported values are defined in ISO/IEC 23003-4:2015 and are described as follows: | Value | Effect | | -------- | -------- | | -1 | Off | | 0 | None | | 1 | Late night | | 2 | Noisy environment | | 3 | Limited playback range | | 4 | Low playback level | | 5 | Dialog enhancement | | 6 | General compression |

The value -1 (Off) disables DRC processing, while loudness normalization may still be active and dependent on KEY_AAC_DRC_TARGET_REFERENCE_LEVEL.

The value 0 (None) automatically enables DRC processing if necessary to prevent signal clipping

The value 6 (General compression) can be used for enabling MPEG-D DRC without particular DRC effect type request.

The default DRC effect type is 3 ("Limited playback range") on mobile devices.

This key is only used during decoding.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Quality

MLMediaFormatKey MLMediaFormat_Key_Quality;

A key describing the desired encoding quality.

The associated value is an integer. This key is only supported for encoders that are configured in constant-quality mode. These values are device and codec specific, but lower values generally result in more efficient (smaller-sized) encoding.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.

See: MediaCodecInfo.EncoderCapabilities::getQualityRange()


MLMediaFormat_Key_Output_Reorder_Depth

MLMediaFormatKey MLMediaFormat_Key_Output_Reorder_Depth;

An optional key describing the maximum number of non-display-order coded frames.

This is an optional parameter that applies only to video encoders. Application should check the value for this key in the output format to see if codec will produce non-display-order coded frames. If encoder supports it, the output frames' order will be different from the display order and each frame's display order could be retrieved from MLMediaCodec.BufferInfo::presentationTimeUs . Before API level 27, application may receive non-display-order coded frames even though the application did not request it. Note: Application should not rearrange the frames to display order before feeding them to MLMediaMuxer::writeSampleData .

The default value is 0.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Is_Timed_Text

MLMediaFormatKey MLMediaFormat_Key_Is_Timed_Text;

The associated value is an integer. The value should be 0 or 1.


MLMediaFormat_Key_Ca_System_Id

MLMediaFormatKey MLMediaFormat_Key_Ca_System_Id;

A key describing the system id of the conditional access system used to scramble a media track.

This key is set by MLMediaExtractor if the track is scrambled with a conditional access system, regardless of the presence of a valid MediaCas object.

The associated value is an integer. \hide

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Ca_Session_Id

MLMediaFormatKey MLMediaFormat_Key_Ca_Session_Id;

A key describing the MediaCas.Session object associated with a media track.

This key is set by MLMediaExtractor if the track is scrambled with a conditional access system, after it receives a valid MediaCas} object.

The associated value is a ByteBuffer. \hide

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormat_Key_Ca_Private_Data

MLMediaFormatKey MLMediaFormat_Key_Ca_Private_Data;

A key describing the private data in the CA_descriptor associated with a media track.

This key is set by MLMediaExtractor if the track is scrambled with a conditional access system, before it receives a valid MediaCas object.

The associated value is a ByteBuffer. \hide

Deprecated

Deprecated since 1.4.0. Scheduled for removal.


MLMediaFormatKey_Feature

MLMediaFormatKey MLMediaFormat_Key_Feature_;

A key prefix used together with a MLMediaCodecBitrateMode feature name describing a required or optional feature for a codec capabilities query.

The associated value is an integer, where non-0 value means the feature is requested to be present, while 0 value means the feature is requested to be not present.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.

See:

  • MLMediaCodecList::findDecoderForFormat
  • MLMediaCodecList::findEncoderForFormat
  • MLMediaCodecBitrateMode::isFormatSupported \hide

Macros Documentation

MAX_FORMAT_STRING_SIZE

#define MAX_FORMAT_STRING_SIZE 512

MAX_KEY_STRING_SIZE

#define MAX_KEY_STRING_SIZE 64

Source code

// %BANNER_BEGIN%
// ---------------------------------------------------------------------
// %COPYRIGHT_BEGIN%
// Copyright (c) 2021 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_FORMAT_STRING_SIZE 512
#define MAX_KEY_STRING_SIZE 64

typedef ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.") struct MLMediaFormatByteArray {
uint8_t *ptr;
size_t length;
} MLMediaFormatByteArray;

typedef enum MLMediaFormatAudioEncoding {
MLMediaFormatAudioEncoding_PCM16Bits = 2,
MLMediaFormatAudioEncoding_PCM8Bits = 3,
MLMediaFormatAudioEncoding_PCMFloat = 4,
MLMediaFormatAudioEncoding_PCM32Bits = 201,
MLMediaFormatAudioEncoding_Ensure32Bits = 0x7FFFFFFF
} MLMediaFormatAudioEncoding;

typedef const char *MLMediaFormatKey;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_AAC_Encoded_Target_Level;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_AAC_DRC_Boost_Factor;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_AAC_DRC_Attenuation_Factor;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_AAC_DRC_Heavy_Compression;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_AAC_DRC_Target_Reference_Level;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_AAC_Max_Output_Channel_Count;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_AAC_Profile;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_AAC_SBR_Mode;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Bit_Rate;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Bit_Rate_Mode;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Capture_Rate;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Channel_Count;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Channel_Mask;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Color_Format;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Duration;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_FLAC_Compression_Level;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Frame_Rate;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Height;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_I_Frame_Interval;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Intra_Refresh_Period;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Is_ADTS;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Is_Autoselect;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Is_Default;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Is_Forced_Subtitle;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Language;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Max_Height;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Max_Input_Size;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Max_Width;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Mime;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_PCM_Encoding;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Push_Blank_Buffers_On_Stop;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Repeat_Previous_Frame_After;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Sample_Rate;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Stride;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Temporal_Layering;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Width;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Crop_Left;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Crop_Right;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Crop_Bottom;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Crop_Top;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Operating_Rate;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Latency;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Parameter_Video_Bitrate;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Parameter_Request_Sync_Frame;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Parameter_Set_Suspend;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Parameter_Set_Suspend_Time;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Parameter_Drop_Before;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Parameter_Drop_After;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Parameter_Offset_Time;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Priority;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Max_B_Frames;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Intra_Refresh_Mode;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Intra_Refresh_CIR_Num;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Intra_Refresh_AIR_Num;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Intra_Refresh_AIR_Ref;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Profile;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Level;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Prepend_Header_To_Sync_Frames;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Color_Range;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Color_Standard;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Color_Transfer;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_HDR_Static_Info;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_CSD;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_CSD0;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_CSD1;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_CSD2;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_CSD_Avc;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_CSD_Hevc;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Album;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Albumart;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Albumartist;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Artist;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Audio_Presentation_Info;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Audio_Presentation_Presentation_Id;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Audio_Presentation_Program_Id;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Audio_Session_Id;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Author;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Bits_Per_Sample;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Cdtracknumber;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Compilation;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Complexity;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Composer;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Create_Input_Surface_Suspended;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Crypto_Default_Iv_Size;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Crypto_Encrypted_Byte_Block;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Crypto_Encrypted_Sizes;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Crypto_Iv;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Crypto_Key;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Crypto_Mode;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Crypto_Plain_Sizes;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Crypto_Skip_Byte_Block;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_D263;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Date;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Discnumber;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Display_Crop;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Display_Height;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Display_Width;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Encoder_Delay;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Encoder_Padding;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Esds;
ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Exif_Offset;
ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Exif_Size;
ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Frame_Count;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Genre;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Grid_Columns;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Grid_Rows;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Haptic_Channel_Count;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Hdr10_Plus_Info;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Icc_Profile;
ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Is_Sync_Frame;
ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Location;
ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Loop;
ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Lyricist;
ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Manufacturer;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Max_Bit_Rate;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Max_Fps_To_Encoder;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Max_Pts_Gap_To_Encoder;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Mpeg_User_Data;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Mpeg2_Stream_Header;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_PCM_Big_Endian;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Pssh;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Rotation;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Sar_Height;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Sar_Width;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Sei;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Slice_Height;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Target_Time;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Temporal_Layer_Count;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Temporal_Layer_Id;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Text_Format_Data;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Thumbnail_CSD_Hevc;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Thumbnail_Height;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Thumbnail_Time;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Thumbnail_Width;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Tile_Height;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Tile_Width;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Time_Us;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Title;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Track_Id;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Track_Index;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Valid_Samples;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Year;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_AAC_DRC_Effect_Type;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Quality;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Output_Reorder_Depth;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Is_Timed_Text;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Ca_System_Id;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Ca_Session_Id;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Ca_Private_Data;

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API extern MLMediaFormatKey MLMediaFormat_Key_Feature_;


ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API MLResult ML_CALL MLMediaFormatCreateVideo(const char *mime_type, int width, int height, MLHandle *out_handle);

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API MLResult ML_CALL MLMediaFormatCreateAudio(const char *mime_type, int sample_rate, int channel_count, MLHandle *out_handle);

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API MLResult ML_CALL MLMediaFormatCreateSubtitle(const char *mime_type, const char *language, MLHandle *out_handle);

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API MLResult ML_CALL MLMediaFormatCreate(MLHandle *out_handle);

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API MLResult ML_CALL MLMediaFormatCreateCopy(MLHandle handle, MLHandle *out_handle);

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API MLResult ML_CALL MLMediaFormatDestroy(MLHandle handle);

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API MLResult ML_CALL MLMediaFormatObjectToString(MLHandle handle, char *out_string);

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API MLResult ML_CALL MLMediaFormatGetKeyValueInt32(MLHandle handle, MLMediaFormatKey name, int32_t *out_key);

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API MLResult ML_CALL MLMediaFormatGetKeyValueInt64(MLHandle handle, MLMediaFormatKey name, int64_t *out_key);

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API MLResult ML_CALL MLMediaFormatGetKeyValueFloat(MLHandle handle, MLMediaFormatKey name, float *out_key);

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API MLResult ML_CALL MLMediaFormatGetKeySize(MLHandle handle, MLMediaFormatKey name, size_t *out_size);

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API MLResult ML_CALL MLMediaFormatGetKeyString(MLHandle handle, MLMediaFormatKey name, char *out_string);

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API MLResult ML_CALL MLMediaFormatGetKeyByteBuffer(MLHandle handle, MLMediaFormatKey name, MLMediaFormatByteArray *out_buffer);

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API MLResult ML_CALL MLMediaFormatKeyByteBufferRelease(MLHandle handle, MLMediaFormatByteArray *buffer);

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API MLResult ML_CALL MLMediaFormatSetKeyInt32(MLHandle handle, MLMediaFormatKey name, int32_t key_value);

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API MLResult ML_CALL MLMediaFormatSetKeyInt64(MLHandle handle, MLMediaFormatKey name, int64_t key_value);

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API MLResult ML_CALL MLMediaFormatSetKeyFloat(MLHandle handle, MLMediaFormatKey name, float key_value);

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API MLResult ML_CALL MLMediaFormatSetKeySize(MLHandle handle, MLMediaFormatKey name, size_t key_size);

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API MLResult ML_CALL MLMediaFormatSetKeyString(MLHandle handle, MLMediaFormatKey name, const char *key_value);

ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API MLResult ML_CALL MLMediaFormatSetKeyByteBuffer(MLHandle handle, MLMediaFormatKey name, const MLMediaFormatByteArray *buffer);

ML_EXTERN_C_END