Media Player
Defines Audio Channel Mask to describe the input/output posistion. Position implies, the location of a speaker or a microphone for recording or playback. More...
Classes
Name | |
---|---|
struct | MLCea608CaptionStyleColor Cea608 caption style and color. |
struct | MLCea608CaptionPAC Cea608 caption preamble address code. |
struct | MLCea608CaptionLineEx Cea608 caption line structure. |
struct | MLCea608CaptionSegmentEx Cea608 caption segment structure. |
struct | MLCea708CaptionColor Cea708 Caption Color. |
struct | MLCea708CaptionPenAttr Cea708 Caption Pen Attributes. |
struct | MLCea708CaptionPenColor Cea708 Caption Pen Color. |
struct | MLCea708CaptionPenLocation Cea708 Caption Pen Location. |
struct | MLCea708CaptionWindowAttr Cea708 Caption Window Attributes. |
struct | MLCea708CaptionWindow Cea708 Caption Window. |
struct | MLCea708CaptionEvent Cea708 Caption Event. |
struct | MLMediaCodecBufferInfo |
struct | MLMediaCodecInputBufferInfo MediaCodec Input buffer information. |
struct | MLMediaCodecOutputBufferInfo MediaCodec Output buffer information. |
struct | MLMediaCodecOutputFormatInfo MediaCodec Output Format information. |
struct | MLMediaCodecErrorInfo MediaCodec Output Format information. |
struct | MLMediaCodecCallbacksEx Callbacks for notifying asynchronously of various codec events to the user/client. If user intends to use codec in asynchronous mode, then the user/client is expected to implement these callbacks and take proper actions where appropriate. |
struct | MLMediaCodecFrameRenderedInfo MediaCodec Output Frame Rendered information. |
struct | MLMediaCodecOutputFrameListener Callbacks for notifying when an output frame is available for consumption or has been rendered on the output surface. |
struct | MLMediaCodecCryptoPattern Metadata describing an encryption pattern for the protected bytes in a subsample. |
struct | MLMediaCodecCryptoInfo Metadata describing the structure of a (at least partially) encrypted input sample. A buffer's data is considered to be partitioned into "subSamples", each subSample starts with a (potentially empty) run of plain, unencrypted bytes followed by a (also potentially empty) run of encrypted bytes. If pattern encryption applies, each of the encrypted runs is encrypted only partly, according to a repeating pattern of "encrypt" and "skip" blocks. This information encapsulates per-sample metadata as outlined in ISO/IEC FDIS 23001-7:2011 "Common encryption in ISO base media file format files". |
struct | MLMediaCodecListQueryResults |
struct | MLMediaCodecListProfileLevel Used to store the list of codec profile levels. |
struct | MLMediaDRMByteArray |
struct | MLMediaDRMByteArrayList |
struct | MLMediaDRMKeyValue |
struct | MLMediaDRMKeyValueArray |
struct | MLMediaDRMKeyRequestInputParam |
struct | MLMediaDRMRequestMessage Data type that encapsulates either of the following along with an URL: |
struct | MLMediaDRMCryptoInputParam |
struct | MLMediaDRMHMACInputParam |
struct | MLMediaDRMRSAInputParam |
struct | MLMediaDRMEventInfo MediaDRM event info associated with a session. |
struct | MLMediaDRMExpirationUpdateInfo MediaDRM expiration update info associated with a session. |
struct | MLMediaDRMKeyStatus MediaDRM key status. |
struct | MLMediaDRMKeyStatusInfo MediaDRM session keys status change info. |
struct | MLMediaDRMEventCallbacks Callbacks for notifying client about MLMediaDRM events. |
struct | MLMediaExtractorDRMSchemeInitData |
struct | MLMediaFormatByteArray |
struct | MLMediaPlayerTrackDRMInfo MediaPlayer DRM Info for a Media Track . |
struct | MLMediaPlayerSubtitleData |
struct | MLMediaPlayerBufferingSettings |
struct | MLMediaPlayerOnBufferingUpdateInfo MediaPlayer Buffering update callback Info. |
struct | MLMediaPlayerOnCompletionInfo MediaPlayer Playback completion callback Info. |
struct | MLMediaPlayerOnErrorInfo MediaPlayer Error callback Info. |
struct | MLMediaPlayerOnInfoInfo MediaPlayer Information callback Info. |
struct | MLMediaPlayerOnPreparedInfo MediaPlayer Playback prepared callback Info. |
struct | MLMediaPlayerOnSeekCompleteInfo MediaPlayer Playback seek completion callback Info. |
struct | MLMediaPlayerOnVideoSizeChangedInfo MediaPlayer Video Size Changed callback Info. |
struct | MLMediaPlayerOnTrackDRMInfo MediaPlayer Track DRM Info callback Info. |
struct | MLMediaPlayerOnResetCompleteInfo MediaPlayer reset completion callback Info. |
struct | MLMediaPlayerOnFramePackingInfo MediaPlayer frame packing callback Info. |
struct | MLMediaPlayerEventCallbacksEx Callbacks for notifying client about Media Player error events. |
struct | MLMediaPlayerTrackInfo MediaPlayer Track Information. |
struct | MLMediaPlayerTrackDRMSessionInfo DRM Session information for a MediaPlayer Track. |
struct | MLMediaPlayerMetrics MediaPlayer metrics data. |
struct | MLTTMLImage Byte data for TTML image cues. |
struct | MLTTMLData TTML data structure. |
struct | MLPSSHEntry PSSH entry. |
struct | MLWebVTTData WebVTT data structure. |
struct | MLNativeSurfaceFrameAvailableInfo NativeSurface/NativeSurfaceTexture Output Frame Availability information. |
struct | MLNativeSurfaceConfig Configuration values for creating the Native Surface. |
struct | MLNativeSurfaceOnFrameAvailableCallback Callbacks for notifying when an output frame is available for consumption. |
Types
Name | |
---|---|
typedef struct MLCea608CaptionStyleColor | MLCea608CaptionStyleColor Cea608 caption style and color. |
typedef struct MLCea608CaptionPAC | MLCea608CaptionPAC Cea608 caption preamble address code. |
typedef struct MLCea608CaptionLineEx | MLCea608CaptionLineEx Cea608 caption line structure. |
typedef struct MLCea608CaptionSegmentEx | MLCea608CaptionSegmentEx Cea608 caption segment structure. |
typedef void()(MLHandle cc_handle, const MLCea608CaptionSegmentEx cc_seg, void *data) | MLMediaCCParserDisplayChangedCallback Callback signature called when Cea608 displayable is changed. |
typedef struct MLCea708CaptionColor | MLCea708CaptionColor Cea708 Caption Color. |
typedef struct MLCea708CaptionPenAttr | MLCea708CaptionPenAttr Cea708 Caption Pen Attributes. |
typedef struct MLCea708CaptionPenColor | MLCea708CaptionPenColor Cea708 Caption Pen Color. |
typedef struct MLCea708CaptionPenLocation | MLCea708CaptionPenLocation Cea708 Caption Pen Location. |
typedef struct MLCea708CaptionWindowAttr | MLCea708CaptionWindowAttr Cea708 Caption Window Attributes. |
typedef struct MLCea708CaptionWindow | MLCea708CaptionWindow Cea708 Caption Window. |
typedef struct MLCea708CaptionEvent | MLCea708CaptionEvent Cea708 Caption Event. |
typedef void()(MLHandle cc_handle, const MLCea708CaptionEvent event, void *data) | MLMediaCea708ParserEmitEventCallback Callback signature called when Cea708 parser emits event. |
typedef struct MLMediaCodecBufferInfo | MLMediaCodecBufferInfo |
typedef struct MLMediaCodecInputBufferInfo | MLMediaCodecInputBufferInfo MediaCodec Input buffer information. |
typedef struct MLMediaCodecOutputBufferInfo | MLMediaCodecOutputBufferInfo MediaCodec Output buffer information. |
typedef struct MLMediaCodecOutputFormatInfo | MLMediaCodecOutputFormatInfo MediaCodec Output Format information. |
typedef struct MLMediaCodecErrorInfo | MLMediaCodecErrorInfo MediaCodec Output Format information. |
typedef struct MLMediaCodecCallbacksEx | MLMediaCodecCallbacksEx Callbacks for notifying asynchronously of various codec events to the user/client. If user intends to use codec in asynchronous mode, then the user/client is expected to implement these callbacks and take proper actions where appropriate. |
typedef struct MLMediaCodecFrameRenderedInfo | MLMediaCodecFrameRenderedInfo MediaCodec Output Frame Rendered information. |
typedef struct MLMediaCodecOutputFrameListener | MLMediaCodecOutputFrameListener Callbacks for notifying when an output frame is available for consumption or has been rendered on the output surface. |
typedef struct MLMediaCodecCryptoPattern | MLMediaCodecCryptoPattern Metadata describing an encryption pattern for the protected bytes in a subsample. |
typedef struct MLMediaCodecCryptoInfo | MLMediaCodecCryptoInfo Metadata describing the structure of a (at least partially) encrypted input sample. A buffer's data is considered to be partitioned into "subSamples", each subSample starts with a (potentially empty) run of plain, unencrypted bytes followed by a (also potentially empty) run of encrypted bytes. If pattern encryption applies, each of the encrypted runs is encrypted only partly, according to a repeating pattern of "encrypt" and "skip" blocks. This information encapsulates per-sample metadata as outlined in ISO/IEC FDIS 23001-7:2011 "Common encryption in ISO base media file format files". |
typedef struct MLMediaCodecListQueryResults | MLMediaCodecListQueryResults |
typedef struct MLMediaCodecListProfileLevel | MLMediaCodecListProfileLevel Used to store the list of codec profile levels. |
typedef int64_t()(MLHandle media_data_source, size_t position, size_t size, uint8_t buffer, void *context) | MLMediaDataSourceReadAt Called to request data from the given position. |
typedef int64_t()(MLHandle media_data_source, void context) | MLMediaDataSourceGetSize Called to get the size of the data source. |
typedef void()(MLHandle media_data_source, void context) | MLMediaDataSourceClose Called before deleting |
typedef struct MLMediaDRMByteArray | MLMediaDRMByteArray |
typedef struct MLMediaDRMByteArrayList | MLMediaDRMByteArrayList |
typedef struct MLMediaDRMKeyValue | MLMediaDRMKeyValue |
typedef struct MLMediaDRMKeyValueArray | MLMediaDRMKeyValueArray |
typedef struct MLMediaDRMKeyRequestInputParam | MLMediaDRMKeyRequestInputParam |
typedef struct MLMediaDRMRequestMessage | MLMediaDRMRequestMessage Data type that encapsulates either of the following along with an URL: |
typedef struct MLMediaDRMCryptoInputParam | MLMediaDRMCryptoInputParam |
typedef struct MLMediaDRMHMACInputParam | MLMediaDRMHMACInputParam |
typedef struct MLMediaDRMRSAInputParam | MLMediaDRMRSAInputParam |
typedef struct MLMediaDRMEventInfo | MLMediaDRMEventInfo MediaDRM event info associated with a session. |
typedef struct MLMediaDRMExpirationUpdateInfo | MLMediaDRMExpirationUpdateInfo MediaDRM expiration update info associated with a session. |
typedef struct MLMediaDRMKeyStatus | MLMediaDRMKeyStatus MediaDRM key status. |
typedef struct MLMediaDRMKeyStatusInfo | MLMediaDRMKeyStatusInfo MediaDRM session keys status change info. |
typedef struct MLMediaDRMEventCallbacks | MLMediaDRMEventCallbacks Callbacks for notifying client about MLMediaDRM events. |
typedef MLPSSHEntry | MLMediaExtractorPSSHEntry |
typedef struct MLMediaExtractorDRMSchemeInitData | MLMediaExtractorDRMSchemeInitData |
typedef struct MLMediaFormatByteArray | MLMediaFormatByteArray |
typedef MLPSSHEntry | MLMediaPlayerPSSHEntry |
typedef struct MLMediaPlayerTrackDRMInfo | MLMediaPlayerTrackDRMInfo MediaPlayer DRM Info for a Media Track . |
typedef struct MLMediaPlayerSubtitleData | MLMediaPlayerSubtitleData |
typedef struct MLMediaPlayerBufferingSettings | MLMediaPlayerBufferingSettings |
typedef struct MLMediaPlayerOnBufferingUpdateInfo | MLMediaPlayerOnBufferingUpdateInfo MediaPlayer Buffering update callback Info. |
typedef struct MLMediaPlayerOnCompletionInfo | MLMediaPlayerOnCompletionInfo MediaPlayer Playback completion callback Info. |
typedef struct MLMediaPlayerOnErrorInfo | MLMediaPlayerOnErrorInfo MediaPlayer Error callback Info. |
typedef struct MLMediaPlayerOnInfoInfo | MLMediaPlayerOnInfoInfo MediaPlayer Information callback Info. |
typedef struct MLMediaPlayerOnPreparedInfo | MLMediaPlayerOnPreparedInfo MediaPlayer Playback prepared callback Info. |
typedef struct MLMediaPlayerOnSeekCompleteInfo | MLMediaPlayerOnSeekCompleteInfo MediaPlayer Playback seek completion callback Info. |
typedef struct MLMediaPlayerOnVideoSizeChangedInfo | MLMediaPlayerOnVideoSizeChangedInfo MediaPlayer Video Size Changed callback Info. |
typedef struct MLMediaPlayerOnTrackDRMInfo | MLMediaPlayerOnTrackDRMInfo MediaPlayer Track DRM Info callback Info. |
typedef struct MLMediaPlayerOnResetCompleteInfo | MLMediaPlayerOnResetCompleteInfo MediaPlayer reset completion callback Info. |
typedef struct MLMediaPlayerOnFramePackingInfo | MLMediaPlayerOnFramePackingInfo MediaPlayer frame packing callback Info. |
typedef struct MLMediaPlayerEventCallbacksEx | MLMediaPlayerEventCallbacksEx Callbacks for notifying client about Media Player error events. |
typedef struct MLMediaPlayerTrackInfo | MLMediaPlayerTrackInfo MediaPlayer Track Information. |
typedef struct MLMediaPlayerTrackDRMSessionInfo | MLMediaPlayerTrackDRMSessionInfo DRM Session information for a MediaPlayer Track. |
typedef void()(MLHandle media_player, MLMediaPlayerSubtitleData subtitle_data, void data) | MLMediaPlayerOnMediaSubtitleUpdateCallback Callbacks signature called when subtitle update is available. |
typedef void()(MLHandle media_player, MLHandle timed_text, void data) | MLMediaPlayerOnMediaTimedTextUpdateCallback Callbacks signature called when Timed Text update is available. |
typedef struct MLMediaPlayerMetrics | MLMediaPlayerMetrics MediaPlayer metrics data. |
typedef void()(MLHandle media_stream_source, void context) | MLMediaStreamSourceOnBufferAvailable Called when buffers becomes available. |
typedef struct MLTTMLImage | MLTTMLImage Byte data for TTML image cues. |
typedef struct MLTTMLData | MLTTMLData TTML data structure. |
typedef struct MLPSSHEntry | MLPSSHEntry PSSH entry. |
typedef struct MLWebVTTData | MLWebVTTData WebVTT data structure. |
typedef struct MLNativeSurfaceFrameAvailableInfo | MLNativeSurfaceFrameAvailableInfo NativeSurface/NativeSurfaceTexture Output Frame Availability information. |
typedef struct MLNativeSurfaceConfig | MLNativeSurfaceConfig Configuration values for creating the Native Surface. |
typedef struct MLNativeSurfaceOnFrameAvailableCallback | MLNativeSurfaceOnFrameAvailableCallback Callbacks for notifying when an output frame is available for consumption. |
Enums
Functions
Name | |
---|---|
MLResult | MLMediaCCParserCreate(MLHandle * out_handle) Create internal closed caption parser object. |
MLResult | MLMediaCCParserGetDisplayableEx(MLHandle cc_handle, const uint8_t * subtitle_data, int32_t subtitle_data_size, const MLCea608CaptionSegmentEx ** out_cc_seg) Return closed caption for display. |
MLResult | MLMediaCCParserDestroy(MLHandle cc_handle) Release internal CC parser object. |
MLResult | MLMediaCCParserSetDisplayChangedCallback(MLHandle cc_handle, MLMediaCCParserDisplayChangedCallback on_display_changed_callback, void * data) Set callback to get notified when a caption displayable has changed. |
MLResult | MLMediaCCParserParse(MLHandle cc_handle, const uint8_t * subtitle_data, uint32_t subtitle_data_size) Provide Cea608 parser with subtitle raw data for parsing. If the callback has been set by MLMediaCCParserSetDisplayChangedCallback, then its issued to notify the CC Data. |
MLResult | MLMediaCea708ParserCreate(MLHandle * out_handle) Create Cea708 parser object. |
MLResult | MLMediaCea708ParserParse(MLHandle cc_handle, const uint8_t * subtitle_data, uint32_t subtitle_data_size) Provide Cea708 parser with subtitle raw data for parsing. |
MLResult | MLMediaCea708ParserDestroy(MLHandle cc_handle) Release Cea708 parser object. |
MLResult | MLMediaCea708ParserSetEmitEventCallback(MLHandle cc_handle, MLMediaCea708ParserEmitEventCallback on_emit_event_callback, void * data) Set callback to get notified when a caption event has generated. |
void | MLMediaCodecCallbacksExInit(MLMediaCodecCallbacksEx * inout_callbacks) Initializes MLMediaCodecCallbacksEx with default values. |
void | MLMediaCodecOutputFrameListenerInit(MLMediaCodecOutputFrameListener * inout_callbacks) Initializes MLMediaCodecOutputFrameListener with default values. |
void | MLMediaCodecCryptoInfoInit(MLMediaCodecCryptoInfo * inout_crypto_info) Initializes MLMediaCodecCryptoInfo with default values. |
MLResult | MLMediaCodecCreateCryptoInfo(const MLMediaCodecCryptoInfo crypto_info, MLHandle out_crypto_info_handle) Create a Crypto Info object. |
MLResult | MLMediaCodecReleaseCryptoInfo(MLHandle crypto_info_handle) Release the Crypto Info created by MLMediaCodecCreateCryptoInfo. |
MLResult | MLMediaCodecCreateCodec(MLMediaCodecCreation method, MLMediaCodecType type, const char name_str, MLHandle out_handle) Create a new MLMediaCodec. |
MLResult | MLMediaCodecDestroy(MLHandle handle) Destroy a MLMediaCodec. |
MLResult | MLMediaCodecSetCallbacksEx(MLHandle handle, MLMediaCodecCallbacksEx callbacks, void user_data) Set callbacks to notify client codec events. Client needs to implement the callback functions. |
MLResult | MLMediaCodecSetOutputFrameListener(MLHandle handle, MLMediaCodecOutputFrameListener callbacks, void user_data) Registers a callback to be invoked when an output frame is available or rendered on the output surface. |
MLResult | MLMediaCodecGetName(MLHandle handle, char * out_name) Obtain the name of the created codec. |
MLResult | MLMediaCodecConfigure(MLHandle handle, MLHandle format_handle, MLHandle surface_handle, MLHandle crypto_handle) Configure the MLMediaCodec. |
MLResult | MLMediaCodecStart(MLHandle handle) Start the codec. |
MLResult | MLMediaCodecStop(MLHandle handle) Stop the codec. |
MLResult | MLMediaCodecReset(MLHandle handle) Reset the codec. |
MLResult | MLMediaCodecFlush(MLHandle handle) Flush the both the input and output ports of the codec. |
MLResult | MLMediaCodecSetParameters(MLHandle handle, MLHandle format_handle) Communicate additional parameter changes to a codec. |
MLResult | MLMediaCodecGetInputBufferPointer(MLHandle handle, int64_t buffer_index, uint8_t * out_buffer_ptr, size_t out_buffer_size) Obtain a writable buffer pointer for a dequeued input buffer index to contain the input data. |
MLResult | MLMediaCodecGetOutputBufferPointer(MLHandle handle, int64_t buffer_index, const uint8_t * out_buffer_ptr, size_t out_buffer_size) Obtain a read-only buffer pointer for a dequeued output buffer index. |
MLResult | MLMediaCodecQueueInputBuffer(MLHandle handle, int64_t buffer_index, int64_t offset, size_t size, uint64_t time_us, int flags) After filling a range of the input buffer at the specified index submit it to the component. |
MLResult | MLMediaCodecQueueSecureInputBuffer(MLHandle handle, int64_t buffer_index, int64_t offset, MLHandle crypto_info_handle, uint64_t time_us, int flags) Similar to queueInputBuffer but submits a buffer that is potentially encrypted. |
MLResult | MLMediaCodecDequeueInputBuffer(MLHandle handle, int64_t timeout_us, int64_t * out_buffer_index) Dequeue an input buffer from buffer queue. |
MLResult | MLMediaCodecDequeueOutputBuffer(MLHandle handle, MLMediaCodecBufferInfo out_buffer_info, int64_t timeout_us, int64_t out_buffer_index) Dequeue an output buffer from buffer queue. |
MLResult | MLMediaCodecGetInputFormat(MLHandle handle, MLHandle * out_format_handle) Obtain input format supported by the codec. |
MLResult | MLMediaCodecGetOutputFormat(MLHandle handle, MLHandle * out_format_handle) Return output format supported by the codec, or the format to which the configuration has changed. |
MLResult | MLMediaCodecCreateInputSurface(MLHandle handle, MLHandle * out_input_surface_handle) Create an input surface for a hardware encoder. |
MLResult | MLMediaCodecDestroyInputSurface(MLHandle handle, MLHandle input_surface_handle) Release the Surface that was created by MLMediaCodecCreateInputSurface. |
MLResult | MLMediaCodecSignalEndOfInputStream(MLHandle handle) Signal end-of-stream on input to a surface. |
MLResult | MLMediaCodecReleaseOutputBuffer(MLHandle handle, int64_t buffer_index, bool render) Release buffer to codec or to render it on output surface. |
MLResult | MLMediaCodecReleaseOutputBufferAtTime(MLHandle handle, int64_t buffer_index, int64_t timestamp_ns) Update surface timestamp and returns it to the codec to render it on the output surface. If codec is not configured with output surface, this call simply returns the buffer to codec. |
MLResult | MLMediaCodecListCountCodecs(uint64_t * out_codec_count) Obtain the number of available codecs. |
MLResult | MLMediaCodecListIsSoftwareCodec(const char codec_name, bool out_val) Determine whether a codec is a software codec. |
MLResult | MLMediaCodecListGetMatchingCodecs(const char mime, bool is_encoder, MLMediaCodecListCodecTypeFlag flag, MLMediaCodecListQueryResults out_matching_codecs) Obtain a list of matching codecs for a given codec mime. |
MLResult | MLMediaCodecListGetCodecByType(const char type, bool is_encoder, uint64_t start_index, int64_t out_index) Obtain the codec matching the given codec type from the codec list. |
MLResult | MLMediaCodecListGetCodecByName(const char name, int64_t out_index) Obtain the codec from the codec matching the given codec name from the codec list. |
MLResult | MLMediaCodecListIsEncoder(uint64_t index, bool * out_val) Confirm whether a component is an Encoder or Decoder. |
MLResult | MLMediaCodecListGetCodecName(uint64_t index, char * out_name) Obtain a codec name. |
MLResult | MLMediaCodecListGetSupportedMimes(uint64_t index, MLMediaCodecListQueryResults * out_supported_mimes) Obtain the list of mime types supported by a codec. |
MLResult | MLMediaCodecListGetCapabilityFlag(uint64_t index, const char mime, MLMediaCodecListCapabilityFlag out_capability_flag) Obtain the capability flag for a codec. |
MLResult | MLMediaCodecListGetSecureCodecName(const char mime, bool is_decoder, char out_name) Obtain the name of a secure codec for the given mime type. |
MLResult | MLMediaCodecListQueryResultsRelease(MLMediaCodecListQueryResults * query_results) Release the query results. |
MLResult | MLMediaCodecListGetSupportedProfileLevels(uint64_t index, const char mime, MLMediaCodecListProfileLevel ** out_profile_levels, size_t out_profile_levels_size) Obtain the supported profile levels for a codec. |
MLResult | MLMediaCodecListProfileLevelsRelease(MLMediaCodecListProfileLevel * profile_levels) Release profile levels. |
MLResult | MLMediaCodecListGetSupportedColorFormats(uint64_t index, const char mime, uint32_t ** out_color_formats, size_t out_color_formats_size) Obtain the supported color formats for a codec. All the supported color formats are defined by MLMediaCodecColorFormat. |
MLResult | MLMediaCodecListColorFormatsRelease(uint32_t * color_formats) Release color formats. |
MLResult | MLMediaCodecListGetSupportedBitrateModes(uint64_t index, const char mime, MLMediaCodecBitrateMode ** out_bitrate_modes, size_t out_bitrate_modes_size) Obtain the supported bitrate modes for a codec. |
MLResult | MLMediaCodecBitrateModesRelease(MLMediaCodecBitrateMode * bitrate_modes) Release Bitrate modes. |
MLResult | MLMediaCodecListIsAdaptivePlaybackSupported(uint64_t index, const char mime, bool out_supported) Check whether Adaptive playback is supported. |
MLResult | MLMediaCodecListIsSecurePlaybackSupported(uint64_t index, const char mime, bool out_supported) Check whether Secure playback is supported. |
MLResult | MLMediaCodecListIsIntraRefreshSupported(uint64_t index, const char mime, bool out_supported) Check whether Intra Refresh is supported. |
MLResult | MLMediaCryptoCreate(MLUUID uuid, const MLMediaDRMByteArray data, MLHandle out_handle) Create a MLMediaCrypto instance from a UUID. |
MLResult | MLMediaCryptoRelease(MLHandle media_crypto) Release the MLMediaCrypto instance. |
MLResult | MLMediaCryptoIsCryptoSchemeSupported(MLUUID uuid, bool * out_supported) Query if the given scheme identified by its UUID is supported on this device. |
MLResult | MLMediaCryptoRequiresSecureDecoderComponent(const char mime_type, bool out_required) Query if the crypto scheme requires the use of a secure decoder to decode data of the given mime type. |
MLResult | MLMediaCryptoSetMediaDRMSession(MLHandle media_crypto, const MLMediaDRMByteArray * session_id) Associate a #MediaDRM session with this MLMediaCrypto instance. |
MLResult | MLMediaDataSourceCreate(MLMediaDataSourceReadAt read_at, MLMediaDataSourceGetSize get_size, MLMediaDataSourceClose close, void context, MLHandle out_handle) Create a new MediaDataSource object. |
MLResult | MLMediaDataSourceDestroy(MLHandle media_data_source) Destroy a #MediaDataSource object. |
void | MLMediaDRMEventCallbacksInit(MLMediaDRMEventCallbacks * inout_callbacks) Initializes MLMediaDRMEventCallbacks with default values. |
MLResult | MLMediaDRMByteArrayAllocate(size_t size, MLMediaDRMByteArray * out_array) Allocate byte array buffer. |
MLResult | MLMediaDRMByteArrayAllocAndCopy(const uint8_t copy_from, size_t size, MLMediaDRMByteArray out_array) Allocate and Copy to byte array buffer. |
MLResult | MLMediaDRMKeyValueArrayAllocate(size_t size, MLMediaDRMKeyValueArray * out_array) Allocate array of key/value pairs. |
MLResult | MLMediaDRMCreate(MLUUID uuid, MLHandle * out_handle) Create a MLMediaDRM instance from a UUID. |
MLResult | MLMediaDRMRelease(MLHandle media_drm) Release the MLMediaDRM instance. |
MLResult | MLMediaDRMByteArrayRelease(MLMediaDRMByteArray * array) Release byte array buffer. |
MLResult | MLMediaDRMByteArrayListRelease(MLMediaDRMByteArrayList * array) Release list of byte array buffer. |
MLResult | MLMediaDRMKeyValueArrayRelease(MLMediaDRMKeyValueArray * array) Release key/value pair array. |
MLResult | MLMediaDRMRequestMessageRelease(MLMediaDRMRequestMessage * request) Release Request Message. |
MLResult | MLMediaDRMKeyValueArrayAdd(const MLMediaDRMKeyValue pair, MLMediaDRMKeyValueArray out_array) Add a key/value pair to the array of key/value pairs. |
MLResult | MLMediaDRMIsCryptoSchemeSupported(MLUUID uuid, const char mime_type, bool out_supported) Query if the given scheme identified by its UUID is supported on this device. And whether the drm plugin is able to handle the media container format. |
MLResult | MLMediaDRMSetOnEventListenerEx(MLHandle media_drm, MLMediaDRMEventCallbacks callbacks, void data) Register a callback to be invoked when DRM events or updates or status change occurs. |
MLResult | MLMediaDRMOpenSession(MLHandle media_drm, MLMediaDRMByteArray * out_session_id) Opens a new session. A session ID is returned. |
MLResult | MLMediaDRMCloseSession(MLHandle media_drm, MLMediaDRMByteArray * session_id) Closes a session on the MLMediaDRM object that was previously opened with openSession(). |
MLResult | MLMediaDRMGetKeyRequest(MLHandle media_drm, const MLMediaDRMByteArray session_id, const MLMediaDRMKeyRequestInputParam key_request_param, MLMediaDRMRequestMessage * out_key_request) A key request/response exchange occurs between the app and a license server to obtain or release keys used to decrypt encrypted content. |
MLResult | MLMediaDRMProvideKeyResponse(MLHandle media_drm, const MLMediaDRMByteArray session_id, const MLMediaDRMByteArray response, MLMediaDRMByteArray * out_key_set_id) A key response is received from the license server by the app, then it is provided to the DRM engine plugin using MLMediaDRMProvideKeyResponse(). |
MLResult | MLMediaDRMRestoreKeys(MLHandle media_drm, const MLMediaDRMByteArray session_id, const MLMediaDRMByteArray key_set_id) Restore persisted offline keys into a new session. key_set_id identifies the keys to load, obtained from a prior call to MLMediaDRMProvideKeyResponse(). |
MLResult | MLMediaDRMRemoveKeys(MLHandle media_drm, MLMediaDRMByteArray * key_set_id) Remove the current keys from a session. |
MLResult | MLMediaDRMQueryKeyStatus(MLHandle media_drm, const MLMediaDRMByteArray session_id, MLMediaDRMKeyValueArray out_info_map) Request an informative description of the key status for the session. |
MLResult | MLMediaDRMGetProvisionRequest(MLHandle media_drm, const char cert_type, MLMediaDRMRequestMessage out_provision_request) A provision request/response exchange occurs between the app and a provisioning server to retrieve a device certificate. |
MLResult | MLMediaDRMProvideProvisionResponse(MLHandle media_drm, const MLMediaDRMByteArray response, MLMediaDRMByteArray out_certificate, MLMediaDRMByteArray * out_wrapped_key) After a provision response is received by the app, it is provided to the DRM engine plugin using this method. |
MLResult | MLMediaDRMGetSecureStops(MLHandle media_drm, MLMediaDRMByteArrayList * out_secure_stops) Access all secure stops. |
MLResult | MLMediaDRMGetSecureStop(MLHandle media_drm, const MLMediaDRMByteArray ss_id, MLMediaDRMByteArray out_secure_stop) Access secure stop by secure stop ID. |
MLResult | MLMediaDRMReleaseSecureStops(MLHandle media_drm, const MLMediaDRMByteArray * secure_stop) Process the SecureStop server response message. After authenticating the message, remove the SecureStops identified in the response. See MLMediaDRMGetSecureStops() for details. |
MLResult | MLMediaDRMReleaseAllSecureStops(MLHandle media_drm) Remove all the SecureStops. |
MLResult | MLMediaDRMGetPropertyString(MLHandle media_drm, MLMediaDRMProperty property_name, char ** out_property_value) Read a DRM engine plugin String property value, given the property name. |
MLResult | MLMediaDRMGetPropertyByteArray(MLHandle media_drm, MLMediaDRMProperty property_name, MLMediaDRMByteArray * out_property_value) Read a DRM engine plugin byte array property value, given the property name. |
MLResult | MLMediaDRMSetPropertyString(MLHandle media_drm, MLMediaDRMProperty property_name, const char * property_value) Set a DRM engine plugin String property value. |
MLResult | MLMediaDRMSetPropertyByteArray(MLHandle media_drm, MLMediaDRMProperty property_name, const MLMediaDRMByteArray * property_value) Set a DRM engine plugin byte array property value. |
MLResult | MLMediaDRMEncrypt(MLHandle media_drm, const MLMediaDRMByteArray session_id, const MLMediaDRMCryptoInputParam crypto_key_param, const MLMediaDRMByteArray input, MLMediaDRMByteArray out_output) Encrypt the data referenced by input using algorithm if specified, and write the encrypted result into output. |
MLResult | MLMediaDRMDecrypt(MLHandle media_drm, const MLMediaDRMByteArray session_id, const MLMediaDRMCryptoInputParam crypto_key_param, const MLMediaDRMByteArray input, MLMediaDRMByteArray out_output) Decrypt the data referenced by input using algorithm if specified, and write the encrypted result into output. |
MLResult | MLMediaDRMSign(MLHandle media_drm, const MLMediaDRMByteArray session_id, const MLMediaDRMHMACInputParam hmac_key_param, const MLMediaDRMByteArray message, MLMediaDRMByteArray out_signature) Generate a signature using the specified algorithm (if provided) over the message data and store the signature. |
MLResult | MLMediaDRMVerify(MLHandle media_drm, const MLMediaDRMByteArray session_id, const MLMediaDRMHMACInputParam hmac_key_param, const MLMediaDRMByteArray message, const MLMediaDRMByteArray signature, bool * out_match) Perform a signature verification using the specified algorithm (if specified) over the message data referenced by the message parameter. |
MLResult | MLMediaDRMSignRSA(MLHandle media_drm, const MLMediaDRMByteArray session_id, const MLMediaDRMRSAInputParam rsa_key_param, const MLMediaDRMByteArray message, MLMediaDRMByteArray out_signature) Generate a signature using the specified RSA Key and algorithm. |
MLResult | MLMediaExtractorCreate(MLHandle * out_handle) Create a new MLMediaExtractor. |
MLResult | MLMediaExtractorDestroy(MLHandle handle) Destroy a MLMediaExtractor. |
MLResult | MLMediaExtractorSetDataSourceForPath(MLHandle handle, const char * path) Set a local file path as the data source. |
MLResult | MLMediaExtractorSetDataSourceForURI(MLHandle handle, const char * uri) Set a URI string as the data source. |
MLResult | MLMediaExtractorSetDataSourceForURIWithHeaders(MLHandle handle, const char * uri, const char ** headers, size_t len) Set a URI string as the data source. |
MLResult | MLMediaExtractorSetDataSourceForFD(MLHandle handle, int fd, int64_t offset, int64_t length) Set the data source as the file-descriptor to use. |
MLResult | MLMediaExtractorSetMediaDataSource(MLHandle handle, MLHandle media_data_source) Sets the data source as user defined media data source. |
MLResult | MLMediaExtractorGetDRMInitData(MLHandle handle, MLUUID drm_uuid, MLMediaExtractorDRMSchemeInitData * out_drm_init_data) Extract DRM initialization data for a given DRM Scheme if it exists. |
MLResult | MLMediaExtractorReleaseDRMInitData(MLHandle handle, MLMediaExtractorDRMSchemeInitData * drm_init_data) Release DRM initialization data which was previously retrieved. |
MLResult | MLMediaExtractorGetTrackCount(MLHandle handle, uint64_t * out_track_count) Count the number of tracks found in the data source. |
MLResult | MLMediaExtractorGetTrackFormat(MLHandle handle, size_t index, MLHandle * out_track_handle) Get the track format at the specified index. |
MLResult | MLMediaExtractorSelectTrack(MLHandle handle, size_t index) Select a track for the subsequent operations. |
MLResult | MLMediaExtractorUnselectTrack(MLHandle handle, size_t index) Unselect a track for the subsequent operations. |
MLResult | MLMediaExtractorSeekTo(MLHandle handle, int64_t time_us, MLMediaSeekMode mode) All selected tracks seek near the requested time according to the specified mode. |
MLResult | MLMediaExtractorAdvance(MLHandle handle) Advance to the next sample. |
MLResult | MLMediaExtractorReadSampleData(MLHandle handle, uint8_t byte_buf, size_t buf_size, size_t offset, int64_t out_data_size) Retrieve the current encoded sample and store it in the byte buffer starting at the given offset. |
MLResult | MLMediaExtractorGetSampleTrackIndex(MLHandle handle, int64_t * out_track_index) Return the track index the current sample originates from. |
MLResult | MLMediaExtractorGetSampleTime(MLHandle handle, int64_t * out_sample_time) Return the current sample's presentation time in microseconds. |
MLResult | MLMediaExtractorGetSampleFlags(MLHandle handle, int * out_sample_flags) Return the current sample's flags. |
MLResult | MLMediaExtractorGetSampleCryptoInfo(MLHandle handle, MLHandle * out_info_handle) Return the current sample's Crypto info if has encrypted sample. |
MLResult | MLMediaExtractorReleaseCryptoInfo(MLHandle handle, MLHandle * inout_info_handle) Release the Crypto Info. |
MLResult | MLMediaExtractorGetCachedDuration(MLHandle handle, int64_t * out_cached_duration) Return an estimate of how much data is presently cached in memoryexpressed in microseconds. |
MLResult | MLMediaExtractorHasCacheReachedEOS(MLHandle handle) Return true if we are caching data and the cache has reached the end of the data stream (for now, a future seek may of course restart the fetching of data). |
MLResult | MLMediaExtractorGetPSSHInfoCount(MLHandle handle, size_t * out_index) Get the Number of PSSH info if present. |
MLResult | MLMediaExtractorGetPSSHInfo(MLHandle handle, size_t index, MLMediaExtractorPSSHEntry * out_pssh_entry) Get the PSSH info if present. The PSSH(Protection System Specific Header) contains a UUID representing a DRM scheme along with opaque data blob used for creating crypto session, which in turn used to configure codec. |
MLResult | MLMediaExtractorReleasePSSHInfo(MLHandle handle, MLMediaExtractorPSSHEntry * pssh_entry) Clear the PSSH info data. |
MLResult | MLMediaFormatCreateVideo(const char mime_type, int width, int height, MLHandle out_handle) Create a video format object. |
MLResult | MLMediaFormatCreateAudio(const char mime_type, int sample_rate, int channel_count, MLHandle out_handle) Create a audio format object. |
MLResult | MLMediaFormatCreateSubtitle(const char mime_type, const char language, MLHandle * out_handle) Create a subtitle format object. |
MLResult | MLMediaFormatCreate(MLHandle * out_handle) Create an empty format object. |
MLResult | MLMediaFormatCreateCopy(MLHandle handle, MLHandle * out_handle) Create a copy of the format handle provided. |
MLResult | MLMediaFormatDestroy(MLHandle handle) Destroy a MLMediaFormat object. |
MLResult | MLMediaFormatObjectToString(MLHandle handle, char * out_string) Obtain the human readable representation of the format. |
MLResult | MLMediaFormatGetKeyValueInt32(MLHandle handle, MLMediaFormatKey name, int32_t * out_key) Obtain the value of an integer key. |
MLResult | MLMediaFormatGetKeyValueInt64(MLHandle handle, MLMediaFormatKey name, int64_t * out_key) Obtain the value of a long key. |
MLResult | MLMediaFormatGetKeyValueFloat(MLHandle handle, MLMediaFormatKey name, float * out_key) Obtain the value of an float key. |
MLResult | MLMediaFormatGetKeySize(MLHandle handle, MLMediaFormatKey name, size_t * out_size) Obtain the size of a key. |
MLResult | MLMediaFormatGetKeyString(MLHandle handle, MLMediaFormatKey name, char * out_string) Obtain the value of a string key. |
MLResult | MLMediaFormatGetKeyByteBuffer(MLHandle handle, MLMediaFormatKey name, MLMediaFormatByteArray * out_buffer) Obtain the value of a ByteBuffer key. |
MLResult | MLMediaFormatKeyByteBufferRelease(MLHandle handle, MLMediaFormatByteArray * buffer) Release the ByteBuffer acquired by MLMediaFormatGetKeyByteBuffer. |
MLResult | MLMediaFormatSetKeyInt32(MLHandle handle, MLMediaFormatKey name, int32_t key_value) Set the value of an integer key. |
MLResult | MLMediaFormatSetKeyInt64(MLHandle handle, MLMediaFormatKey name, int64_t key_value) Set the value of a long key. |
MLResult | MLMediaFormatSetKeyFloat(MLHandle handle, MLMediaFormatKey name, float key_value) Set the value of a float key. |
MLResult | MLMediaFormatSetKeySize(MLHandle handle, MLMediaFormatKey name, size_t key_size) Set the size of a key. |
MLResult | MLMediaFormatSetKeyString(MLHandle handle, MLMediaFormatKey name, const char * key_value) Set the value of a string key. |
MLResult | MLMediaFormatSetKeyByteBuffer(MLHandle handle, MLMediaFormatKey name, const MLMediaFormatByteArray * buffer) Set the value of a ByteBuffer key. |
void | MLMediaPlayerEventCallbacksExInit(MLMediaPlayerEventCallbacksEx * inout_callbacks) Initializes MediaPlayerEventCallbacks with default values. |
void | MLMediaPlayerTrackInfoInit(MLMediaPlayerTrackInfo * inout_track_info) Initializes Media Track Information with default values. |
void | MLMediaPlayerTrackDRMSessionInfoInit(MLMediaPlayerTrackDRMSessionInfo * inout_drm_session_info) Initializes Media Track DRM Session Information with defult values. |
MLResult | MLMediaPlayerCreate(MLHandle * out_handle) Create a new Media Player object. |
MLResult | MLMediaPlayerDestroy(MLHandle media_player) Destroys a MediaPlayer object. |
MLResult | MLMediaPlayerSetDataSourceForFD(MLHandle media_player, int32_t fd) Sets a file descriptor as the data source. |
MLResult | MLMediaPlayerSetOffsetDataSourceForFD(MLHandle media_player, int32_t fd, int64_t offset, int64_t length) Sets a file descriptor as the data source with offset. |
MLResult | MLMediaPlayerSetDataSourceForPath(MLHandle media_player, const char * path) Sets a local file path as the data source. |
MLResult | MLMediaPlayerSetDataSourceForURI(MLHandle media_player, const char * uri) Sets a URI string as the data source. |
MLResult | MLMediaPlayerSetRemoteDataSourceForURI(MLHandle media_player, const char * uri, char ** headers, size_t len) Sets a URI string as the remote data source. |
MLResult | MLMediaPlayerSetMediaDataSource(MLHandle media_player, MLHandle media_data_source) Sets the data source to use. |
MLResult | MLMediaPlayerSetMediaStreamSource(MLHandle media_player, MLHandle media_stream_source) Sets the data source to use. |
MLResult | MLMediaPlayerAddTimedTextSourceForURI(MLHandle media_player, const char uri, const char mime_type) Adds a TimedText source from a URI. |
MLResult | MLMediaPlayerAddTimedTextSourceForFD(MLHandle media_player, int32_t fd, int64_t offset, int64_t length, const char * mime_type) Adds a TimedText source from a file descriptor. |
MLResult | MLMediaPlayerSetNextPlayer(MLHandle media_player, MLHandle next_media_player) Sets the 'next' Media Player to automatically 'start' when current Media Player playback completes. |
MLResult | MLMediaPlayerGetTrackCount(MLHandle media_player, uint32_t * out_track_count) Counts the number of tracks found in the data source. |
MLResult | MLMediaPlayerGetTrackType(MLHandle media_player, uint32_t track, MLMediaPlayerTrackType * out_track_type) Gets the type of a track. |
MLResult | MLMediaPlayerGetTrackLanguage(MLHandle media_player, uint32_t track, char ** out_track_language) Gets the language of a track. |
MLResult | MLMediaPlayerGetTrackMediaFormat(MLHandle media_player, uint32_t track, MLHandle * out_media_format) Gets the Media Format of a track. |
MLResult | MLMediaPlayerSelectTrack(MLHandle media_player, uint32_t track) Selects a track. |
MLResult | MLMediaPlayerUnselectTrack(MLHandle media_player, uint32_t track) Unselects a track. |
MLResult | MLMediaPlayerPrepare(MLHandle media_player) Prepares the player for playback, synchronously. |
MLResult | MLMediaPlayerPrepareAsync(MLHandle media_player) Prepares the player for playback, asynchronously. |
MLResult | MLMediaPlayerStart(MLHandle media_player) Starts or resumes playback. |
MLResult | MLMediaPlayerStop(MLHandle media_player) Stops playback after playback has been started or paused. |
MLResult | MLMediaPlayerPause(MLHandle media_player) Pauses playback. |
MLResult | MLMediaPlayerReset(MLHandle media_player) Resets the Media Player to its uninitialized state. |
MLResult | MLMediaPlayerSeekTo(MLHandle media_player, int msec, MLMediaSeekMode mode) Seeks to specified time position. |
MLResult | MLMediaPlayerSetEventCallbacksEx(MLHandle media_player, const MLMediaPlayerEventCallbacksEx callbacks, void data) Sets callbacks to notify clients about player events. |
MLResult | MLMediaPlayerGetVideoSize(MLHandle media_player, int32_t out_width, int32_t out_height) Returns the size of the video frame. |
MLResult | MLMediaPlayerGetCurrentPosition(MLHandle media_player, int32_t * out_msec) Returns current position of playback. |
MLResult | MLMediaPlayerGetDuration(MLHandle media_player, int32_t * out_msec) Returns media duration. |
MLResult | MLMediaPlayerGetBufferingUpdate(MLHandle media_player, int32_t * out_percentage) Returns current buffering percentage. |
MLResult | MLMediaPlayerGetInfo(MLHandle media_player, int32_t out_code, int32_t out_extra) Returns last info received by internal Media Player. |
MLResult | MLMediaPlayerGetError(MLHandle media_player, MLResult * out_result) Returns last error received by internal Media Player. |
MLResult | MLMediaPlayerGetTimedText(MLHandle media_player, const char * out_text, int32_t out_start, int32_t * out_end) Returns last timed text event information. |
MLResult | MLMediaPlayerGetSubtitleEx(MLHandle media_player, MLMediaPlayerSubtitleData ** out_subtitle_data) Returns last subtitle event information. |
MLResult | MLMediaPlayerReleaseSubtitleEx(MLHandle media_player) Releases last subtitle event information. |
MLResult | MLMediaPlayerSetOnMediaSubtitleUpdateCallback(MLHandle media_player, MLMediaPlayerOnMediaSubtitleUpdateCallback on_media_subtitle_callback, void * data) Sets callback to get notified when a subtitle update is available along with its data. |
MLResult | MLMediaPlayerGetMetadata(MLHandle media_player, int64_t out_time, int32_t out_size, uint8_t ** out_buffer) Returns last metadata event information. |
MLResult | MLMediaPlayerSetVideoScalingMode(MLHandle media_player, MLMediaPlayerVideoScalingMode mode) Sets video scaling mode. |
MLResult | MLMediaPlayerSetLooping(MLHandle media_player, bool loop) Sets the looping mode of the player. |
MLResult | MLMediaPlayerSetVolume(MLHandle media_player, float volume) Sets the volume on this player. |
MLResult | MLMediaPlayerGetAudioHandle(MLHandle media_player, MLHandle * out_handle) Gets the handle of the audio stream. |
MLResult | MLMediaPlayerPollStates(MLHandle media_player, uint16_t mask, uint16_t * out_polled_states) Polls the desired states from internal Media Player. |
MLResult | MLMediaPlayerGetTrackDRMInfo(MLHandle media_player, const MLMediaPlayerTrackInfo * track_info, MLMediaPlayerTrackDRMInfo ** out_drm_info) Gets the DRM info of the selected media (either audio or video) track. |
MLResult | MLMediaPlayerPrepareTrackDRM(MLHandle media_player, const MLMediaPlayerTrackDRMSessionInfo * drm_session_info) Prepares DRM for the selected media (either audio or video) track. |
MLResult | MLMediaPlayerReleaseDRM(MLHandle media_player) Releases DRM. |
MLResult | MLMediaPlayerGetDefaultBufferingSettings(MLHandle media_player, MLMediaPlayerBufferingSettings * out_buf_settings) Gets default Buffering settings. |
MLResult | MLMediaPlayerGetBufferingSettings(MLHandle media_player, MLMediaPlayerBufferingSettings * out_buf_settings) Gets current Buffering settings. |
MLResult | MLMediaPlayerSetBufferingSettings(MLHandle media_player, MLMediaPlayerBufferingSettings buf_settings) Sets buffering settings. |
MLResult | MLMediaPlayerSetOnMediaTimedTextUpdateCallback(MLHandle media_player, MLMediaPlayerOnMediaTimedTextUpdateCallback on_media_timed_text_callback, void * data) Set callback to get invoked when a Timed Text update is available along with its data. |
MLResult | MLMediaPlayerGetWebVTTData(MLHandle media_player, MLHandle timed_text, MLWebVTTData ** out_webvtt_data) Gets WebVTT data represented by a timed text handle. |
MLResult | MLMediaPlayerGetTTMLData(MLHandle media_player, MLHandle timed_text, MLTTMLData ** out_ttml_data) Gets TTML data represented by a timed text handle. |
MLResult | MLMediaPlayerResetAsync(MLHandle media_player) Resets the Media Player to its uninitialized state asynchronously. |
MLResult | MLMediaPlayerGetMetrics(MLHandle media_player, MLMediaPlayerMetrics * out_metrics) Retrieves metrics recorded on the MediaPlayer. |
MLResult | MLMediaPlayerSetSurface(MLHandle media_player, MLHandle surface) Sets the Native surface to be used as the sink for displaying the video portion of the media. |
MLResult | MLMediaStreamSourceCreate(MLMediaStreamSourceOnBufferAvailable on_buffer_available, void context, MLHandle out_handle) Create a new MediaStreamSource object. |
MLResult | MLMediaStreamSourceDestroy(MLHandle media_stream_source) Destroy a MediaStreamSource object. |
MLResult | MLMediaStreamSourceGetBuffer(MLHandle media_stream_source, size_t out_id, uint8_t ** out_ptr, size_t out_size) Get a buffer where data can be written. |
MLResult | MLMediaStreamSourcePushBuffer(MLHandle media_stream_source, size_t id, size_t size) Push a buffer. |
MLResult | MLMediaStreamSourcePushEOS(MLHandle media_stream_source) Push End-Of-Stream event. |
void | MLNativeSurfaceConfigInit(MLNativeSurfaceConfig * inout_config_values) Initializes MLNativeSurfaceConfig with default values. |
void | MLNativeSurfaceOnFrameAvailableCallbackInit(MLNativeSurfaceOnFrameAvailableCallback * inout_callbacks) Initializes MLNativeSurfaceOnFrameAvailableCallback with default values. |
MLResult | MLNativeSurfaceCreate(const MLNativeSurfaceConfig config_values, MLHandle out_handle) Create a new NativeSurface. |
MLResult | MLNativeSurfaceRelease(MLHandle handle) Release a NativeSurface. |
MLResult | MLNativeSurfaceGetNativeWindow(MLHandle handle, MLHandle out_native_window, int32_t out_format) Gets an implementation of NativeWindow that feeds graphic buffers into MLNativeSurface. |
MLResult | MLNativeSurfaceReleaseNativeWindow(MLHandle handle, MLHandle native_window) Releases NativeWindow previously acquired by MLNativeSurfaceGetNativeWindow. |
MLResult | MLNativeSurfaceAcquireNextAvailableFrame(MLHandle handle, MLHandle * out_native_buffer) Consume next available buffer. |
MLResult | MLNativeSurfaceAcquireHardwareBufferFromNativeBuffer(MLHandle handle, MLHandle native_buffer, struct AHardwareBuffer * out_hardware_buffer, uint32_t out_width, uint32_t * out_height) Acquire an AHardwareBuffer* from a native buffer handle. |
MLResult | MLNativeSurfaceReleaseFrame(MLHandle handle, MLHandle native_buffer) Release a native buffer previously acquired. |
MLResult | MLNativeSurfaceGetFrameTransformationMatrix(MLHandle handle, float out_mtx[16]) Retrieves the 4x4 texture coordinate transform matrix associated with the last acquired Frame. |
MLResult | MLNativeSurfaceGetFrameTimestamp(MLHandle handle, int64_t * out_timestamp_ns) Retrieves the timestamp associated with the last acquired frame. The timestamp is in nanoseconds, and is monotonically increasing from beginning of the playback. Its other semantics (zero point, etc) are codec-dependent and should be documented by the codec vendor. |
MLResult | MLNativeSurfaceGetFrameQueueBufferTimestamp(MLHandle handle, int64_t * out_timestamp_ns) Retrieves the QueueBuffer timestamp associated with the last acquired Frame This timestamp is for profiling purposes only and corresponds to the time when this frame was queued by internal Codec's producer code. The timestamp is in nanoseconds, and is monotonically increasing from beginning of playback. Its other semantics (zero point, etc) are codec-dependent and should by documented by the codec vendor. |
MLResult | MLNativeSurfaceGetFrameNumber(MLHandle handle, uint64_t * out_number) Retrieves the last acquired frame number. The frame number is an incrementing counter set to 0 at Codec configuration time. |
MLResult | MLNativeSurfaceGetFrameCropRect(MLHandle handle, MLRecti * out_crop_rect) Retrieves the cropping rectangle of the current frame/buffer. |
MLResult | MLNativeSurfaceSetOnFrameAvailableCallback(MLHandle handle, const MLNativeSurfaceOnFrameAvailableCallback callback, void user_data) Set callback to notify client when a frame is available. |
MLResult | MLNativeSurfaceTextureCreate(const MLNativeSurfaceConfig config_values, MLNativeSurfaceTextureBackend backend, MLHandle out_handle) Create a new NativeSurfaceTexture. |
MLResult | MLNativeSurfaceTextureRelease(MLHandle handle) Release a NativeSurfaceTexture. |
MLResult | MLNativeSurfaceTextureUpdateTexImage(MLHandle handle) Update the texture image to the most recent frame from the image stream. |
MLResult | MLNativeSurfaceTextureAttachToGLContext(MLHandle handle, uint32_t texture_id) Attach the NativeSurfaceTexture to the graphic context that is current on the calling thread. |
MLResult | MLNativeSurfaceTextureDetachFromGLContext(MLHandle handle) Detach the NativeSurfaceTexture from the graphic context that owns the graphic texture object. |
MLResult | MLNativeSurfaceTextureGetTransformationMatrix(MLHandle handle, float out_matrix[16]) Retrieve the 4x4 texture coordinate transform matrix associated with the texture image set by the most recent call to MLNativeSurfaceTextureUpdateTexImage. |
MLResult | MLNativeSurfaceTextureGetTimestamp(MLHandle handle, int64_t * out_timestamp_ns) Retrieve the timestamp associated with the texture image set by the most recent call to MLNativeSurfaceTextureUpdateTexImage. |
MLResult | MLNativeSurfaceTextureSetOnFrameAvailableCallback(MLHandle handle, const MLNativeSurfaceOnFrameAvailableCallback callback, void user_data) Set callback to notify client when a frame is available. |
Attributes
Name | |
---|---|
const typedef char * | MLMediaDRMProperty |
const typedef char * | MLMediaFormatKey |
const int32_t | MLAudioChannelOutMono |
const int32_t | MLAudioChannelOutStereo |
const int32_t | MLAudioChannelOutQuad |
const int32_t | MLAudioChannelOutSurround |
const int32_t | MLAudioChannelOut5Point1 |
const int32_t | MLAudioChannelOut7Point1 |
const int32_t | MLAudioChannelOut7Point1Surround |
MLMediaDRMProperty | MLMediaDRMProperty_Vendor |
MLMediaDRMProperty | MLMediaDRMProperty_Version |
MLMediaDRMProperty | MLMediaDRMProperty_Description |
MLMediaDRMProperty | MLMediaDRMProperty_Algorithms String property name: a comma-separated list of cipher and mac algorithms supported by #CryptoSession. The list may be empty if the DRM engine plugin does not support #CryptoSession operations. |
MLMediaDRMProperty | MLMediaDRMProperty_DeviceUniqueID Byte array property name: the device unique identifier is established during device provisioning and provides a means of uniquely identifying each device. |
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. |
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. |
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. |
MLMediaFormatKey | MLMediaFormat_Key_AAC_DRC_Heavy_Compression A key describing the selection of the heavy compression profile for DRC. |
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. |
MLMediaFormatKey | MLMediaFormat_Key_AAC_Max_Output_Channel_Count A key describing the maximum number of channels that can be output by the AAC decoder. |
MLMediaFormatKey | MLMediaFormat_Key_AAC_Profile A key describing the AAC profile to be used (AAC audio formats only). |
MLMediaFormatKey | MLMediaFormat_Key_AAC_SBR_Mode A key describing the AAC SBR mode to be used (AAC audio formats only). |
MLMediaFormatKey | MLMediaFormat_Key_Bit_Rate A key describing the average bitrate in bits/sec. |
MLMediaFormatKey | MLMediaFormat_Key_Bit_Rate_Mode A key describing the desired bitrate mode to be used by an encoder. |
MLMediaFormatKey | MLMediaFormat_Key_Capture_Rate A key describing the capture rate of a video format in frames/sec. |
MLMediaFormatKey | MLMediaFormat_Key_Channel_Count A key describing the number of channels in an audio format. |
MLMediaFormatKey | MLMediaFormat_Key_Channel_Mask A key describing the channel composition of audio content. |
MLMediaFormatKey | MLMediaFormat_Key_Color_Format A key describing the color format of the content in a video format. |
MLMediaFormatKey | MLMediaFormat_Key_Duration A key describing the duration (in microseconds) of the content. |
MLMediaFormatKey | MLMediaFormat_Key_FLAC_Compression_Level A key describing the FLAC compression level to be used (FLAC audio format only). |
MLMediaFormatKey | MLMediaFormat_Key_Frame_Rate A key describing the frame rate of a video format in frames/sec. |
MLMediaFormatKey | MLMediaFormat_Key_Height A key describing the height of the content in a video format. |
MLMediaFormatKey | MLMediaFormat_Key_I_Frame_Interval A key describing the frequency of key frames expressed in seconds between key frames. |
MLMediaFormatKey | MLMediaFormat_Key_Intra_Refresh_Period An optional key describing the period of intra refresh in frames. |
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. |
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. |
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. |
MLMediaFormatKey | MLMediaFormat_Key_Is_Forced_Subtitle A key for the FORCED field for subtitle tracks. |
MLMediaFormatKey | MLMediaFormat_Key_Language A key describing the language of the content, using either ISO 639-1 or 639-2/T codes. |
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. |
MLMediaFormatKey | MLMediaFormat_Key_Max_Input_Size Described by this MediaFormat. |
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. |
MLMediaFormatKey | MLMediaFormat_Key_Mime A key describing the mime type of the MediaFormat. |
MLMediaFormatKey | MLMediaFormat_Key_PCM_Encoding A key describing the raw audio sample encoding/format. |
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. |
MLMediaFormatKey | MLMediaFormat_Key_Repeat_Previous_Frame_After Applies only when configuring a video encoder in "surface-input" mode. |
MLMediaFormatKey | MLMediaFormat_Key_Sample_Rate A key describing the sample rate of an audio format. |
MLMediaFormatKey | MLMediaFormat_Key_Stride A key describing the stride of the video bytebuffer layout. |
MLMediaFormatKey | MLMediaFormat_Key_Temporal_Layering A key describing the temporal layering schema. |
MLMediaFormatKey | MLMediaFormat_Key_Width A key describing the width of the content in a video format. |
MLMediaFormatKey | MLMediaFormat_Key_Crop_Left The left-coordinate (x) of the crop rectangle. |
MLMediaFormatKey | MLMediaFormat_Key_Crop_Right The right-coordinate (x) MINUS 1 of the crop rectangle. |
MLMediaFormatKey | MLMediaFormat_Key_Crop_Bottom The bottom-coordinate (y) MINUS 1 of the crop rectangle. |
MLMediaFormatKey | MLMediaFormat_Key_Crop_Top The top-coordinate (y) of the crop rectangle. |
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. |
MLMediaFormatKey | MLMediaFormat_Key_Latency An optional key describing the desired encoder latency in frames. |
MLMediaFormatKey | MLMediaFormat_Key_Parameter_Video_Bitrate A key describing the desired video bitrate. |
MLMediaFormatKey | MLMediaFormat_Key_Parameter_Request_Sync_Frame Request that the encoder produce a sync frame "soon". |
MLMediaFormatKey | MLMediaFormat_Key_Parameter_Set_Suspend Temporarily suspend/resume encoding of input data. |
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. |
MLMediaFormatKey | MLMediaFormat_Key_Parameter_Drop_Before A key describing the desired before which frames are to be skipped. |
MLMediaFormatKey | MLMediaFormat_Key_Parameter_Drop_After A key describing the desired after which frames are to be skipped. |
MLMediaFormatKey | MLMediaFormat_Key_Parameter_Offset_Time Specify an offset (in micro-second) to be added on top of the timestamps onward. |
MLMediaFormatKey | MLMediaFormat_Key_Priority A key describing the desired codec priority. |
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. |
MLMediaFormatKey | MLMediaFormat_Key_Intra_Refresh_Mode An optional key describing the mode of intra refresh in frames. The associated value is an integer. |
MLMediaFormatKey | MLMediaFormat_Key_Intra_Refresh_CIR_Num Number of consecutive macroblocks to be coded as intra when CIR is enabled. |
MLMediaFormatKey | MLMediaFormat_Key_Intra_Refresh_AIR_Num Number of intra macroblocks to refresh in a frame when AIR is enabled. |
MLMediaFormatKey | MLMediaFormat_Key_Intra_Refresh_AIR_Ref Number of times a motion marked macroblock has to be intra coded. |
MLMediaFormatKey | MLMediaFormat_Key_Profile A key describing the desired profile to be used by an encoder. |
MLMediaFormatKey | MLMediaFormat_Key_Level A key describing the desired level to be used by an encoder. |
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). |
MLMediaFormatKey | MLMediaFormat_Key_Color_Range An optional key describing the range of the component values of the video content. |
MLMediaFormatKey | MLMediaFormat_Key_Color_Standard An optional key describing the color primaries, white point and luminance factors for video content. |
MLMediaFormatKey | MLMediaFormat_Key_Color_Transfer An optional key describing the opto-electronic transfer function used for the video content. |
MLMediaFormatKey | MLMediaFormat_Key_HDR_Static_Info An optional key describing the static metadata of HDR (high-dynamic-range) video content. |
MLMediaFormatKey | MLMediaFormat_Key_CSD A key describing the codec specific data. |
MLMediaFormatKey | MLMediaFormat_Key_CSD0 A key describing the codec specific data buffer #0. |
MLMediaFormatKey | MLMediaFormat_Key_CSD1 A key describing the codec specific data buffer #1. |
MLMediaFormatKey | MLMediaFormat_Key_CSD2 A key describing the codec specific data buffer #2. |
MLMediaFormatKey | MLMediaFormat_Key_CSD_Avc A key describing the codec specific data buffer for AVC (h.264). |
MLMediaFormatKey | MLMediaFormat_Key_CSD_Hevc A key describing the codec specific data buffer for HEVC (h.265). |
MLMediaFormatKey | MLMediaFormat_Key_Album A key describing metadata - album title of the media. |
MLMediaFormatKey | MLMediaFormat_Key_Albumart A key describing metadata. The artwork for the album of the media's original source as a Bitmap. |
MLMediaFormatKey | MLMediaFormat_Key_Albumartist A key describing metadata. The artist for the album of the media's original source. |
MLMediaFormatKey | MLMediaFormat_Key_Artist A key describing metadata. The artist of the media. |
MLMediaFormatKey | MLMediaFormat_Key_Audio_Presentation_Info A key describing metadata. The media presentation info. |
MLMediaFormatKey | MLMediaFormat_Key_Audio_Presentation_Presentation_Id A key describing metadata. The media presentation Id. |
MLMediaFormatKey | MLMediaFormat_Key_Audio_Presentation_Program_Id A key describing metadata. The media program Id. |
MLMediaFormatKey | MLMediaFormat_Key_Audio_Session_Id A key describing the audio session ID of the AudioTrack associated to a tunneled video codec. |
MLMediaFormatKey | MLMediaFormat_Key_Author A key describing metadata. The author of the media. |
MLMediaFormatKey | MLMediaFormat_Key_Bits_Per_Sample Key representing media number of bits per sample. |
MLMediaFormatKey | MLMediaFormat_Key_Cdtracknumber A key describing metadata. The cd track number. |
MLMediaFormatKey | MLMediaFormat_Key_Compilation A key describing metadata. The media compilation. |
MLMediaFormatKey | MLMediaFormat_Key_Complexity A key describing the encoding complexity. |
MLMediaFormatKey | MLMediaFormat_Key_Composer A key describing metadata - composer of the media. |
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. |
MLMediaFormatKey | MLMediaFormat_Key_Crypto_Default_Iv_Size |
MLMediaFormatKey | MLMediaFormat_Key_Crypto_Encrypted_Byte_Block |
MLMediaFormatKey | MLMediaFormat_Key_Crypto_Encrypted_Sizes |
MLMediaFormatKey | MLMediaFormat_Key_Crypto_Iv |
MLMediaFormatKey | MLMediaFormat_Key_Crypto_Key |
MLMediaFormatKey | MLMediaFormat_Key_Crypto_Mode |
MLMediaFormatKey | MLMediaFormat_Key_Crypto_Plain_Sizes |
MLMediaFormatKey | MLMediaFormat_Key_Crypto_Skip_Byte_Block |
MLMediaFormatKey | MLMediaFormat_Key_D263 |
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. |
MLMediaFormatKey | MLMediaFormat_Key_Discnumber A key describing metadata. The disc number for the media's original source. |
MLMediaFormatKey | MLMediaFormat_Key_Display_Crop A key describing display crop rectangle. |
MLMediaFormatKey | MLMediaFormat_Key_Display_Height |
MLMediaFormatKey | MLMediaFormat_Key_Display_Width |
MLMediaFormatKey | MLMediaFormat_Key_Encoder_Delay A key describing the number of frames to trim from the start of the decoded audio stream. |
MLMediaFormatKey | MLMediaFormat_Key_Encoder_Padding A key describing the number of frames to trim from the end of the decoded audio stream. |
MLMediaFormatKey | MLMediaFormat_Key_Esds A key describing the electrostatic discharge and soldering (ESDS). |
MLMediaFormatKey | MLMediaFormat_Key_Exif_Offset |
MLMediaFormatKey | MLMediaFormat_Key_Exif_Size |
MLMediaFormatKey | MLMediaFormat_Key_Frame_Count |
MLMediaFormatKey | MLMediaFormat_Key_Genre A key describing metadata. The media genre. |
MLMediaFormatKey | MLMediaFormat_Key_Grid_Columns A key describing the number of grid columns in the content in a MIMETYPE_IMAGE_ANDROID_HEIC track. |
MLMediaFormatKey | MLMediaFormat_Key_Grid_Rows A key describing the number of grid rows in the content in a MIMETYPE_IMAGE_ANDROID_HEIC track. |
MLMediaFormatKey | MLMediaFormat_Key_Haptic_Channel_Count A key describing the number of haptic channels in an audio format. |
MLMediaFormatKey | MLMediaFormat_Key_Hdr10_Plus_Info An optional key describing the HDR10+ metadata of the video content. |
MLMediaFormatKey | MLMediaFormat_Key_Icc_Profile |
MLMediaFormatKey | MLMediaFormat_Key_Is_Sync_Frame |
MLMediaFormatKey | MLMediaFormat_Key_Location A key describing metadata. The media location. |
MLMediaFormatKey | MLMediaFormat_Key_Loop A key describing metadata. The media loop. |
MLMediaFormatKey | MLMediaFormat_Key_Lyricist A key describing metadata. The media lyricist. |
MLMediaFormatKey | MLMediaFormat_Key_Manufacturer A key describing metadata. The media manufacturer. |
MLMediaFormatKey | MLMediaFormat_Key_Max_Bit_Rate A key describing the max bitrate in bits/sec. |
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. |
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). |
MLMediaFormatKey | MLMediaFormat_Key_Mpeg_User_Data |
MLMediaFormatKey | MLMediaFormat_Key_Mpeg2_Stream_Header |
MLMediaFormatKey | MLMediaFormat_Key_PCM_Big_Endian |
MLMediaFormatKey | MLMediaFormat_Key_Pssh |
MLMediaFormatKey | MLMediaFormat_Key_Rotation A key describing the desired clockwise rotation on an output surface. |
MLMediaFormatKey | MLMediaFormat_Key_Sar_Height |
MLMediaFormatKey | MLMediaFormat_Key_Sar_Width |
MLMediaFormatKey | MLMediaFormat_Key_Sei |
MLMediaFormatKey | MLMediaFormat_Key_Slice_Height A key describing the plane height of a multi-planar (YUV) video bytebuffer layout. |
MLMediaFormatKey | MLMediaFormat_Key_Target_Time |
MLMediaFormatKey | MLMediaFormat_Key_Temporal_Layer_Count |
MLMediaFormatKey | MLMediaFormat_Key_Temporal_Layer_Id |
MLMediaFormatKey | MLMediaFormat_Key_Text_Format_Data |
MLMediaFormatKey | MLMediaFormat_Key_Thumbnail_CSD_Hevc |
MLMediaFormatKey | MLMediaFormat_Key_Thumbnail_Height |
MLMediaFormatKey | MLMediaFormat_Key_Thumbnail_Time |
MLMediaFormatKey | MLMediaFormat_Key_Thumbnail_Width |
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. |
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. |
MLMediaFormatKey | MLMediaFormat_Key_Time_Us |
MLMediaFormatKey | MLMediaFormat_Key_Title A key describing metadata. The title of the media. |
MLMediaFormatKey | MLMediaFormat_Key_Track_Id A key describing a unique ID for the content of a media track. |
MLMediaFormatKey | MLMediaFormat_Key_Track_Index |
MLMediaFormatKey | MLMediaFormat_Key_Valid_Samples |
MLMediaFormatKey | MLMediaFormat_Key_Year A key describing metadata. The year the media was created or published as a long. |
MLMediaFormatKey | MLMediaFormat_Key_AAC_DRC_Effect_Type A key describing for selecting the DRC effect type for MPEG-D DRC. |
MLMediaFormatKey | MLMediaFormat_Key_Quality A key describing the desired encoding quality. |
MLMediaFormatKey | MLMediaFormat_Key_Output_Reorder_Depth An optional key describing the maximum number of non-display-order coded frames. |
MLMediaFormatKey | MLMediaFormat_Key_Is_Timed_Text |
MLMediaFormatKey | MLMediaFormat_Key_Ca_System_Id A key describing the system id of the conditional access system used to scramble a media track. |
MLMediaFormatKey | MLMediaFormat_Key_Ca_Session_Id A key describing the MediaCas.Session object associated with a media track. |
MLMediaFormatKey | MLMediaFormat_Key_Ca_Private_Data A key describing the private data in the CA_descriptor associated with a media track. |
MLMediaFormatKey | MLMediaFormatKey_Feature A key prefix used together with a MLMediaCodecBitrateMode feature name describing a required or optional feature for a codec capabilities query. |
const float | MLTTMLDimen_Unset An unset position, width or size which is negative of maximum finite value of float (-FLT_MAX). |
size_t | size |
uint8_t * | data |
int64_t | start_time_ms |
int64_t | end_time_ms |
char * | text |
MLTTMLLayoutAlignment | text_alignment |
MLTTMLImage | bitmap |
float | line The position of the line_anchor of the cue box within the viewport in the direction orthogonal to the writing direction, or MLTTMLDimen_Unset. |
MLTTMLLineType | line_type The cue line type. |
MLTTMLAnchorType | line_anchor |
float | position The fractional position of the position_anchor of the cue box within the viewport in the direction orthogonal to line, or MLTTMLDimen_Unset. |
MLTTMLAnchorType | position_anchor |
float | size |
float | bitmap_height |
bool | window_color_set |
uint32_t | window_color |
MLTTMLTextSizeType | text_size_type |
float | text_size |
int64_t | start_time_ms |
int64_t | end_time_ms |
char * | body |
char * | id |
bool | snap_to_lines |
MLWebVTTOrientation | orientation |
MLWebVTTDirection | direction |
float | relative_line_position |
int32_t | line_number |
float | text_position |
float | size |
MLWebVTTAlign | align |
Defines
Name | |
---|---|
MAX_CODEC_NAME_SIZE | |
MAX_CODEC_NAME_LENGTH | |
MAX_FORMAT_STRING_SIZE | |
MAX_KEY_STRING_SIZE |
Detailed Description
Defines Audio Channel Mask to describe the input/output posistion. Position implies, the location of a speaker or a microphone for recording or playback.
APIs for creaitng native surface (or surface texture) that works with graphics.
Data Structure for WebVTT Timed Text.
Data Structure for TTML Timed Text.
APIs for accessing streaming media from memory.
APIs for high level management of media playback.
APIs for creating and retrieving media format information.
APIs for to extracting elementary track from media container.
APIs for MediaDRM to obtain the content keys for decrypting protected media streams, in conjunction with ml_mediacrypto.
APIs for defining an user implemented DataSource that acts as media track source.
APIs for creaitng crypto session for setting up encrypted media playback.
APIs for retrieving all supported encoders and decoders.
APIs for encoding and decoding audio and video buffers.
APIs for CEA708 Closed Captions Parser.
APIs for CEA608 Closed Captions Parser.
Stringify the error codes returned by these APIs, call MLMediaResultGetString.
Stringify the error codes returned by these APIs, call MLMediaResultGetString.
Stringify the error codes returned by these APIs, call MLMediaResultGetString.
Stringify the error codes returned by these APIs, call MLMediaResultGetString.
Stringify the error codes returned by these APIs, call MLMediaResultGetString.
Stringify the error codes returned by these APIs, call MLMediaResultGetString.
Stringify the error codes returned by these APIs, call MLMediaResultGetString.
Stringify the error codes returned by these APIs, call MLMediaResultGetString.
Stringify the error codes returned by these APIs, call MLMediaResultGetString.
Stringify the error codes returned by these APIs, call MLMediaResultGetString.
Stringify the error codes returned by these APIs, call MLMediaResultGetString.
Stringify the error codes returned by these APIs, call MLMediaResultGetString.
To stringify the error codes returned by these APIs, call MLMediaResultGetString.
- THIS API IS DEPRECATED IN FAVOR OF STANDARD ANDROID SDK MEDIA APIs: https://developer.android.com/reference/android/media/MediaFormat#MIMETYPE_TEXT_CEA_608 Developers are encouraged to use ExoPlayer for all media playback needs.
- THIS API IS DEPRECATED IN FAVOR OF STANDARD ANDROID SDK MEDIA APIs: https://developer.android.com/reference/android/media/MediaFormat#MIMETYPE_TEXT_CEA_708 Developers are encouraged to use ExoPlayer for all media playback needs.
- THIS API IS DEPRECATED IN FAVOR OF STANDARD ANDROID SDK AND NDK MEDIA APIs: https://developer.android.com/ndk/reference/group/mediahttps://developer.android.com/reference/android/media/MediaCodec Developers are encouraged to use ExoPlayer for all media playback needs.
- THIS API IS DEPRECATED IN FAVOR OF STANDARD ANDROID SDK AND NDK MEDIA APIs: https://developer.android.com/ndk/reference/group/mediahttps://developer.android.com/reference/android/media/MediaCodecList Developers are encouraged to use ExoPlayer for all media playback needs.
- THIS API IS DEPRECATED IN FAVOR OF STANDARD ANDROID SDK MEDIA APIs: https://developer.android.com/reference/android/media/MediaPlayer#seekTo(long,%20int) Developers are encouraged to use ExoPlayer for all media playback needs.
- THIS API IS DEPRECATED IN FAVOR OF STANDARD ANDROID SDK AND NDK MEDIA APIs: https://developer.android.com/ndk/reference/group/mediahttps://developer.android.com/reference/android/media/MediaCrypto Developers are encouraged to use ExoPlayer for all media playback needs.
- THIS API IS DEPRECATED IN FAVOR OF STANDARD ANDROID SDK MEDIA APIs: https://developer.android.com/reference/android/media/MediaDataSource Developers are encouraged to use ExoPlayer for all media playback needs.
- THIS API IS DEPRECATED IN FAVOR OF STANDARD ANDROID SDK AND NDK MEDIA APIs: https://developer.android.com/ndk/reference/group/mediahttps://developer.android.com/reference/android/media/MediaPlayer.DrmInfo Developers are encouraged to use ExoPlayer for all media playback needs.
- THIS API IS DEPRECATED IN FAVOR OF STANDARD ANDROID SDK AND NDK MEDIA APIs: https://developer.android.com/ndk/reference/group/mediahttps://developer.android.com/reference/android/media/MediaExtractor Developers are encouraged to use ExoPlayer for all media playback needs.
- THIS API IS DEPRECATED IN FAVOR OF STANDARD ANDROID SDK AND NDK MEDIA APIs: https://developer.android.com/ndk/reference/group/mediahttps://developer.android.com/reference/android/media/MediaFormat Developers are encouraged to use ExoPlayer for all media playback needs.
- THIS API IS DEPRECATED IN FAVOR OF STANDARD ANDROID SDK MEDIA APIs: https://developer.android.com/reference/android/media/MediaPlayer Developers are encouraged to use ExoPlayer for all media playback needs.
- THIS API IS DEPRECATED IN FAVOR OF STANDARD ANDROID SDK AND NDK MEDIA APIs: https://developer.android.com/ndk/reference/group/mediahttps://developer.android.com/reference/android/media/MediaDataSource Developers are encouraged to use ExoPlayer for all media playback needs.
- THIS API IS DEPRECATED IN FAVOR OF STANDARD ANDROID SDK MEDIA APIs: https://developer.android.com/reference/android/media/TimedText Developers are encouraged to use ExoPlayer for all media playback needs.
- THIS API IS DEPRECATED IN FAVOR OF STANDARD ANDROID SDK AND NDK MEDIA APIs: https://developer.android.com/ndk/reference/struct/pssh-entryhttps://developer.android.com/reference/android/media/MediaExtractor#getPsshInfo() Developers are encouraged to consider using ExoPlayer for all media playback needs.
- THIS API IS DEPRECATED IN FAVOR OF STANDARD ANDROID SDK MEDIA APIs: https://developer.android.com/reference/android/media/MediaFormat#MIMETYPE_TEXT_VTT Developers are encouraged to use ExoPlayer for all media playback needs.
- THIS API IS DEPRECATED IN FAVOR OF STANDARD ANDROID SDK AND NDK MEDIA APIs: https://developer.android.com/ndk/reference/group/a-hardware-bufferhttps://developer.android.com/ndk/reference/group/media#aimagereaderhttps://developer.android.com/reference/kotlin/android/hardware/HardwareBuffer
Shared Object:
- media_ccparser.magicleap*
Shared Object:
- media_cea708parser.magicleap*
Shared Object:
- media_codec.magicleap*
Shared Object:
- media_codeclist.magicleap*
Shared Object:
- media_crypto.magicleap*
Shared Object:
- media_player.magicleap*
Shared Object:
- media_drm.magicleap*
Shared Object:
- media_extractor.magicleap*
Shared Object:
- media_format.magicleap*
Shared Object:
- media_player.magicleap*
Shared Object:
- media_player.magicleap*
Shared Object:
- native_surface.magicleap*
Enums Documentation
MLAudioChannelOutMask
Enumerator | Value | Description |
---|---|---|
MLAudioChannelOutMask_FrontLeft | 0x1 | |
MLAudioChannelOutMask_FrontRight | 0x2 | |
MLAudioChannelOutMask_FrontCenter | 0x4 | |
MLAudioChannelOutMask_LowFrequency | 0x8 | |
MLAudioChannelOutMask_BackLeft | 0x10 | |
MLAudioChannelOutMask_BackRight | 0x20 | |
MLAudioChannelOutMask_FrontLeftOfCenter | 0x40 | |
MLAudioChannelOutMask_FrontRightOfCenter | 0x80 | |
MLAudioChannelOutMask_BackCenter | 0x100 | |
MLAudioChannelOutMask_SideLeft | 0x200 | |
MLAudioChannelOutMask_SideRight | 0x400 | |
MLAudioChannelOutMask_TopCenter | 0x800 | |
MLAudioChannelOutMask_TopFrontLeft | 0x1000 | |
MLAudioChannelOutMask_TopFrontCenter | 0x2000 | |
MLAudioChannelOutMask_TopFrontRight | 0x4000 | |
MLAudioChannelOutMask_TopBackLeft | 0x8000 | |
MLAudioChannelOutMask_TopBackCenter | 0x10000 | |
MLAudioChannelOutMask_TopBackRight | 0x20000 | |
MLAudioChannelOutMask_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 bits. |
Audio channel output mask.
For a channel position mask, each allowed channel position corresponds to a bit in the channel mask. If that channel position is present in the audio frame, that bit is set, otherwise it is zero. The order of the bits (from lsb to msb) corresponds to the order of that position's sample in the audio frame. The canonical channel position masks by channel count are as follows:
channel count channel position mask
1 MLAudioChannelOutMono 2 MLAudioChannelOutStereo 3 MLAudioChannelOutStereo | MLAudioChannelOutMask_FrontCenter 4 MLAudioChannelOutQuad 5 MLAudioChannelOutQuad | MLAudioChannelOutMask_FrontCenter 6 MLAudioChannelOut5Point1 7 MLAudioChannelOut5Point1 | MLAudioChannelOutMask_BackCenter
8 MLAudioChannelOut7Point1Surround
These masks are an ORed composite of individual channel masks. For example MLAudioChannelOutMask_Stereo is composed of MLAudioChannelOutMask_FrontLeft and MLAudioChannelOutMask_FrontRight.
Reference:
- https://android.googlesource.com/platform/frameworks/base/+/b267554/media/java/android/media/AudioFormat.java
- https://trac.ffmpeg.org/wiki/AudioChannelManipulation#Listchannelnamesandstandardchannellayouts
MLCea608CaptionDimension
Enumerator | Value | Description |
---|---|---|
MLCea608_CCMaxRows | 15 | |
MLCea608_CCMaxCols | 32 | |
MLCea608_CCMaxRowsPlus2 | 17 | |
MLCea608_CCMaxColsPlus2 | 34 | |
MLCea608_CCMaxRowsCols_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 bits. |
Cea608 Caption Dimension constants.
API Level:
- 2
MLCea608CaptionColor
Enumerator | Value | Description |
---|---|---|
MLCea608CaptionColor_White | 0 | |
MLCea608CaptionColor_Green | 1 | |
MLCea608CaptionColor_Blue | 2 | |
MLCea608CaptionColor_Cyan | 3 | |
MLCea608CaptionColor_Red | 4 | |
MLCea608CaptionColor_Yellow | 5 | |
MLCea608CaptionColor_Magenta | 6 | |
MLCea608CaptionColor_Invalide | 7 | |
MLCea608CaptionColor_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 bits. |
Cea608 caption color code.
API Level:
- 2
MLCea608CaptionStyle
Enumerator | Value | Description |
---|---|---|
MLCea608CaptionStyle_Italics | 0x00000001 | |
MLCea608CaptionStyle_Underline | 0x00000002 | |
MLCea608CaptionStyle_Ensure32Bits | 0x7FFFFFFF |
Cea608 caption style code.
API Level:
- 2
Anonymous Enum 16
Enumerator | Value | Description |
---|---|---|
MLCea608_TS | 0x00A0 | NO-BREAK SPACE. |
Anonymous Enum 17
Enumerator | Value | Description |
---|---|---|
MLCea708CaptionWindows_Max | 8 |
Cea708 Caption maximum windows constant.
API Level:
- 8
Anonymous Enum 18
Enumerator | Value | Description |
---|---|---|
MLCea708CaptionEmitCommandBuffer_MaxSize | 20 |
Maximum size for Cea708 Caption Emit command buffers.
API Level:
- 8
MLCea708CaptionEmitCommand
Enumerator | Value | Description |
---|---|---|
MLCea708CaptionEmitCommand_Buffer | 1 | Buffer. |
MLCea708CaptionEmitCommand_Control | 2 | Control. |
MLCea708CaptionEmitCommand_CWX | 3 | SetCurrentWindow tells the caption decoder which window the following commands describe: SetWindowAttributes SetPenAttributes SetPenColor SetPenLocation. If the window specified has not already been created with a DefineWindow command then, SetCurrentWindow and the window property commands can be safely ignored. |
MLCea708CaptionEmitCommand_CLW | 4 | ClearWindows clears all the windows specified in the 8 bit window bitmap. |
MLCea708CaptionEmitCommand_DSW | 5 | DisplayWindows displays all the windows specified in the 8 bit window bitmap. |
MLCea708CaptionEmitCommand_HDW | 6 | HideWindows hides all the windows specified in the 8 bit window bitmap. |
MLCea708CaptionEmitCommand_TGW | 7 | ToggleWindows hides all displayed windows, and displays all hidden windows specified in the 8 bit window bitmap. |
MLCea708CaptionEmitCommand_DLW | 8 | DeleteWindows deletes all the windows specified in the 8 bit window bitmap. If the current window, as specified by the last SetCurrentWindow command, is deleted then the current window becomes undefined and the window attribute commands should have no effect until after the next SetCurrentWindow or DefineWindow command. |
MLCea708CaptionEmitCommand_DLY | 9 | Delay suspends all processing of the current service, except for DelayCancel and Reset scanning. |
MLCea708CaptionEmitCommand_DLC | 10 | DelayCancel terminates any active delay and resumes normal command processing. DelayCancel should be scanned for during a Delay. |
MLCea708CaptionEmitCommand_RST | 11 | Reset deletes all windows, cancels any active delay, and clears the buffer before the Reset command. Reset should be scanned for during a Delay. |
MLCea708CaptionEmitCommand_SPA | 12 | The SetPenAttributes command specifies how certain attributes of subsequent characters are to be rendered in the current window, until the next SetPenAttributes command. |
MLCea708CaptionEmitCommand_SPC | 13 | SetPenColor sets the foreground, background, and edge color for the subsequent characters. |
MLCea708CaptionEmitCommand_SPL | 14 | SetPenLocation sets the location of for the next bit of appended text in the current window. It has two parameters, row and column. |
MLCea708CaptionEmitCommand_SWA | 15 | SetWindowAttributes Sets the window attributes of the current window. |
MLCea708CaptionEmitCommand_DFX | 16 | DefineWindow0-7 creates one of the eight windows used by a caption decoder. |
MLCea708CaptionEmitCommand_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 bits. |
Cea708 Caption Emit Commands constants.
API Level:
- 8
MLCea708CaptionEmitCommandControl
Enumerator | Value | Description |
---|---|---|
MLCea708CaptionEmitCommandControl_ETX | 0x03 | End of Text. |
MLCea708CaptionEmitCommandControl_BS | 0x08 | |
MLCea708CaptionEmitCommandControl_FF | 0x0c | |
MLCea708CaptionEmitCommandControl_HCR | 0x0e | |
MLCea708CaptionEmitCommandControl_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 bits. |
Cea708 Caption Emit Command Control constants.
API Level:
- 8
MLCea708CaptionColorOpacity
Enumerator | Value | Description |
---|---|---|
MLCea708CaptionColorOpacity_SOLID | 0 | |
MLCea708CaptionColorOpacity_FLASH | 1 | |
MLCea708CaptionColorOpacity_TRANSLUCENT | 2 | |
MLCea708CaptionColorOpacity_TRANSPARENT | 3 | |
MLCea708CaptionColorOpacity_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 bits. |
Cea708 Caption Color Opacity constants.
API Level:
- 8
MLCea708CaptionPenSize
Enumerator | Value | Description |
---|---|---|
MLCea708CaptionPenSize_SMALL | 0 | |
MLCea708CaptionPenSize_STANDARD | 1 | |
MLCea708CaptionPenSize_LARGE | 2 | |
MLCea708CaptionPenSize_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 bits. |
Cea708 Caption Pen Size constants.
API Level:
- 8
MLCea708CaptionPenOffset
Enumerator | Value | Description |
---|---|---|
MLCea708CaptionPenOffset_SUBSCRIPT | 0 | |
MLCea708CaptionPenOffset_NORMAL | 1 | |
MLCea708CaptionPenOffset_SUPERSCRIPT | 2 | |
MLCea708CaptionPenOffset_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 bits. |
Cea708 Caption Pen Offset constants.
API Level:
- 8
MLMediaCodecCreation
Enumerator | Value | Description |
---|---|---|
MLMediaCodecCreation_ByName | Create by name. | |
MLMediaCodecCreation_ByType | Create by type. | |
MLMediaCodecCreation_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 bits. |
Media codec creation method.
MLMediaCodecType
Enumerator | Value | Description |
---|---|---|
MLMediaCodecType_Encoder | Encoder. | |
MLMediaCodecType_Decoder | Decoder. | |
MLMediaCodecType_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 bits. |
Media codec type.
MLMediaCodecBufferFlag
Enumerator | Value | Description |
---|---|---|
MLMediaCodecBufferFlag_KeyFrame | 1 | The (encoded) buffer contains the data for a key frame. |
MLMediaCodecBufferFlag_CodecConfig | 2 | Buffer contains codec initialization OR codec specific data instead of media data. |
MLMediaCodecBufferFlag_EOS | 4 | Signals the end of stream, i.e. no buffers will be available after this. |
MLMediaCodecBufferFlag_PartialFrame | 8 | Buffer only contains part of a frame, and the decoder should batch the data until a buffer without this flag appears before decoding the frame. |
MLMediaCodecBufferFlag_MuxerData | 16 | Buffer contains muxer data - Supported only for Exif data block. |
MLMediaCodecBufferFlag_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 bits. |
Indicate the type of data when queuing the input buffer via MLMediaCodecQueueInputBuffer() or MLMediaCodecQueueSecureInputBuffer().
Deprecated since 1.4.0. Scheduled for removal.
MLMediaCodecOutputBufferStatus
Enumerator | Value | Description |
---|---|---|
MLMediaCodec_OutputBuffersChanged | -1014 | Output buffer changed. |
MLMediaCodec_FormatChanged | -1012 | Format changed. |
MLMediaCodec_TryAgainLater | -11 | Try again later. |
MLMediaCodecOutputBufferStatus_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 bits. |
Other than the normal buffer index, the output of MLMediaCodecDequeueOutputBuffer() can take on one of these statuses.
Deprecated since 1.4.0. Scheduled for removal.
MLMediaCodecCryptoMode
Enumerator | Value | Description |
---|---|---|
MLMediaCodecCryptoMode_Clear | Clear samples. | |
MLMediaCodecCryptoMode_CTR | Sample encrypted with AES CTR mode. | |
MLMediaCodecCryptoMode_CBC | Sample encrypted with AES CBC mode. | |
MLMediaCodecCryptoMode_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 bits. |
Crypto mode using which media samples are encrypted.
MLMediaCodecListCodecTypeFlag
Enumerator | Value | Description |
---|---|---|
MLMediaCodecListCodecTypeFlag_Software | 1 << 0 | Software. |
MLMediaCodecListCodecTypeFlag_Hardware | 1 << 1 | Hardware. |
MLMediaCodecListCodecTypeFlag_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 Bits. |
Bit mask for specifying the type of codec being queried using MLMediaCodecListGetMatchingCodecs().
MLMediaCodecListCapabilityFlag
Enumerator | Value | Description |
---|---|---|
MLMediaCodecListCapabilityFlag_AdaptivePlayback | 1 << 0 | Adaptive playback. |
MLMediaCodecListCapabilityFlag_SecurePlayback | 1 << 1 | Secure playback. |
MLMediaCodecListCapabilityFlag_TunneledPlayback | 1 << 2 | Tunneled playback. |
MLMediaCodecListCapabilityFlag_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 Bits. |
Bit mask for checking the capability of a codec after queried via MLMediaCodecListGetCapabilityFlag.
MLMediaCodecColorFormat
Enumerator | Value | Description |
---|---|---|
MLMediaCodecColorFormat_Unused | 0 | Unused: Placeholder value when format is N/A. |
MLMediaCodecColorFormat_Monochrome | 1 | Monochrome: black and white. |
MLMediaCodecColorFormat_8BitRGB332 | 2 | 8BitRGB332: Red 7:5, Green 4:2, Blue 1:0. |
MLMediaCodecColorFormat_12BitRGB444 | 3 | 12BitRGB444: Red 11:8, Green 7:4, Blue 3:0. |
MLMediaCodecColorFormat_16BitARGB4444 | 4 | 16BitARGB4444: Alpha 15:12, Red 11:8, Green 7:4, Blue 3:0. |
MLMediaCodecColorFormat_16BitARGB1555 | 5 | 16BitARGB1555: Alpha 15, Red 14:10, Green 9:5, Blue 4:0. |
MLMediaCodecColorFormat_16BitRGB565 | 6 | 16BitRGB565: Red 15:11, Green 10:5, Blue 4:0. |
MLMediaCodecColorFormat_16BitBGR565 | 7 | 16BitBGR565: Blue 15:11, Green 10:5, Red 4:0. |
MLMediaCodecColorFormat_18BitRGB666 | 8 | 18BitRGB666: Red 17:12, Green 11:6, Blue 5:0. |
MLMediaCodecColorFormat_18BitARGB1665 | 9 | 18BitARGB1665: Alpha 17, Red 16:11, Green 10:5, Blue 4:0. |
MLMediaCodecColorFormat_19BitARGB1666 | 10 | 19BitARGB1666: Alpha 18, Red 17:12, Green 11:6, Blue 5:0. |
MLMediaCodecColorFormat_24BitRGB888 | 11 | 24BitRGB888: Red 24:16, Green 15:8, Blue 7:0. |
MLMediaCodecColorFormat_24BitBGR888 | 12 | 24BitBGR888: Blue 24:16, Green 15:8, Red 7:0. |
MLMediaCodecColorFormat_24BitARGB1887 | 13 | 24BitARGB1887: Alpha 23, Red 22:15, Green 14:7, Blue 6:0. |
MLMediaCodecColorFormat_25BitARGB1888 | 14 | 25BitARGB1888: Alpha 24, Red 23:16, Green 15:8, Blue 7:0. |
MLMediaCodecColorFormat_32BitBGRA8888 | 15 | 32BitBGRA8888: Blue 31:24, Green 23:16, Red 15:8, Alpha 7:0. |
MLMediaCodecColorFormat_32BitARGB8888 | 16 | 32BitARGB8888: Alpha 31:24, Red 23:16, Green 15:8, Blue 7:0. |
MLMediaCodecColorFormat_YUV411Planar | 17 | YUV411Planar: U,Y are subsampled by a factor of 4 horizontally. |
MLMediaCodecColorFormat_YUV411PackedPlanar | 18 | YUV411PackedPlanar: packed per payload in planar slices. |
MLMediaCodecColorFormat_YUV420Planar | 19 | YUV420Planar: Three arrays Y,U,V. |
MLMediaCodecColorFormat_YUV420PackedPlanar | 20 | YUV420PackedPlanar: packed per payload in planar slices. |
MLMediaCodecColorFormat_YUV420SemiPlanar | 21 | YUV420SemiPlanar: Two arrays, one is all Y, the other is U and V. |
MLMediaCodecColorFormat_YUV422Planar | 22 | YUV422Planar: Three arrays Y,U,V. |
MLMediaCodecColorFormat_YUV422PackedPlanar | 23 | YUV422PackedPlanar: packed per payload in planar slices. |
MLMediaCodecColorFormat_YUV422SemiPlanar | 24 | YUV422SemiPlanar: Two arrays, one is all Y, the other is U and V. |
MLMediaCodecColorFormat_YCbYCr | 25 | YCbYCr: Organized as 16Bit YUYV (i.e. YCbYCr). |
MLMediaCodecColorFormat_YCrYCb | 26 | YCrYCb: Organized as 16Bit YVYU (i.e. YCrYCb). |
MLMediaCodecColorFormat_CbYCrY | 27 | CbYCrY: Organized as 16Bit UYVY (i.e. CbYCrY). |
MLMediaCodecColorFormat_CrYCbY | 28 | CrYCbY: Organized as 16Bit VYUY (i.e. CrYCbY). |
MLMediaCodecColorFormat_YUV444Interleaved | 29 | YUV444Interleaved: Each pixel contains equal parts YUV. |
MLMediaCodecColorFormat_RawBayer8Bit | 30 | RawBayer8Bit: SMIA camera output format. |
MLMediaCodecColorFormat_RawBayer10Bit | 31 | RawBayer10Bit: SMIA camera output format. |
MLMediaCodecColorFormat_RawBayer8Bitcompressed | 32 | RawBayer8Bitcompressed: SMIA camera output format. |
MLMediaCodecColorFormat_L2 | 33 | Deprecated. Use MLMediaCodecColorFormat_L8. |
MLMediaCodecColorFormat_L4 | 34 | Deprecated. Use MLMediaCodecColorFormat_L8. |
MLMediaCodecColorFormat_L8 | 35 | 8 Bits per pixel Y color format. |
MLMediaCodecColorFormat_L16 | 36 | 16 Bits per pixel, little-endian Y color format. |
MLMediaCodecColorFormat_L24 | 37 | Deprecated. Use MLMediaCodecColorFormat_L16. |
MLMediaCodecColorFormat_L32 | 38 | Deprecated. Use MLMediaCodecColorFormat_L16. |
MLMediaCodecColorFormat_YUV420PackedSemiPlanar | YUV420PackedSemiPlanar. | |
MLMediaCodecColorFormat_YUV422PackedSemiPlanar | YUV422PackedSemiPlanar. | |
MLMediaCodecColorFormat_18BitBGR666 | 18BitBGR666. | |
MLMediaCodecColorFormat_24BitARGB6666 | 24BitARGB6666. | |
MLMediaCodecColorFormat_24BitABGR6666 | 24BitABGR6666. | |
MLMediaCodecColorFormat_KhronosExtensions | 0x6F000000 | Reserved region for introducing Khronos Standard Extensions. |
MLMediaCodecColorFormat_VendorStartUnused | 0x7F000000 | Reserved region for introducing Vendor Extensions. |
MLMediaCodecColorFormat_AndroidOpaque | 0x7F000789 | Reserved android opaque color format. Tells the encoder that the actual color format will be relayed by the Graphics memory allocator Buffers. |
MLMediaCodecColorFormat_32BitRGBA8888 | 0x7F00A000 | 32BitRGBA8888. |
MLMediaCodecColorFormat_YUV420Flexible | 0x7F420888 | Flexible 8-bit YUV format. Codec should report this format as being supported if it supports any YUV420 packed planar or semiplanar formats. When port is set to use this format, codec can substitute any YUV420 packed planar or semiplanar format for it. |
MLMediaCodecColorFormat_YUV420Planar16 | 0x7F42016B | 10-bit or 12-bit YUV format, LSB-justified (0's on higher bits). |
MLMediaCodecColorFormat_YUV444Y410 | 0x7F444AAA | Packed 10-bit YUV444 representation that includes 2 bits of alpha. Each pixel is 32-bit. Bits 0-9 contain the U sample, bits 10-19 contain the Y sample, bits 20-29 contain the V sample, and bits 30-31 contain the alpha value. |
MLMediaCodecColorFormat_TIYUV420PackedSemiPlanar | 0x7F000100 | TI's YUV420PackedSemiPlanar. |
MLMediaCodecColorFormat_QCOMYVU420SemiPlanar | 0x7FA30C00 | QCOM's YVU420SemiPlanar. |
MLMediaCodecColorFormat_QCOMYUV420PackedSemiPlanar64x32Tile2m8ka | 0x7FA30C03 | QCOM's YUV420PackedSemiPlanar64x32Tile2m8ka. |
MLMediaCodecColorFormat_QCOMYUV420PackedSemiPlanar32m | 0x7FA30C04 | QCOM's YUV420PackedSemiPlanar32m. |
MLMediaCodecColorFormat_SECNV12Tiled | 0x7FC00002 | SEC's NV12Tiled. |
MLMediaCodecColorFormat_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 Bits. |
Enumeration defining possible uncompressed image/video formats.
API Level:
- 9
MLMediaCodecPriority
Enumerator | Value | Description |
---|---|---|
MLMediaCodecPriority_RealTime | 0 | Realtime priority. The codec shall support the given performance configuration (e.g. framerate) at realtime. This should only be used by media playback, capture, and possibly by realtime communication scenarios if best effort performance is not suitable. |
MLMediaCodecPriority_NonRealTime | 1 | Non-realtime priority (best effort). |
MLMediaCodecPriority_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 Bits. |
Enumeration defining the Codec priority.
API Level:
- 9
MLMediaCodecIntraRefreshMode
Enumerator | Value | Description |
---|---|---|
MLMediaCodecIntraRefreshMode_Cyclic | 0 | Cyclic. |
MLMediaCodecIntraRefreshMode_Adaptive | 1 | Adaptive. |
MLMediaCodecIntraRefreshMode_Both | 2 | Both. |
MLMediaCodecIntraRefreshMode_Ensure32Bits | 0x7FFFFFFF |
Enumeration of possible methods to use for Intra Refresh.
API Level:
- 9
MLMediaCodecBitrateMode
Enumerator | Value | Description |
---|---|---|
MLMediaCodecBitrateMode_CQ | 0 | Constant quality mode. |
MLMediaCodecBitrateMode_VBR | 1 | Variable bitrate mode. |
MLMediaCodecBitrateMode_CBR | 2 | Constant bitrate mode. |
MLMediaCodecBitrateMode_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 Bits. |
Enumeration defining Codec Bitrate modes.
API Level:
- 9
MLMediaCodecProfileType
Enumerator | Value | Description |
---|---|---|
MLMediaCodecProfileType_H263Baseline | 0x01 | H263 Baseline Profile: H.263 (V1), no optional modes. |
MLMediaCodecProfileType_H263H320Coding | 0x02 | H263 H.320 Coding Efficiency Backward Compatibility Profile: H.263+ (V2), includes annexes I, J, L.4 and T. |
MLMediaCodecProfileType_H263BackwardCompatible | 0x04 | H263 Backward Compatibility Profile: H.263 (V1), includes annex F. |
MLMediaCodecProfileType_H263ISWV2 | 0x08 | H263 Interactive Streaming Wireless Profile: H.263+ (V2), includes annexes I, J, K and T. |
MLMediaCodecProfileType_H263ISWV3 | 0x10 | H263 Interactive Streaming Wireless Profile: H.263++ (V3), includes profile 3 and annexes V and W.6.3.8. |
MLMediaCodecProfileType_H263HighCompression | 0x20 | H263 Conversational High Compression Profile: H.263++ (V3), includes profiles 1 & 2 and annexes D and U. |
MLMediaCodecProfileType_H263Internet | 0x40 | H263 Conversational Internet Profile: H.263++ (V3), includes profile 5 and annex K. |
MLMediaCodecProfileType_H263Interlace | 0x80 | H263 Conversational Interlace Profile: H.263++ (V3), includes profile 5 and annex W.6.3.11. |
MLMediaCodecProfileType_H263HighLatency | 0x100 | H263 High Latency Profile: H.263++ (V3), includes profile 6 and annexes O.1 and P.5. |
MLMediaCodecProfileType_MPEG2Simple | 0 | MPEG-2 Simple Profile. |
MLMediaCodecProfileType_MPEG2Main | 1 | MPEG-2 Main Profile. |
MLMediaCodecProfileType_MPEG2422 | 2 | MPEG-2 4:2:2 Profile. |
MLMediaCodecProfileType_MPEG2SNR | 3 | MPEG-2 SNR Profile. |
MLMediaCodecProfileType_MPEG2Spatial | 4 | MPEG-2 Spatial Profile. |
MLMediaCodecProfileType_MPEG2High | 5 | MPEG-2 High Profile. |
MLMediaCodecProfileType_MPEG4Simple | 0x01 | MPEG-4 Simple Profile, Levels 1-3. |
MLMediaCodecProfileType_MPEG4SimpleScalable | 0x02 | MPEG-4 Simple Scalable Profile, Levels 1-2. |
MLMediaCodecProfileType_MPEG4Core | 0x04 | MPEG-4 Core Profile, Levels 1-2. |
MLMediaCodecProfileType_MPEG4Main | 0x08 | MPEG-4 Main Profile, Levels 2-4. |
MLMediaCodecProfileType_MPEG4Nbit | 0x10 | MPEG-4 N-bit Profile, Level 2. |
MLMediaCodecProfileType_MPEG4ScalableTexture | 0x20 | MPEG-4 Scalable Texture Profile, Level 1. |
MLMediaCodecProfileType_MPEG4SimpleFace | 0x40 | MPEG-4 Simple Face Animation Profile, Levels 1-2. |
MLMediaCodecProfileType_MPEG4SimpleFBA | 0x80 | MPEG-4 Simple Face and Body Animation (FBA) Profile, Levels 1-2. |
MLMediaCodecProfileType_MPEG4BasicAnimated | 0x100 | MPEG-4 Basic Animated Texture Profile, Levels 1-2. |
MLMediaCodecProfileType_MPEG4Hybrid | 0x200 | MPEG-4 Hybrid Profile, Levels 1-2. |
MLMediaCodecProfileType_MPEG4AdvancedRealTime | 0x400 | MPEG-4 Advanced Real Time Simple Profiles, Levels 1-4. |
MLMediaCodecProfileType_MPEG4CoreScalable | 0x800 | MPEG-4 Core Scalable Profile, Levels 1-3. |
MLMediaCodecProfileType_MPEG4AdvancedCoding | 0x1000 | MPEG-4 Advanced Coding Efficiency Profile, Levels 1-4. |
MLMediaCodecProfileType_MPEG4AdvancedCore | 0x2000 | MPEG-4 Advanced Core Profile, Levels 1-2. |
MLMediaCodecProfileType_MPEG4AdvancedScalable | 0x4000 | MPEG-4 Advanced Scalable Texture, Levels 2-3. |
MLMediaCodecProfileType_MPEG4AdvancedSimple | 0x8000 | MPEG-4 Advanced Simple. |
MLMediaCodecProfileType_AVCBaseline | 0x01 | AVC Baseline profile. |
MLMediaCodecProfileType_AVCMain | 0x02 | AVC Main profile. |
MLMediaCodecProfileType_AVCExtended | 0x04 | AVC Extended profile. |
MLMediaCodecProfileType_AVCHigh | 0x08 | AVC High profile. |
MLMediaCodecProfileType_AVCHigh10 | 0x10 | AVC High 10 profile. |
MLMediaCodecProfileType_AVCHigh422 | 0x20 | AVC High 4:2:2 profile. |
MLMediaCodecProfileType_AVCHigh444 | 0x40 | AVC High 4:4:4 profile. |
MLMediaCodecProfileType_VP8Main | 0x01 | VP8 Main profile. |
MLMediaCodecProfileType_VP90 | 0x01 | VP9 Profile 0 4:2:0 8-bit. |
MLMediaCodecProfileType_VP91 | 0x02 | VP9 Profile 1 4:2:2 8-bit. |
MLMediaCodecProfileType_VP92 | 0x04 | VP9 Profile 2 4:2:0 10-bit. |
MLMediaCodecProfileType_VP93 | 0x08 | VP9 Profile 3 4:2:2 10-bit. |
MLMediaCodecProfileType_VP92HDR | 0x1000 | VP9 Profile 2 4:2:0 10-bit HDR. |
MLMediaCodecProfileType_VP93HDR | 0x2000 | VP9 Profile 3 4:2:2 10-bit HDR. |
MLMediaCodecProfileType_VP92HDR10Plus | 0x4000 | VP9 Profile 2 4:2:0 10-bit HDR10Plus. |
MLMediaCodecProfileType_VP93HDR10Plus | 0x8000 | VP9 Profile 3 4:2:2 10-bit HDR10Plus. |
MLMediaCodecProfileType_HEVCMain | 0x01 | HEVC Main profile. |
MLMediaCodecProfileType_HEVCMain10 | 0x02 | HEVC Main 1.0 profile. |
MLMediaCodecProfileType_HEVCMainStill | 0x04 | HEVC Main Still profile. |
MLMediaCodecProfileType_HEVCMain10HDR10 | 0x1000 | HEVC Main HDR profile. |
MLMediaCodecProfileType_HEVCMain10HDR10Plus | 0x2000 | HEVC Main HDR+ profile. |
MLMediaCodecProfileType_AACObjectNull | 0 | AAC Null, not used. |
MLMediaCodecProfileType_AACObjectMain | 1 | AAC Main object. |
MLMediaCodecProfileType_AACObjectLC | 2 | AAC Low Complexity object (AAC profile). |
MLMediaCodecProfileType_AACObjectSS | 3 | AAC Scalable Sample Rate object. |
MLMediaCodecProfileType_AACObjectLTP | 4 | AAC Long Term Prediction object. |
MLMediaCodecProfileType_AACObjectHE | 5 | AAC High Efficiency (object type SBR, HE-AAC profile). |
MLMediaCodecProfileType_AACObjectScalable | 6 | AAC Scalable object. |
MLMediaCodecProfileType_AACObjectERLC | 17 | ER AAC Low Complexity object (Error Resilient AAC-LC). |
MLMediaCodecProfileType_AACObjectLD | 23 | AAC Low Delay object (Error Resilient). |
MLMediaCodecProfileType_AACObjectHE_PS | 29 | AAC High Efficiency with Parametric Stereo coding (HE-AAC v2, object type PS). |
MLMediaCodecProfileType_WMAProfileUnused | 0 | WMA profile unused or unknown . |
MLMediaCodecProfileType_WMAProfileL1 | 1 | WMA version 9 profile L1. |
MLMediaCodecProfileType_WMAProfileL2 | 2 | WMA version 9 profile L2. |
MLMediaCodecProfileType_WMAProfileL3 | 3 | WMA version 9 profile L3. |
MLMediaCodecProfileType_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 Bits. |
Enumeration defining Codec profile types.
This is a consolidated list for all the codecs that support profiles. Each profile indicates support for various performance bounds and different annexes.
A codec may not support all the profiles and levels listed below. For any given codec, the supported profiles and levels can be queried using MLMediaCodecListGetSupportedProfileLevels.
API Level:
- 9
MLMediaCodecLevelType
Enumerator | Value | Description |
---|---|---|
MLMediaCodecLevelType_H263Level10 | 0x01 | H263 Level 1.0. |
MLMediaCodecLevelType_H263Level20 | 0x02 | H263 Level 2.0. |
MLMediaCodecLevelType_H263Level30 | 0x04 | H263 Level 3.0. |
MLMediaCodecLevelType_H263Level40 | 0x08 | H263 Level 4.0. |
MLMediaCodecLevelType_H263Level45 | 0x10 | H263 Level 4.5. |
MLMediaCodecLevelType_H263Level50 | 0x20 | H263 Level 5.0. |
MLMediaCodecLevelType_H263Level60 | 0x40 | H263 Level 6.0. |
MLMediaCodecLevelType_H263Level70 | 0x80 | H263 Level 7.0. |
MLMediaCodecLevelType_MPEG2LevelLL | 0 | MPEG-2 Low Level. |
MLMediaCodecLevelType_MPEG2LevelML | 1 | MPEG-2 Main Level. |
MLMediaCodecLevelType_MPEG2LevelH14 | 2 | MPEG-2 High 1440. |
MLMediaCodecLevelType_MPEG2LevelHL | 3 | MPEG-2 High Level. |
MLMediaCodecLevelType_MPEG4Level0 | 0x01 | MPEG-4 Level 0. |
MLMediaCodecLevelType_MPEG4Level0b | 0x02 | MPEG-4 Level 0b. |
MLMediaCodecLevelType_MPEG4Level1 | 0x04 | MPEG-4 Level 1. |
MLMediaCodecLevelType_MPEG4Level2 | 0x08 | MPEG-4 Level 2. |
MLMediaCodecLevelType_MPEG4Level3 | 0x10 | MPEG-4 Level 3. |
MLMediaCodecLevelType_MPEG4Level4 | 0x20 | MPEG-4 Level 4. |
MLMediaCodecLevelType_MPEG4Level4a | 0x40 | MPEG-4 Level 4a. |
MLMediaCodecLevelType_MPEG4Level5 | 0x80 | MPEG-4 Level 5. |
MLMediaCodecLevelType_AVCLevel1 | 0x01 | AVC Level 1. |
MLMediaCodecLevelType_AVCLevel1b | 0x02 | AVC Level 1.b. |
MLMediaCodecLevelType_AVCLevel11 | 0x04 | AVC Level 1.1. |
MLMediaCodecLevelType_AVCLevel12 | 0x08 | AVC Level 1.2. |
MLMediaCodecLevelType_AVCLevel13 | 0x10 | AVC Level 1.3. |
MLMediaCodecLevelType_AVCLevel2 | 0x20 | AVC Level 2. |
MLMediaCodecLevelType_AVCLevel21 | 0x40 | AVC Level 2.1. |
MLMediaCodecLevelType_AVCLevel22 | 0x80 | AVC Level 2.2. |
MLMediaCodecLevelType_AVCLevel3 | 0x100 | AVC Level 3. |
MLMediaCodecLevelType_AVCLevel31 | 0x200 | AVC Level 3.1. |
MLMediaCodecLevelType_AVCLevel32 | 0x400 | AVC Level 3.2. |
MLMediaCodecLevelType_AVCLevel4 | 0x800 | AVC Level 4. |
MLMediaCodecLevelType_AVCLevel41 | 0x1000 | AVC Level 4.1. |
MLMediaCodecLevelType_AVCLevel42 | 0x2000 | AVC Level 4.2. |
MLMediaCodecLevelType_AVCLevel5 | 0x4000 | AVC Level 5. |
MLMediaCodecLevelType_AVCLevel51 | 0x8000 | AVC Level 5.1. |
MLMediaCodecLevelType_VP8LevelVersion0 | 0x01 | VP8 Level version 0. |
MLMediaCodecLevelType_VP8LevelVersion1 | 0x02 | VP8 Level version 1. |
MLMediaCodecLevelType_VP8LevelVersion2 | 0x04 | VP8 Level version 2. |
MLMediaCodecLevelType_VP8LevelVersion3 | 0x08 | VP8 Level version 3. |
MLMediaCodecLevelType_VP9Level1 | 0x1 | VP9 Level 5.1. |
MLMediaCodecLevelType_VP9Level11 | 0x2 | VP9 Level 1.1. |
MLMediaCodecLevelType_VP9Level2 | 0x4 | VP9 Level 2. |
MLMediaCodecLevelType_VP9Level21 | 0x8 | VP9 Level 2.1. |
MLMediaCodecLevelType_VP9Level3 | 0x10 | VP9 Level 3. |
MLMediaCodecLevelType_VP9Level31 | 0x20 | VP9 Level 3.1. |
MLMediaCodecLevelType_VP9Level4 | 0x40 | VP9 Level 4. |
MLMediaCodecLevelType_VP9Level41 | 0x80 | VP9 Level 4.1. |
MLMediaCodecLevelType_VP9Level5 | 0x100 | VP9 Level 5. |
MLMediaCodecLevelType_VP9Level51 | 0x200 | VP9 Level 5.1. |
MLMediaCodecLevelType_VP9Level52 | 0x400 | VP9 Level 5.2. |
MLMediaCodecLevelType_VP9Level6 | 0x800 | VP9 Level 6. |
MLMediaCodecLevelType_VP9Level61 | 0x1000 | VP9 Level 6.1. |
MLMediaCodecLevelType_VP9Level62 | 0x2000 | VP9 Level 6.2. |
MLMediaCodecLevelType_HEVCMainTierLevel1 | 0x1 | HEVC Main Level 1. |
MLMediaCodecLevelType_HEVCHighTierLevel1 | 0x2 | HEVC High Level 1. |
MLMediaCodecLevelType_HEVCMainTierLevel2 | 0x4 | HEVC Main Level 2. |
MLMediaCodecLevelType_HEVCHighTierLevel2 | 0x8 | HEVC High Level 2. |
MLMediaCodecLevelType_HEVCMainTierLevel21 | 0x10 | HEVC Main Level 2.1. |
MLMediaCodecLevelType_HEVCHighTierLevel21 | 0x20 | HEVC High Level 2.1. |
MLMediaCodecLevelType_HEVCMainTierLevel3 | 0x40 | HEVC Main Level 3. |
MLMediaCodecLevelType_HEVCHighTierLevel3 | 0x80 | HEVC High Level 3. |
MLMediaCodecLevelType_HEVCMainTierLevel31 | 0x100 | HEVC Main Level 3.1. |
MLMediaCodecLevelType_HEVCHighTierLevel31 | 0x200 | HEVC High Level 3.1. |
MLMediaCodecLevelType_HEVCMainTierLevel4 | 0x400 | HEVC Main Level 4. |
MLMediaCodecLevelType_HEVCHighTierLevel4 | 0x800 | HEVC High Level 4. |
MLMediaCodecLevelType_HEVCMainTierLevel41 | 0x1000 | HEVC Main Level 4.1. |
MLMediaCodecLevelType_HEVCHighTierLevel41 | 0x2000 | HEVC High Level 4.1. |
MLMediaCodecLevelType_HEVCMainTierLevel5 | 0x4000 | HEVC Main Level 5. |
MLMediaCodecLevelType_HEVCHighTierLevel5 | 0x8000 | HEVC High Level 5. |
MLMediaCodecLevelType_HEVCMainTierLevel51 | 0x10000 | HEVC Main Level 5.1. |
MLMediaCodecLevelType_HEVCHighTierLevel51 | 0x20000 | HEVC High Level 5.1. |
MLMediaCodecLevelType_HEVCMainTierLevel52 | 0x40000 | HEVC Main Level 5.2. |
MLMediaCodecLevelType_HEVCHighTierLevel52 | 0x80000 | HEVC High Level 5.2. |
MLMediaCodecLevelType_HEVCMainTierLevel6 | 0x100000 | HEVC Main Level 6. |
MLMediaCodecLevelType_HEVCHighTierLevel6 | 0x200000 | HEVC High Level 6. |
MLMediaCodecLevelType_HEVCMainTierLevel61 | 0x400000 | HEVC Main Level 6.1. |
MLMediaCodecLevelType_HEVCHighTierLevel61 | 0x800000 | HEVC High Level 6.1. |
MLMediaCodecLevelType_HEVCMainTierLevel62 | 0x1000000 | HEVC Main Level 6.2. |
MLMediaCodecLevelType_HEVCHighTierLevel62 | 0x2000000 | HEVC High Level 6.2. |
MLMediaCodecLevelType_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 Bits. |
Enumeration defining Codec Level types.
This is a consolidated list for all the codecs that support profiles. Each level indicates support for various frame sizes, bit rates, decoder frame rates.
A codec may not support all the profiles and levels listed below. For any given codec, the supported profiles and levels can be queried using MLMediaCodecListGetSupportedProfileLevels.
API Level:
- 9
MLMediaSeekMode
Enumerator | Value | Description |
---|---|---|
MLMediaSeekMode_Previous_Sync | Seek to the previous key frame. | |
MLMediaSeekMode_Next_Sync | Seek to the next key frame. | |
MLMediaSeekMode_Closest_Sync | Seek to the closest key frame. | |
MLMediaSeekMode_Closest | Seek to the closest frame, more accurate but slower. | |
MLMediaSeekMode_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 bits. |
Mode indicating where exactly to seek to.
MLMediaDRMKeyType
Enumerator | Value | Description |
---|---|---|
MLMediaDRMKeyType_Streaming | 1 | This key request type specifies that the keys will be for online use, they will not be saved to the device for subsequent use when the device is not connected to a network. |
MLMediaDRMKeyType_Offline | 2 | This key request type specifies that the keys will be for offline use, they will be saved to the device for use when the device is not connected to a network. |
MLMediaDRMKeyType_Release | 3 | This key request type specifies that previously saved offline keys should be released. |
MLMediaDRMKeyType_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 bits. |
Request types.
MLMediaDRMEventType
Enumerator | Value | Description |
---|---|---|
MLMediaDRMEventType_ProvisionRequired | 1 | This event type indicates that the app needs to request a certificate from the provisioning server. The request message data is obtained using MLMediaDRMGetProvisionRequest(). |
MLMediaDRMEventType_KeyRequired | 2 | This event type indicates that the app needs to request keys from a license server. The request message data is obtained using MLMediaDRMGetKeyRequest(). |
MLMediaDRMEventType_KeyExpired | 3 | This event type indicates that the licensed usage duration for keys in a session has expired. The keys are no longer valid. |
MLMediaDRMEventType_VendorDefined | 4 | This event may indicate some specific vendor-defined condition, see your DRM provider documentation for details. |
MLMediaDRMEventType_SessionReclaimed | 5 | This event indicates that a session opened by the app has been reclaimed by the resource manager. |
MLMediaDRMEventType_ExpirationUpdate | 6 | This event is issued when a session expiration update occurs, to inform the app about the change in expiration time. If MLMediaDRMEventCallbacks is setup with a valid on_expiration_update callback, then this event is not notified. |
MLMediaDRMEventType_KeysChange | 7 | This event is issued when the keys in a session change status, such as when the license is renewed or expires. If MLMediaDRMEventCallbacks is setup with a valid on_key_status_change callback, then this event is not notified. |
MLMediaDRMEventType_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 bits. |
Request event types.
API Level:
- 7
MLMediaDRMKeyStatusCode
Enumerator | Value | Description |
---|---|---|
MLMediaDRMKeyStatusCode_KeyStatusUsable | 0 | The key is currently usable to decrypt media data. |
MLMediaDRMKeyStatusCode_KeyStatusExpired | 1 | The key is no longer usable to decrypt media data because its expiration time has passed. |
MLMediaDRMKeyStatusCode_KeyStatusOutputNotAllowed | 2 | The key is not currently usable to decrypt media data because its output requirements cannot currently be met. |
MLMediaDRMKeyStatusCode_KeyStatusPending | 3 | The status of the key is not yet known and is being determined. The status will be updated with the actual status when it has been determined. |
MLMediaDRMKeyStatusCode_KeyStatusInternalError | 4 | The key is not currently usable to decrypt media data because of an internal error in processing unrelated to input parameters. This error is not actionable by an app. |
MLMediaDRMKeyStatusCode_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 bits. |
Status code associated with a DRM session key.
API Level:
- 20
MLMediaExtractorSampleFlag
Enumerator | Value | Description |
---|---|---|
MLMediaExtractorSampleFlag_Sync | 1 | |
MLMediaExtractorSampleFlag_Encrypted | 2 | |
MLMediaExtractorSampleFlag_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 bits. |
Sample flag output from MLMediaExtractorGetSampleFlags.
MLMediaExtractorSeekPosition
Enumerator | Value | Description |
---|---|---|
MLMediaExtractorSeekPosition_Previous_Sync | ||
MLMediaExtractorSeekPosition_Next_Sync | ||
MLMediaExtractorSeekPosition_Closest_Sync | ||
MLMediaExtractorSeekPosition_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 bits. |
Seek mode used by MLMediaExtractorSeekTo.
MLMediaFormatAudioEncoding
Enumerator | Value | Description |
---|---|---|
MLMediaFormatAudioEncoding_PCM16Bits | 2 | Audio data format: PCM 16 bits per sample. |
MLMediaFormatAudioEncoding_PCM8Bits | 3 | Audio data format: PCM 8 bits per sample. |
MLMediaFormatAudioEncoding_PCMFloat | 4 | Audio data format: single-precision floating-point per sample. |
MLMediaFormatAudioEncoding_PCM32Bits | 201 | Audio data format: PCM 32 bits per sample. |
MLMediaFormatAudioEncoding_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 bits. |
MLMediaPlayerVideoScalingMode
Enumerator | Value | Description |
---|---|---|
MLMediaPlayerVideoScalingMode_ScaleToFit | 1 | |
MLMediaPlayerVideoScalingMode_ScaleToFitWithCropping | 2 | |
MLMediaPlayerVideoScalingMode_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 bits. |
Codes for setting video scaling mode.
MLMediaPlayerPollingStateFlags
Enumerator | Value | Description |
---|---|---|
MLMediaPlayerPollingStateFlag_IsPlaying | 1 << 0 | Playing. |
MLMediaPlayerPollingStateFlag_IsLooping | 1 << 1 | Looping. |
MLMediaPlayerPollingStateFlag_HasBeenPrepared | 1 << 2 | Prepared. |
MLMediaPlayerPollingStateFlag_HasPlaybackCompleted | 1 << 3 | Playback completed. |
MLMediaPlayerPollingStateFlag_HasSeekCompleted | 1 << 4 | Seek completed. |
MLMediaPlayerPollingStateFlag_HasSizeChanged | 1 << 5 | Size changed. |
MLMediaPlayerPollingStateFlag_HasBufferingUpdated | 1 << 6 | Buffering updated. |
MLMediaPlayerPollingStateFlag_HasReceivedInfo | 1 << 7 | Received info. |
MLMediaPlayerPollingStateFlag_HasReceivedError | 1 << 8 | Received error. |
MLMediaPlayerPollingStateFlag_HasTimedTextUpdated | 1 << 9 | Timed text updated. |
MLMediaPlayerPollingStateFlag_HasSubtitleUpdated | 1 << 10 | Subtitle updated. |
MLMediaPlayerPollingStateFlag_HasMetadataUpdated | 1 << 11 | Metadata updated. |
MLMediaPlayerPollingStateFlag_HasDrmInfoUpdated | 1 << 12 | DRM info updated. |
MLMediaPlayerPollingStateFlag_HasResetCompleted | 1 << 13 | Async Reset completed. |
MLMediaPlayerPollingStateFlag_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 bits. |
The state to be polled.
MLMediaPlayerInfo
Enumerator | Value | Description |
---|---|---|
MLMediaPlayerInfo_Unknown | 1 | Unknown. |
MLMediaPlayerInfo_StartedAsNext | 2 | The player was started because it was used as the next player. |
MLMediaPlayerInfo_RenderingStart | 3 | The player just pushed the very first video frame for rendering. |
MLMediaPlayerInfo_Looping | 4 | The player just reached EOS and started from beginning (loop). |
MLMediaPlayerInfo_Started | 5 | The player acknowledgement that it has started playing. |
MLMediaPlayerInfo_Paused | 6 | The player acknowledgement that it has paused. |
MLMediaPlayerInfo_Stopped | 7 | The player acknowledgement that it has stopped playing. |
MLMediaPlayerInfo_StartedBySharedPlayer | 8 | The player acknowledgement that it has started playing as result of shared player's request. |
MLMediaPlayerInfo_PausedBySharedPlayer | 9 | The player acknowledgement that it has paused playing as result of shared player's request. |
MLMediaPlayerInfo_SeekBySharedPlayer | 10 | The player acknowledgement that it is seeking as result of shared player's request. |
MLMediaPlayerInfo_StoppedBySharedPlayer | 11 | The player acknowledgement that it has stopped playing as result of shared player's request. |
MLMediaPlayerInfo_SyncStart | 12 | The player has started sync'ing with other shared players. |
MLMediaPlayerInfo_SyncComplete | 13 | The player has completed sync'ing with other shared players. |
MLMediaPlayerInfo_VideoTrackLagging | 700 | The video is too complex for the decoder, it can't decode frames fast enough. |
MLMediaPlayerInfo_BufferingStart | 701 | Media player is temporarily pausing playback. |
MLMediaPlayerInfo_BufferingEnd | 702 | Media player is resuming playback after filling buffers. |
MLMediaPlayerInfo_NetworkBandwidth | 703 | Network bandwidth info. |
MLMediaPlayerInfo_BehindLiveWindow | 704 | Dash Live stream is Behind Live Window. |
MLMediaPlayerInfo_PowerStatePause | 705 | Playback Paused because of Power State Transition. |
MLMediaPlayerInfo_PowerStateResume | 706 | Playback Resumed because of Power State Transition. |
MLMediaPlayerInfo_BufferedDuration | 707 | Duration in milliseconds of buffered content. |
MLMediaPlayerInfo_BadInterleaving | 800 | Bad interleaving means that a media has been improperly interleaved. |
MLMediaPlayerInfo_NotSeekable | 801 | The media is not seekable (e.g live stream). |
MLMediaPlayerInfo_MetadataUpdate | 802 | New media metadata is available. |
MLMediaPlayerInfo_PlayAudioError | 804 | Audio can not be played. |
MLMediaPlayerInfo_PlayVideoError | 805 | Video can not be played. |
MLMediaPlayerInfo_TimedTextError | 900 | Media timed text error. |
MLMediaPlayerInfo_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 bits. |
Info and warning codes for the media player framework.
These are non fatal, the playback is going on but there might be some user visible issues.
Info and warning messages are communicated back to the client using the on_info callback. In this situation, this method is invoked with the following:
Description of 'what' should be a value from the MLMediaPlayerInfo. Description of 'extra' contains an implementation dependent info code to provide more details. Should default to 0 when not used.
MLMediaPlayerTrackType
Enumerator | Value | Description |
---|---|---|
MLMediaPlayerTrackType_Unknown | 0 | Unknown. |
MLMediaPlayerTrackType_Video | 1 | Video. |
MLMediaPlayerTrackType_Audio | 2 | Audio. |
MLMediaPlayerTrackType_TimedText | 3 | Timed text. |
MLMediaPlayerTrackType_Subtitle | 4 | Subtitle. |
MLMediaPlayerTrackType_Metadata | 5 | Metadata. |
MLMediaPlayerTrackType_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 bits. |
MediaTrack types returned by MLMediaPlayerGetTrackType().
MLMediaPlayerBufferingMode
Enumerator | Value | Description |
---|---|---|
MLMediaPlayerBufferingMode_None | 0 | Do not support buffering. |
MLMediaPlayerBufferingMode_TimeOnly | 1 | Support only time based buffering. |
MLMediaPlayerBufferingMode_SizeOnly | 2 | Support only size based buffering. |
MLMediaPlayerBufferingMode_TimeThenSize | 3 | Support both time and size based buffering, time based calculation precedes size based. Size based calculation will be used only when time information is not available for the stream. |
MLMediaPlayerBufferingMode_Count | 4 | Number of modes. |
MLMediaPlayerBufferingMode_Ensure32Bits | 0x7FFFFFFF | Ensure enum size is 32 bits. |
Indicate the mode of buffering settings.
MLMediaFramePackingMode
Enumerator | Value | Description |
---|---|---|
MLMediaFramePackingMode_None | 0 | Not a stereoscopic video. |
MLMediaFramePackingMode_Checkboard | Checkboard. | |
MLMediaFramePackingMode_ColumnInterleaved | Column interleaved. | |
MLMediaFramePackingMode_RowInterleaved | Row interleaved. | |
MLMediaFramePackingMode_SideBySideQuincunx | Side by side quincunx. | |
MLMediaFramePackingMode_SideBySide | Side by side. | |
MLMediaFramePackingMode_TopBottom | Top bottom. | |
MLMediaFramePackingMode_MultiviewFrameByFrame | Multiview frame by frame. | |
MLMediaFramePackingMode_FrameByFrame | Frame by frame. | |
MLMediaFramePackingMode_Anaglyph | Anaglyph. |
Frame Packing Arrangement for stereoscopic videos.
API Level:
- 8
MLMediaFramePackingFlags
Enumerator | Value | Description |
---|---|---|
MLMediaFramePackingFlags_None | 0 | No flags. |
MLMediaFramePackingFlags_RightViewFirst | 1 << 0 | Right view first. |
MLMediaFramePackingFlags_LeftFlipped | 1 << 1 | Left view flipped. |
MLMediaFramePackingFlags_RightFlipped | 1 << 2 | Right view flipped. |
MLMediaFramePackingFlags_Anaglyph_RedCyan | 1 << 3 | Anaglyph red/cyan. |
MLMediaFramePackingFlags_Anaglyph_GreenMagenta | 1 << 4 | Anaglyph green/magenta. |
Frame Packing Arrangement flags for stereoscopic videos.
API Level:
- 8
MLTTMLLayoutAlignment
Enumerator | Value | Description |
---|---|---|
MLTTMLLayoutAlignment_Unspecified | 0x7FFFFFFF | An unspecified alignment value. |
MLTTMLLayoutAlignment_Normal | 0 | Normal alignment relative to text direction. |
MLTTMLLayoutAlignment_Center | 1 | Centered alignment. |
MLTTMLLayoutAlignment_Opposite | 2 | Opposite alignment relative to text direction. |
MLTTMLLayoutAlignment_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 bits. |
Cue text alignment within the cue box.
API Level:
- 20
MLTTMLLineType
Enumerator | Value | Description |
---|---|---|
MLTTMLLineType_Unset | 0x7FFFFFFF | An unset line type value. |
MLTTMLLineType_Fraction | 0 | Line position is fractional position within the viewport. |
MLTTMLLineType_Number | 1 | Line position is number of lines, interpretation also depends on the line anchor type. |
MLTTMLLineType_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 bits. |
Cue line type.
API Level:
- 20
MLTTMLAnchorType
Enumerator | Value | Description |
---|---|---|
MLTTMLAnchorType_Unset | 0x7FFFFFFF | An unset anchor type value. |
MLTTMLAnchorType_Start | 0 | Anchors the left (for horizontal positions) or top (for vertical positions) edge of the cue box. |
MLTTMLAnchorType_Middle | 1 | Anchors the middle of the cue box. |
MLTTMLAnchorType_End | 2 | Anchors the right (for horizontal positions) or bottom (for vertical positions) edge of the cue box. |
MLTTMLAnchorType_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 bits. |
Cue anchor type.
API Level:
- 20
MLTTMLTextSizeType
Enumerator | Value | Description |
---|---|---|
MLTTMLTextSizeType_Unset | 0x7FFFFFFF | An unset text size type value. |
MLTTMLTextSizeType_Fractional | 0 | Text size is measured as a fraction of the viewport size minus the view padding. |
MLTTMLTextSizeType_Fractional_Ignore_Padding | 1 | Text size is measured as a fraction of the viewport size, ignoring the view padding. |
MLTTMLTextSizeType_Absolute | 2 | Text size is measured in number of pixels. |
MLTTMLTextSizeType_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 bits. |
Cue text size type.
API Level:
- 20
MLWebVTTOrientation
Enumerator | Value | Description |
---|---|---|
MLWebVTTOrientation_Horizontal | 0 | |
MLWebVTTOrientation_Vertical | 1 | |
MLWebVTTOrientation_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 bits. |
Cue orientation setting.
API Level:
- 4
MLWebVTTDirection
Enumerator | Value | Description |
---|---|---|
MLWebVTTDirection_Default | 0 | |
MLWebVTTDirection_LeftToRight | 1 | |
MLWebVTTDirection_RightToLeft | 2 | |
MLWebVTTDirection_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 bits. |
Cue direction setting.
API Level:
- 4
MLWebVTTAlign
Enumerator | Value | Description |
---|---|---|
MLWebVTTAlign_Start | 0 | |
MLWebVTTAlign_Middle | 1 | |
MLWebVTTAlign_End | 2 | |
MLWebVTTAlign_Left | 3 | |
MLWebVTTAlign_Right | 4 | |
MLWebVTTAlign_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 bits. |
Cue aligment setting.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 4
MLNativeSurfaceAcquiredBufferCount
Enumerator | Value | Description |
---|---|---|
MLNativeSurfaceAcquiredBufferCount_Min | 1 | Min number of buffer count. |
MLNativeSurfaceAcquiredBufferCount_Max | 16 | Max number of buffer count. |
MLNativeSurfaceAcquiredBufferCount_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 bits. |
Number of acquired buffers to be requested in functions MLNativeSurfaceCreate and MLNativeSurfaceTextureCreate.
MLNativeSurfacePixelFormat
Enumerator | Value | Description |
---|---|---|
MLNativeSurfacePixelFormat_Custom | -4 | Custom format. |
MLNativeSurfacePixelFormat_Translucent | -3 | Translucent format. |
MLNativeSurfacePixelFormat_Transparent | -2 | Transparent format. |
MLNativeSurfacePixelFormat_Opaque | -1 | Opaque format. |
MLNativeSurfacePixelFormat_None | 0 | None. |
MLNativeSurfacePixelFormat_Rgba8888 | 1 | Below enums should match android_pixel_format_t in graphics-base-v1.0.h header.4x8-bit RGBA format. |
MLNativeSurfacePixelFormat_Rgbx8888 | 2 | 4x8-bit RGBX format. |
MLNativeSurfacePixelFormat_Rgb888 | 3 | 3x8-bit RGB format. |
MLNativeSurfacePixelFormat_Rgb565 | 4 | 16-bit RGB format. |
MLNativeSurfacePixelFormat_Bgra8888 | 5 | 4x8-bit BGRA format. |
MLNativeSurfacePixelFormat_RgbaFp16 | 22 | 64-bit RGBA format. |
MLNativeSurfacePixelFormat_Rgba1010102 | 43 | 32-bit RGBA format. |
MLNativeSurfacePixelFormat_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 bits. |
Pixel format to use when creating the native surface. Used in functions MLNativeSurfaceCreate and MLNativeSurfaceTextureCreate.
MLNativeSurfaceTextureBackend
Enumerator | Value | Description |
---|---|---|
MLNativeSurfaceTextureBackend_OpenGL | 0 | OpenGL texture. |
MLNativeSurfaceTextureBackend_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 bits. |
Graphic backend to use.
API Level:
- 20
Types Documentation
MLCea608CaptionStyleColor
typedef struct MLCea608CaptionStyleColor MLCea608CaptionStyleColor;
Cea608 caption style and color.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 2
MLCea608CaptionPAC
typedef struct MLCea608CaptionPAC MLCea608CaptionPAC;
Cea608 caption preamble address code.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 2
MLCea608CaptionLineEx
typedef struct MLCea608CaptionLineEx MLCea608CaptionLineEx;
Cea608 caption line structure.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 8
MLCea608CaptionSegmentEx
typedef struct MLCea608CaptionSegmentEx MLCea608CaptionSegmentEx;
Cea608 caption segment structure.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 8
MLMediaCCParserDisplayChangedCallback
typedef void(* MLMediaCCParserDisplayChangedCallback) (MLHandle cc_handle, const MLCea608CaptionSegmentEx *cc_seg, void *data);
Callback signature called when Cea608 displayable is changed.
Parameters
cc_handle | MLHandle is a CC Parser instance for which callback was called. | |
cc_seg | MLCea608CaptionSegmentEx conveys caption displayble to be rendered. | |
data | Custom data to be returned when callback is fired. |
API Level:
- 8
MLCea708CaptionColor
typedef struct MLCea708CaptionColor MLCea708CaptionColor;
Cea708 Caption Color.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 8
MLCea708CaptionPenAttr
typedef struct MLCea708CaptionPenAttr MLCea708CaptionPenAttr;
Cea708 Caption Pen Attributes.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 8
MLCea708CaptionPenColor
typedef struct MLCea708CaptionPenColor MLCea708CaptionPenColor;
Cea708 Caption Pen Color.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 8
MLCea708CaptionPenLocation
typedef struct MLCea708CaptionPenLocation MLCea708CaptionPenLocation;
Cea708 Caption Pen Location.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 8
MLCea708CaptionWindowAttr
typedef struct MLCea708CaptionWindowAttr MLCea708CaptionWindowAttr;
Cea708 Caption Window Attributes.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 8
MLCea708CaptionWindow
typedef struct MLCea708CaptionWindow MLCea708CaptionWindow;
Cea708 Caption Window.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 8
MLCea708CaptionEvent
typedef struct MLCea708CaptionEvent MLCea708CaptionEvent;
Cea708 Caption Event.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 8
MLMediaCea708ParserEmitEventCallback
typedef void(* MLMediaCea708ParserEmitEventCallback) (MLHandle cc_handle, const MLCea708CaptionEvent *event, void *data);
Callback signature called when Cea708 parser emits event.
Parameters
cc_handle | MLHandle is a Cea708 Parser instance for which callback was called. | |
event | MLCea708CaptionEvent conveys caption event to listener. | |
data | Custom data to be returned when callback is fired. |
API Level:
- 8
MLMediaCodecBufferInfo
typedef struct MLMediaCodecBufferInfo MLMediaCodecBufferInfo;
Media codec buffer info.
MLMediaCodecInputBufferInfo
typedef struct MLMediaCodecInputBufferInfo MLMediaCodecInputBufferInfo;
MediaCodec Input buffer information.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 20
MLMediaCodecOutputBufferInfo
typedef struct MLMediaCodecOutputBufferInfo MLMediaCodecOutputBufferInfo;
MediaCodec Output buffer information.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 20
MLMediaCodecOutputFormatInfo
typedef struct MLMediaCodecOutputFormatInfo MLMediaCodecOutputFormatInfo;
MediaCodec Output Format information.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 20
MLMediaCodecErrorInfo
typedef struct MLMediaCodecErrorInfo MLMediaCodecErrorInfo;
MediaCodec Output Format information.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 20
MLMediaCodecCallbacksEx
typedef struct MLMediaCodecCallbacksEx MLMediaCodecCallbacksEx;
Callbacks for notifying asynchronously of various codec events to the user/client. If user intends to use codec in asynchronous mode, then the user/client is expected to implement these callbacks and take proper actions where appropriate.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 20
MLMediaCodecFrameRenderedInfo
typedef struct MLMediaCodecFrameRenderedInfo MLMediaCodecFrameRenderedInfo;
MediaCodec Output Frame Rendered information.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 20
MLMediaCodecOutputFrameListener
typedef struct MLMediaCodecOutputFrameListener MLMediaCodecOutputFrameListener;
Callbacks for notifying when an output frame is available for consumption or has been rendered on the output surface.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 20
MLMediaCodecCryptoPattern
typedef struct MLMediaCodecCryptoPattern MLMediaCodecCryptoPattern;
Metadata describing an encryption pattern for the protected bytes in a subsample.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 20
MLMediaCodecCryptoInfo
typedef struct MLMediaCodecCryptoInfo MLMediaCodecCryptoInfo;
Metadata describing the structure of a (at least partially) encrypted input sample. A buffer's data is considered to be partitioned into "subSamples", each subSample starts with a (potentially empty) run of plain, unencrypted bytes followed by a (also potentially empty) run of encrypted bytes. If pattern encryption applies, each of the encrypted runs is encrypted only partly, according to a repeating pattern of "encrypt" and "skip" blocks. This information encapsulates per-sample metadata as outlined in ISO/IEC FDIS 23001-7:2011 "Common encryption in ISO base media file format files".
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 20
MLMediaCodecListQueryResults
typedef struct MLMediaCodecListQueryResults MLMediaCodecListQueryResults;
Used to store the list of available codec names or the list of supported mime types.
MLMediaCodecListProfileLevel
typedef struct MLMediaCodecListProfileLevel MLMediaCodecListProfileLevel;
Used to store the list of codec profile levels.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 6
MLMediaDataSourceReadAt
typedef int64_t(* MLMediaDataSourceReadAt) (MLHandle media_data_source, size_t position, size_t size, uint8_t *buffer, void *context);
Called to request data from the given position.
Parameters
media_data_source | MLHandle as returned by MLMediaDataSourceCreate(). | |
position | The position in the data source to read from. | |
size | The number of bytes to read. | |
buffer | The buffer to read the data into. | |
context | User data as passed to MLMediaDataSourceCreate(). |
Implementations should should write up to size
bytes into buffer
, and return the number of bytes written.
Return 0 to indicate that end of stream is reached. Return -1 on error.
Return: The number of bytes read, or -1 if there was an error.
MLMediaDataSourceGetSize
typedef int64_t(* MLMediaDataSourceGetSize) (MLHandle media_data_source, void *context);
Called to get the size of the data source.
Parameters
media_data_source | MLHandle as returned by MLMediaDataSourceCreate(). | |
context | User data as passed to MLMediaDataSourceCreate(). |
Return: the size of data source in bytes, or -1 if the size is unknown.
MLMediaDataSourceClose
typedef void(* MLMediaDataSourceClose) (MLHandle media_data_source, void *context);
Called before deleting |this|. The other methods may return errors if they're called after calling close().
Parameters
media_data_source | MLHandle as returned by MLMediaDataSourceCreate(). | |
context | User data as passed to MLMediaDataSourceCreate(). |
MLMediaDRMByteArray
typedef struct MLMediaDRMByteArray MLMediaDRMByteArray;
Data type containing byte array buffer and the size.
MLMediaDRMByteArrayList
typedef struct MLMediaDRMByteArrayList MLMediaDRMByteArrayList;
Data type containing list of byte array buffers and the size.
MLMediaDRMKeyValue
typedef struct MLMediaDRMKeyValue MLMediaDRMKeyValue;
Data type containing key/value pair.
MLMediaDRMKeyValueArray
typedef struct MLMediaDRMKeyValueArray MLMediaDRMKeyValueArray;
Data type containing array of key/value pair.
MLMediaDRMKeyRequestInputParam
typedef struct MLMediaDRMKeyRequestInputParam MLMediaDRMKeyRequestInputParam;
Data type that encapsulates Key Request input arguments.
MLMediaDRMRequestMessage
typedef struct MLMediaDRMRequestMessage MLMediaDRMRequestMessage;
Data type that encapsulates either of the following along with an URL:
For Key Request Message: an opaque key request byte array that should be delivered to the license server.
For Provision Request Message: an opaque provision request byte array that should be delivered to the provisioning server.
Deprecated since 1.4.0. Scheduled for removal.
MLMediaDRMCryptoInputParam
typedef struct MLMediaDRMCryptoInputParam MLMediaDRMCryptoInputParam;
Data type that encapsulates algorithm, key_set_id and IV for Encryption/Decryption.
MLMediaDRMHMACInputParam
typedef struct MLMediaDRMHMACInputParam MLMediaDRMHMACInputParam;
Data type that encapsulates algorithm, key_set_id for HMAC based Sign/Verify.
MLMediaDRMRSAInputParam
typedef struct MLMediaDRMRSAInputParam MLMediaDRMRSAInputParam;
Data type that encapsulates algorithm, wrapped_key for RSA operation.
MLMediaDRMEventInfo
typedef struct MLMediaDRMEventInfo MLMediaDRMEventInfo;
MediaDRM event info associated with a session.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 20
MLMediaDRMExpirationUpdateInfo
typedef struct MLMediaDRMExpirationUpdateInfo MLMediaDRMExpirationUpdateInfo;
MediaDRM expiration update info associated with a session.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 20
MLMediaDRMKeyStatus
typedef struct MLMediaDRMKeyStatus MLMediaDRMKeyStatus;
MediaDRM key status.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 20
MLMediaDRMKeyStatusInfo
typedef struct MLMediaDRMKeyStatusInfo MLMediaDRMKeyStatusInfo;
MediaDRM session keys status change info.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 20
MLMediaDRMEventCallbacks
typedef struct MLMediaDRMEventCallbacks MLMediaDRMEventCallbacks;
Callbacks for notifying client about MLMediaDRM events.
User of MLMediaDRM should implement this.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 20
MLMediaExtractorPSSHEntry
typedef MLPSSHEntry MLMediaExtractorPSSHEntry;
MLMediaExtractorDRMSchemeInitData
typedef struct MLMediaExtractorDRMSchemeInitData MLMediaExtractorDRMSchemeInitData;
DRM Scheme initialization data.
MLMediaFormatByteArray
typedef struct MLMediaFormatByteArray MLMediaFormatByteArray;
Data type containing byte array buffer and the size.
MLMediaPlayerPSSHEntry
typedef MLPSSHEntry MLMediaPlayerPSSHEntry;
MLMediaPlayerTrackDRMInfo
typedef struct MLMediaPlayerTrackDRMInfo MLMediaPlayerTrackDRMInfo;
MediaPlayer DRM Info for a Media Track .
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 2
MLMediaPlayerSubtitleData
typedef struct MLMediaPlayerSubtitleData MLMediaPlayerSubtitleData;
MediaPlayer subtitle data.
MLMediaPlayerBufferingSettings
typedef struct MLMediaPlayerBufferingSettings MLMediaPlayerBufferingSettings;
Indicate the buffering settings.
MLMediaPlayerOnBufferingUpdateInfo
typedef struct MLMediaPlayerOnBufferingUpdateInfo MLMediaPlayerOnBufferingUpdateInfo;
MediaPlayer Buffering update callback Info.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 2
MLMediaPlayerOnCompletionInfo
typedef struct MLMediaPlayerOnCompletionInfo MLMediaPlayerOnCompletionInfo;
MediaPlayer Playback completion callback Info.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 2
MLMediaPlayerOnErrorInfo
typedef struct MLMediaPlayerOnErrorInfo MLMediaPlayerOnErrorInfo;
MediaPlayer Error callback Info.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 2
MLMediaPlayerOnInfoInfo
typedef struct MLMediaPlayerOnInfoInfo MLMediaPlayerOnInfoInfo;
MediaPlayer Information callback Info.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 2
MLMediaPlayerOnPreparedInfo
typedef struct MLMediaPlayerOnPreparedInfo MLMediaPlayerOnPreparedInfo;
MediaPlayer Playback prepared callback Info.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 2
MLMediaPlayerOnSeekCompleteInfo
typedef struct MLMediaPlayerOnSeekCompleteInfo MLMediaPlayerOnSeekCompleteInfo;
MediaPlayer Playback seek completion callback Info.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 2
MLMediaPlayerOnVideoSizeChangedInfo
typedef struct MLMediaPlayerOnVideoSizeChangedInfo MLMediaPlayerOnVideoSizeChangedInfo;
MediaPlayer Video Size Changed callback Info.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 2
MLMediaPlayerOnTrackDRMInfo
typedef struct MLMediaPlayerOnTrackDRMInfo MLMediaPlayerOnTrackDRMInfo;
MediaPlayer Track DRM Info callback Info.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 2
MLMediaPlayerOnResetCompleteInfo
typedef struct MLMediaPlayerOnResetCompleteInfo MLMediaPlayerOnResetCompleteInfo;
MediaPlayer reset completion callback Info.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 8
MLMediaPlayerOnFramePackingInfo
typedef struct MLMediaPlayerOnFramePackingInfo MLMediaPlayerOnFramePackingInfo;
MediaPlayer frame packing callback Info.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 8
MLMediaPlayerEventCallbacksEx
typedef struct MLMediaPlayerEventCallbacksEx MLMediaPlayerEventCallbacksEx;
Callbacks for notifying client about Media Player error events.
Those are async mechanisms that should not be used in parallel with their sync counterpart, i.e. poll-based queries for the same events using MLMediaPlayerPollStatespoll().
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 8
MLMediaPlayerTrackInfo
typedef struct MLMediaPlayerTrackInfo MLMediaPlayerTrackInfo;
MediaPlayer Track Information.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 2
MLMediaPlayerTrackDRMSessionInfo
typedef struct MLMediaPlayerTrackDRMSessionInfo MLMediaPlayerTrackDRMSessionInfo;
DRM Session information for a MediaPlayer Track.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 2
MLMediaPlayerOnMediaSubtitleUpdateCallback
typedef void(* MLMediaPlayerOnMediaSubtitleUpdateCallback) (MLHandle media_player, MLMediaPlayerSubtitleData subtitle_data, void *data);
Callbacks signature called when subtitle update is available.
Parameters
data | Custom data to be returned when callback is fired. | |
media_player | MLHandle is a Media Player instance for which callback was called. | |
subtitle_data | MLMediaPlayerSubtitleData is the raw subtitle data. |
MLMediaPlayerOnMediaTimedTextUpdateCallback
typedef void(* MLMediaPlayerOnMediaTimedTextUpdateCallback) (MLHandle media_player, MLHandle timed_text, void *data);
Callbacks signature called when Timed Text update is available.
Parameters
media_player | MLHandle is a Media Player instance for which callback was called. | |
timed_text | MLHandle is the handle for timed_text data. | |
data | Custom data to be delivered when callback is invoked. |
Required Permissions:
- None
API Level:
- 4
MLMediaPlayerMetrics
typedef struct MLMediaPlayerMetrics MLMediaPlayerMetrics;
MediaPlayer metrics data.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 8
MLMediaStreamSourceOnBufferAvailable
typedef void(* MLMediaStreamSourceOnBufferAvailable) (MLHandle media_stream_source, void *context);
Called when buffers becomes available.
Parameters
media_stream_source | MLHandle as returned by MLMediaStreamSourceCreate(). | |
context | User data as passed to MLMediaStreamSourceCreate(). |
Signal that at least one buffer is now available. Application should then call getBuffer() as much as possible until it returns false, or until no more data is currently available in the application.
MLTTMLImage
typedef struct MLTTMLImage MLTTMLImage;
Byte data for TTML image cues.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 20
MLTTMLData
typedef struct MLTTMLData MLTTMLData;
TTML data structure.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 20
MLPSSHEntry
typedef struct MLPSSHEntry MLPSSHEntry;
PSSH entry.
Deprecated since 1.4.0. Scheduled for removal.
MLWebVTTData
typedef struct MLWebVTTData MLWebVTTData;
WebVTT data structure.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 4
MLNativeSurfaceFrameAvailableInfo
typedef struct MLNativeSurfaceFrameAvailableInfo MLNativeSurfaceFrameAvailableInfo;
NativeSurface/NativeSurfaceTexture Output Frame Availability information.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 20
MLNativeSurfaceConfig
typedef struct MLNativeSurfaceConfig MLNativeSurfaceConfig;
Configuration values for creating the Native Surface.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 20
MLNativeSurfaceOnFrameAvailableCallback
typedef struct MLNativeSurfaceOnFrameAvailableCallback MLNativeSurfaceOnFrameAvailableCallback;
Callbacks for notifying when an output frame is available for consumption.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 20
Functions Documentation
MLMediaCCParserCreate
MLResult MLMediaCCParserCreate(
MLHandle * out_handle
)
Create internal closed caption parser object.
Parameters
MLHandle * | out_handle | A pointer to an MLHandle which will contain the handle to the CC parser. If this operation fails, out_handle will be ML_INVALID_HANDLE. |
Returns
MLResult | MLResult_Ok | Internal closed caption parser object was created successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 2
MLMediaCCParserGetDisplayableEx
MLResult MLMediaCCParserGetDisplayableEx(
MLHandle cc_handle,
const uint8_t * subtitle_data,
int32_t subtitle_data_size,
const MLCea608CaptionSegmentEx ** out_cc_seg
)
Return closed caption for display.
Parameters
MLHandle | cc_handle | A handle to a CC parser. |
const uint8_t * | subtitle_data | Subtitle data of MLMediaPlayerSubtitleData structure returned from MLMediaPlayerGetSubtitleEx function. |
int32_t | subtitle_data_size | Subtitle data size of MLMediaPlayerSubtitleData structure returned from MLMediaPlayerGetSubtitleEx function. |
const MLCea608CaptionSegmentEx ** | out_cc_seg | The returned MLCea608CaptionSegmentEx pointer for CC display. NOTE that user doesn't own this memory. |
Returns
MLResult | MLResult_InvalidParam | one of the arguements is incorrect. |
MLResult | MLResult_Ok | CC is ready to display and content is stored in out_ccSeg. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
MLResult | MLMediaGenericResult_NoInit | CC parser was not properly built or initialized. |
MLResult | MLMediaGenericResult_NotEnoughData | more data is required and no displayable CC for now. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 8
MLMediaCCParserDestroy
MLResult MLMediaCCParserDestroy(
MLHandle cc_handle
)
Release internal CC parser object.
Parameters
MLHandle | cc_handle | A handle to a CC parser. |
Returns
MLResult | MLResult_Ok | internal CC parser object was released successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 2
MLMediaCCParserSetDisplayChangedCallback
MLResult MLMediaCCParserSetDisplayChangedCallback(
MLHandle cc_handle,
MLMediaCCParserDisplayChangedCallback on_display_changed_callback,
void * data
)
Set callback to get notified when a caption displayable has changed.
Parameters
MLHandle | cc_handle | A handle to a CC parser. |
MLMediaCCParserDisplayChangedCallback | on_display_changed_callback | Function pointer for display changed callback. See MLMediaCCParserDisplayChangedCallback() callback typedef declaration and comments for explanation on expected callback parameters. This can be 'NULL' to unset the callback. |
void * | data | Custom data to be returned when callback is fired. |
Returns
MLResult | MLResult_InvalidParam | Passed cc_handle handle was not found. |
MLResult | MLResult_Ok | Callback was successfully set. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Setting this callback saves application from handling raw subtitle data. Caption will be delivered in this callback at displayable time.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 8
MLMediaCCParserParse
MLResult MLMediaCCParserParse(
MLHandle cc_handle,
const uint8_t * subtitle_data,
uint32_t subtitle_data_size
)
Provide Cea608 parser with subtitle raw data for parsing. If the callback has been set by MLMediaCCParserSetDisplayChangedCallback, then its issued to notify the CC Data.
Parameters
MLHandle | cc_handle | A handle to a Cea608 parser. |
const uint8_t * | subtitle_data | Subtitle data of MLMediaPlayerSubtitleData. |
uint32_t | subtitle_data_size | Subtitle data size of MLMediaPlayerSubtitleData. |
Returns
MLResult | MLResult_InvalidParam | the input parameter(s) is(are) wrong. |
MLResult | MLResult_Ok | the operation was successful. |
MLResult | MLMediaGenericResult_NoInit | Cea708 parser was not properly built or initialized. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 8
MLMediaCea708ParserCreate
MLResult MLMediaCea708ParserCreate(
MLHandle * out_handle
)
Create Cea708 parser object.
Parameters
MLHandle * | out_handle | A pointer to an MLHandle which will contain the handle to the Cea708 parser. If this operation fails, out_handle will be ML_INVALID_HANDLE. |
Returns
MLResult | MLResult_AllocFailed | The operation failed with memory allocation error. |
MLResult | MLResult_InvalidParam | out_handle is null. |
MLResult | MLResult_Ok | Internal Cea708 parser object was created successfully. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 8
MLMediaCea708ParserParse
MLResult MLMediaCea708ParserParse(
MLHandle cc_handle,
const uint8_t * subtitle_data,
uint32_t subtitle_data_size
)
Provide Cea708 parser with subtitle raw data for parsing.
Parameters
MLHandle | cc_handle | A handle to a Cea708 parser. |
const uint8_t * | subtitle_data | Subtitle data of MLMediaPlayerSubtitleData. |
uint32_t | subtitle_data_size | Subtitle data size of MLMediaPlayerSubtitleData. |
Returns
MLResult | MLResult_InvalidParam | the input parameter(s) is(are) wrong. |
MLResult | MLResult_Ok | the operation was successful. |
MLResult | MLMediaGenericResult_NoInit | Cea708 parser was not properly built or initialized. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 8
MLMediaCea708ParserDestroy
MLResult MLMediaCea708ParserDestroy(
MLHandle cc_handle
)
Release Cea708 parser object.
Parameters
MLHandle | cc_handle | A handle to a Cea708 parser. |
Returns
MLResult | MLResult_InvalidParam | cc_handle is wrong or not found. |
MLResult | MLResult_Ok | internal Cea708 parser object was released successfully. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 8
MLMediaCea708ParserSetEmitEventCallback
MLResult MLMediaCea708ParserSetEmitEventCallback(
MLHandle cc_handle,
MLMediaCea708ParserEmitEventCallback on_emit_event_callback,
void * data
)
Set callback to get notified when a caption event has generated.
Parameters
MLHandle | cc_handle | A handle to a Cea708 parser. |
MLMediaCea708ParserEmitEventCallback | on_emit_event_callback | Function pointer for event callback. See MLMediaCea708ParserEmitEventCallback() callback declaration and comments for explanation on expected callback parameters. This can be 'NULL' to unset the callback. |
void * | data | Custom data to be returned when callback is fired. |
Returns
MLResult | MLResult_InvalidParam | Passed cc_handle handle was not found. |
MLResult | MLResult_Ok | Callback was successfully set. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 8
MLMediaCodecCallbacksExInit
static inline void MLMediaCodecCallbacksExInit(
MLMediaCodecCallbacksEx * inout_callbacks
)
Initializes MLMediaCodecCallbacksEx with default values.
Parameters
MLMediaCodecCallbacksEx * | inout_callbacks | MediaCodec Callback structure defined by MLMediaCodecCallbacksEx that needs to be initialized. |
Deprecated since 1.4.0. Scheduled for removal.
MLMediaCodecOutputFrameListenerInit
static inline void MLMediaCodecOutputFrameListenerInit(
MLMediaCodecOutputFrameListener * inout_callbacks
)
Initializes MLMediaCodecOutputFrameListener with default values.
Parameters
MLMediaCodecOutputFrameListener * | inout_callbacks | MediaCodec Callback structure defined by MLMediaCodecOutputFrameListener that needs to be initialized. |
Deprecated since 1.4.0. Scheduled for removal.
MLMediaCodecCryptoInfoInit
static inline void MLMediaCodecCryptoInfoInit(
MLMediaCodecCryptoInfo * inout_crypto_info
)
Initializes MLMediaCodecCryptoInfo with default values.
Parameters
MLMediaCodecCryptoInfo * | inout_crypto_info | CryptoInfo structure defined by MLMediaCodecCryptoInfo that needs to be initialized. |
Deprecated since 1.4.0. Scheduled for removal.
MLMediaCodecCreateCryptoInfo
MLResult MLMediaCodecCreateCryptoInfo(
const MLMediaCodecCryptoInfo * crypto_info,
MLHandle * out_crypto_info_handle
)
Create a Crypto Info object.
Parameters
const MLMediaCodecCryptoInfo * | crypto_info | Input Structure that encapsulates sample crypto info. |
MLHandle * | out_crypto_info_handle | Upon successful return will point to handle to the created Crypto info. Or else, it will point to ML_INVALID_HANDLE. |
Returns
MLResult | MLResult_InvalidParam | If one of parameters is invalid. |
MLResult | MLResult_Ok | If operation succeeded. |
Required Permissions:
- None
The CryptoInfo object should be released by calling MLMediaCodecReleaseCryptoInfo.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 20
MLMediaCodecReleaseCryptoInfo
MLResult MLMediaCodecReleaseCryptoInfo(
MLHandle crypto_info_handle
)
Release the Crypto Info created by MLMediaCodecCreateCryptoInfo.
Parameters
MLHandle | crypto_info_handle | Handle to Crypto info that needs to be released. |
Returns
MLResult | MLResult_InvalidParam | If one of parameters is invalid. |
MLResult | MLResult_Ok | If operation succeeded. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 20
MLMediaCodecCreateCodec
MLResult MLMediaCodecCreateCodec(
MLMediaCodecCreation method,
MLMediaCodecType type,
const char * name_str,
MLHandle * out_handle
)
Create a new MLMediaCodec.
Parameters
MLMediaCodecCreation | method | One of the creation methods defined by MLMediaCodecCreation. |
MLMediaCodecType | type | One of the codec types defined by MLMediaCodecType. |
const char * | name_str | If creating a codec by name, this is the name of the codec. If creating a codec by type, this is the mime type of the codec. Refer to APIs in MLMediaCodecList for retrieving the list of names and mime types of supported codecs. |
MLHandle * | out_handle | Upon successful return will point to handle to the created MLMediaCodec. Or else, it will point to ML_INVALID_HANDLE. |
Returns
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | MLMediaCodec object was created successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
MLMediaCodecDestroy
MLResult MLMediaCodecDestroy(
MLHandle handle
)
Destroy a MLMediaCodec.
Parameters
MLHandle | handle | MLHandle to the MLMediaCodec. |
Returns
MLResult | MLResult_InvalidParam | MLMediaCodec object is invalid. |
MLResult | MLResult_Ok | MLMediaCodec object was successfully destroyed. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
MLMediaCodecSetCallbacksEx
MLResult MLMediaCodecSetCallbacksEx(
MLHandle handle,
MLMediaCodecCallbacksEx * callbacks,
void * user_data
)
Set callbacks to notify client codec events. Client needs to implement the callback functions.
Parameters
MLHandle | handle | MLHandle to the MLMediaCodec. |
MLMediaCodecCallbacksEx * | callbacks | Set of codec callbacks. Can be set to NULL to unset all the callback altogether. |
void * | user_data | Pointer to user payload data. |
Returns
MLResult | MLResult_InvalidParam | MLMediaCodec object is invalid. |
MLResult | MLResult_Ok | callback was set successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
If the client intends to use the codec component in asynchronous mode, a valid callback should be provided before MLMediaCodecConfigure is called. When asynchronous callback is enabled, the client should not call:
- MLMediaCodecDequeueInputBuffer
- MLMediaCodecDequeueOutputBuffer Calling those functions will return MLMediaGenericResult_InvalidOperation. Also, MLMediaCodecFlush() behaves differently in asynchronous mode. After calling MLMediaCodecFlush, you must call MLMediaCodecStart() to "resume" receiving input buffers, even if an input surface was created.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 20
MLMediaCodecSetOutputFrameListener
MLResult MLMediaCodecSetOutputFrameListener(
MLHandle handle,
MLMediaCodecOutputFrameListener * callbacks,
void * user_data
)
Registers a callback to be invoked when an output frame is available or rendered on the output surface.
Parameters
MLHandle | handle | MLHandle to the MLMediaCodec. |
MLMediaCodecOutputFrameListener * | callbacks | Set of codec callbacks. Can be set to NULL to unset all the callback altogether. |
void * | user_data | Pointer to user payload data. |
Returns
MLResult | MLResult_InvalidParam | MLMediaCodec object is invalid. |
MLResult | MLResult_Ok | callback was set successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
This method can be called in any codec state, but will only have an effect in the "Executing" state for codecs that render buffers to the output surface.
Note:
- This callback is for informational purposes only: to get precise render timing samples, and can be significantly delayed and batched. Some frames may have been rendered even if there was no callback generated.
- This callback doesn't set the codec to operate in asynchrous mode.
- Since audio codec doesn't use Surface, this callback as no effect when audio codec is instantiated.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 20
MLMediaCodecGetName
MLResult MLMediaCodecGetName(
MLHandle handle,
char * out_name
)
Obtain the name of the created codec.
Parameters
MLHandle | handle | MLHandle to the MLMediaCodec. |
char * | out_name | Pointer to the user-maintained buffer for storing the output C-style name string. |
Returns
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | MLMediaCodec name was retrieved successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
User shall allocate at least MAX_CODEC_NAME_SIZE bytes of memory for storing the output name string.
Deprecated since 1.4.0. Scheduled for removal.
MLMediaCodecConfigure
MLResult MLMediaCodecConfigure(
MLHandle handle,
MLHandle format_handle,
MLHandle surface_handle,
MLHandle crypto_handle
)
Configure the MLMediaCodec.
Parameters
MLHandle | handle | MLHandle to the MLMediaCodec. |
MLHandle | format_handle | MLHandle to the #MediaFormat object. |
MLHandle | surface_handle | MLHandle to the Surface object. |
MLHandle | crypto_handle | MLHandle to the #MediaCrypto object. Pass 0 for clear content. |
Returns
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | MLMediaCodec was configured successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Encoder configuration: surface_handle and crypto_handle should be 0. Decoder Configuration: The surface_handle should be provided if using output surface. The crypto_handle should be provided for encrypted content.
The output surface can be:
- Native surface created by MLNativeSurfaceCreate().
- Native surface texture created by MLNativeSurfaceTextureCreate().
- The surface object created on an encoder using MLMediaCodecCreateInputSurface().
- Pass 0 or ML_INVALID_HANDLE if the codec does not generate raw video output (e.g. not a video decoder) and/or if you want to configure the codec with CPU bound output buffers. NOTE that:
- For the first 3 cases (above), the decoded output of the decoder will be consumed direclty by the surface. This allows implementation of fast, zero-copy raw video consumption operation. Also, calling MLMediaCodecGetOutputBufferPointer will return MLMediaGenericResult_InvalidOperation
- For the last case, user will have to explictly consume the output of the decoder by calling MLMediaCodecGetOutputBufferPointer.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 6
MLMediaCodecStart
MLResult MLMediaCodecStart(
MLHandle handle
)
Start the codec.
Parameters
MLHandle | handle | MLHandle to the MLMediaCodec. |
Returns
MLResult | MLResult_InvalidParam | MLMediaCodec object is invalid. |
MLResult | MLResult_Ok | MLMediaCodec was started successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Shall be called upon successful configuration.
Deprecated since 1.4.0. Scheduled for removal.
MLMediaCodecStop
MLResult MLMediaCodecStop(
MLHandle handle
)
Stop the codec.
Parameters
MLHandle | handle | MLHandle to the MLMediaCodec. |
Returns
MLResult | MLResult_InvalidParam | MLMediaCodec object is invalid. |
MLResult | MLResult_Ok | MLMediaCodec was stopped successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Codec is stopped and not destroyed, therefore can be started again.
Deprecated since 1.4.0. Scheduled for removal.
MLMediaCodecReset
MLResult MLMediaCodecReset(
MLHandle handle
)
Reset the codec.
Parameters
MLHandle | handle | MLHandle to the MLMediaCodec. |
Returns
MLResult | MLResult_InvalidParam | MLMediaCodec object is invalid. |
MLResult | MLResult_Ok | MLMediaCodec was stopped successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
This will reset the codec to initial (Uninitialized) state. Call this when:
- Input or output queuing operation fails.
- An error is notified through the asynchronous event MLMediaCodecCallbacks.on_error. Resetting a codec can fail when an unrecoverable error occurs (which is Hardare codec implementation specific), in which case codec will be in unusable state and should be destroyed using MLMediaCodecDestroy.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 20
MLMediaCodecFlush
MLResult MLMediaCodecFlush(
MLHandle handle
)
Flush the both the input and output ports of the codec.
Parameters
MLHandle | handle | MLHandle to the MLMediaCodec. |
Returns
MLResult | MLResult_InvalidParam | MLMediaCodec object is invalid. |
MLResult | MLResult_Ok | MLMediaCodec was flushed successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Upon return, all indices previously returned in calls to MLMediaCodecDequeueInputBuffer() and MLMediaCodecDequeueOutputBuffer() become invalid, and all buffers are owned by the codec.
Deprecated since 1.4.0. Scheduled for removal.
MLMediaCodecSetParameters
MLResult MLMediaCodecSetParameters(
MLHandle handle,
MLHandle format_handle
)
Communicate additional parameter changes to a codec.
Parameters
MLHandle | handle | MLHandle to the MLMediaCodec. |
MLHandle | format_handle | MLHandle to the MLMediaFormat containing the parameters to set. |
Returns
MLResult | MLResult_InvalidParam | At least one of the input parameters or one of the format parameter values is invalid. |
MLResult | MLResult_Ok | The operation was successful. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
MLResult | MLMediaGenericResult_InvalidOperation | At least one format parameter is not applicable. |
MLResult | MLMediaGenericResult_NoInit | MLMediaCodec was not initialized. |
Dynamically modify or add configuration parameters to a configured or started codec.
Create an empty MLMediaFormat object using MLMediaFormatCreate() and set the appropriate parameters. For more details, refer to ml_media_format.h.
Parameters and associated values that may be applied are:
- MLMediaFormat_Key_Parameter_Video_Bitrate: Dynamically change the video encoder's target bitrate. Associated value is an int32_t representing the new encode bitrate in bits-per-second. Applicable to any video encoder.
- MLMediaFormat_Key_Parameter_Request_Sync_Frame: Communicate to the encoder to produce a sync frame soon. Associated value is an int32_t with the value 0. Applicable to any video encoder.
- MLMediaFormat_Key_Parameter_Drop_After: Set the time after which samples should be dropped and not submitted to the encoder. Associated value is an int64_t value representing the system time in micro-seconds. Applicable to an encoder receiving input from a surface.
- MLMediaFormat_Key_Parameter_Drop_Before: Set the time before which samples should be dropped and not submitted to the encoder. Associated value is an int64_t value representing the system time in micro-seconds. Applicable to an encoder receiving input from a surface.
- MLMediaFormat_Key_Parameter_Set_Suspend: Temporarily suspend or resume video encoding of input data. When suspended, all incoming buffers are discarded until suspension is lifted. Used in conjunction with MLMediaFormat_Key_Parameter_Set_Suspend_Time to speficy the time of suspension or resumption. Associated value is an int32_t value with the value 1 or 0 to suspend or resume, respectively. Applicable to an encoder receiving input from a surface.
- MLMediaFormat_Key_Parameter_Set_Suspend_Time: Specifies the time when the action associated with the value of MLMediaFormat_Key_Parameter_Set_Suspend should take effect. Associated value is an int64_t value representing the system time, in micro-seconds, indicating when suspendion or resumption takes effect. Applicable to an encoder receiving input from a surface.
- MLMediaFormat_Key_Parameter_Time_Offset: Describes an offset to adjust timestamps going forward on a video endcoder. Associated value is an int64_t value representing the offset timestamp, in micro-seconds. Applicable to an encoder receiving input from a surface.
- MLMediaFormat_Key_Operating_Rate: Describes the rate at which a codec is expected to operate. For video, this is the operating frame rate; for audio, this is the sample rate. Associated value is a float value representing either the frames-per-second or the samples-per-second for video or audio, respectively. Applicable to any codec. Note: This key is ignored if it fails to apply. Note: This key can also be set as part of the MLMediaFormat provided at configure-time.
- MLMediaFormat_Key_Intra_Refresh_Period: Describes the period of intra refresh in frames. Associated value is a int32_t value representing the period in frames after which the whole frame is completely refreshed. Applicable to any video encoder. Note: This key is ignored if not supported by the codec or it fails to apply. Note: This key can also be set as part of the MLMediaFormat provided at configure-time.
- MLMediaFormat_Key_Latency: Describes the latency, in frames, a video encoder should have queued up before outputting at least one output frame. Associated value is an int32_t value representing the latency, in number of frames. Applicable to any video encoder. Note: This key is ignored if not supported by the codec or it fails to apply. Note: This key can also be set as part of the MLMediaFormat provided at configure-time.
Deprecated since 1.4.0. Scheduled for removal.
Some of these parameter changes may silently fail to apply. Unless specified below, an error will be returned on unsuccesful application.
API Level:
- 9
MLMediaCodecGetInputBufferPointer
MLResult MLMediaCodecGetInputBufferPointer(
MLHandle handle,
int64_t buffer_index,
uint8_t ** out_buffer_ptr,
size_t * out_buffer_size
)
Obtain a writable buffer pointer for a dequeued input buffer index to contain the input data.
Parameters
MLHandle | handle | MLHandle to the MLMediaCodec. |
int64_t | buffer_index | The index of a client-owned input buffer previously returned from a call to MLMediaCodecDequeueInputBuffer(). |
uint8_t ** | out_buffer_ptr | Pointer to returned input buffer. |
size_t * | out_buffer_size | Size of returned input buffer. |
Returns
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | Input buffer pointer is retrieved successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
MLResult | MLMediaGenericResult_InvalidOperation | Buffer pointer could not be retrieved. Note that this API returns MLMediaGenericResult_InvalidOperation especially if video encoder has hardware input surface (see MLMediaCodecCreateInputSurface), and thus, out_buffer_ptr will be set to NULL and out_buffer_size set to 0. |
Required Permissions:
- None
After calling this method any buffer pointer previously returned for the same input index MUST no longer be used.
Note: For VIDEO encoder, this API will fail if an input surface was created by MLMediaCodecCreateInputSurface (see return value documentation below).
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 20
MLMediaCodecGetOutputBufferPointer
MLResult MLMediaCodecGetOutputBufferPointer(
MLHandle handle,
int64_t buffer_index,
const uint8_t ** out_buffer_ptr,
size_t * out_buffer_size
)
Obtain a read-only buffer pointer for a dequeued output buffer index.
Parameters
MLHandle | handle | MLHandle to the MLMediaCodec. |
int64_t | buffer_index | The index of a client-owned output buffer previously returned from a call to MLMediaCodecDequeueOutputBuffer(). |
const uint8_t ** | out_buffer_ptr | Pointer to returned output buffer. |
size_t * | out_buffer_size | Size of returned output buffer. |
Returns
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | Output buffer pointer is retrieved successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
MLResult | MLMediaGenericResult_InvalidOperation | Buffer pointer could not be retrieved. Note that this API returns MLMediaGenericResult_InvalidOperation especially if codec was VIDEO and configured with a hardware surface using MLMediaCodecConfigure(), and thus, out_buffer_ptr will be set to NULL and out_buffer_size set to 0 since decoded buffer lives in GPU memory and is not accessible via a pointer. |
Required Permissions:
- None
The position and limit of the returned buffer are set to the valid output data. After calling this method any buffer pointer previously returned for the same output index MUST no longer be used.
Note: For VIDEO decoder, this API will fail if codec was configured with a hardware surface (see return value documentation below).
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 20
MLMediaCodecQueueInputBuffer
MLResult MLMediaCodecQueueInputBuffer(
MLHandle handle,
int64_t buffer_index,
int64_t offset,
size_t size,
uint64_t time_us,
int flags
)
After filling a range of the input buffer at the specified index submit it to the component.
Parameters
MLHandle | handle | MLHandle to the MLMediaCodec. |
int64_t | buffer_index | Index of a client-owned input buffer previously returned in a call to MLMediaCodecDequeueInputBuffer(). |
int64_t | offset | Byte offset into the input buffer at which the data starts. |
size_t | size | Number of bytes of valid input data. |
uint64_t | time_us | Presentation timestamp in microseconds for this buffer. This is normally the media time at which this buffer should be presented (rendered). |
int | flags | A bitmask of flags defined by MLMediaCodecBufferFlag. While not prohibited, most codecs do not use the MLMediaCodecBufferFlag_KeyFrame flag for input buffers. |
Returns
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | Intput buffer is queued successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Once an input buffer is queued to the codec, it MUST NOT be used until it is later retrieved by MLMediaCodecGetInputBufferPointer() in response to a MLMediaCodecDequeueInputBuffer() return value.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 20
MLMediaCodecQueueSecureInputBuffer
MLResult MLMediaCodecQueueSecureInputBuffer(
MLHandle handle,
int64_t buffer_index,
int64_t offset,
MLHandle crypto_info_handle,
uint64_t time_us,
int flags
)
Similar to queueInputBuffer but submits a buffer that is potentially encrypted.
Parameters
MLHandle | handle | MLHandle to the MLMediaCodec. |
int64_t | buffer_index | Index of a client-owned input buffer previously returned in a call to MLMediaCodecDequeueInputBuffer(). |
int64_t | offset | Byte offset into the input buffer at which the data starts. |
MLHandle | crypto_info_handle | Metadata required to facilitate decryption, the object can be reused immediately after this call returns. |
uint64_t | time_us | Presentation timestamp in microseconds for this buffer. This is normally the media time at which this buffer should be presented (rendered). |
int | flags | A bitmask of flags defined by MLMediaCodecBufferFlag. While not prohibited, most codecs do not use the MLMediaCodecBufferFlag_KeyFrame flag for input buffers. |
Returns
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | Secure Intput buffer is queued successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 20
MLMediaCodecDequeueInputBuffer
MLResult MLMediaCodecDequeueInputBuffer(
MLHandle handle,
int64_t timeout_us,
int64_t * out_buffer_index
)
Dequeue an input buffer from buffer queue.
Parameters
MLHandle | handle | MLHandle to the MLMediaCodec. |
int64_t | timeout_us | Timeout in microseconds. Negative timeout indicates "infinite". |
int64_t * | out_buffer_index | Index of an Input buffer from buffer queue, or MLMediaCodec_TryAgainLater status. |
Returns
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | Intput buffer is dequeued successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
MLResult | MLMediaGenericResult_InvalidOperation | if the codec is configured to operate in async mode. |
Required Permissions:
- None
This method will return immediately if timeoutUs == 0, wait indefinitely for the availability of an input buffer if timeoutUs < 0 or wait up to "timeoutUs" microseconds if timeoutUs > 0.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 20
MLMediaCodecDequeueOutputBuffer
MLResult MLMediaCodecDequeueOutputBuffer(
MLHandle handle,
MLMediaCodecBufferInfo * out_buffer_info,
int64_t timeout_us,
int64_t * out_buffer_index
)
Dequeue an output buffer from buffer queue.
Parameters
MLHandle | handle | MLHandle to the MLMediaCodec. |
MLMediaCodecBufferInfo * | out_buffer_info | Will be filled with buffer meta data. |
int64_t | timeout_us | Timeout in microseconds. Negative timeout indicates "infinite". |
int64_t * | out_buffer_index | Index of an output buffer from buffer queue, or one of the statuses defined by MLMediaCodecOutputBufferStatus. |
Returns
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | Output buffer is dequeued successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
MLResult | MLMediaGenericResult_InvalidOperation | if the codec is configured to operate in async mode. |
Required Permissions:
- None
This method will return immediately if timeoutUs == 0, wait indefinitely for the availability of an input buffer if timeoutUs < 0 or wait up to "timeoutUs" microseconds if timeoutUs > 0.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 20
MLMediaCodecGetInputFormat
MLResult MLMediaCodecGetInputFormat(
MLHandle handle,
MLHandle * out_format_handle
)
Obtain input format supported by the codec.
Parameters
MLHandle | handle | MLHandle to the MLMediaCodec. |
MLHandle * | out_format_handle | Input format supported by the codec. |
Returns
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | Input Media format is retrieved successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Call this function, after successful codec configuration, to determine what optional configuration parameters were supported by the codec.
Deprecated since 1.4.0. Scheduled for removal.
MLMediaCodecGetOutputFormat
MLResult MLMediaCodecGetOutputFormat(
MLHandle handle,
MLHandle * out_format_handle
)
Return output format supported by the codec, or the format to which the configuration has changed.
Parameters
MLHandle | handle | MLHandle to the MLMediaCodec. |
MLHandle * | out_format_handle | Output format supported by the codec, or the format to which the configuration has changed. |
Returns
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | Output Media format is retrieved successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
MLMediaCodecCreateInputSurface
MLResult MLMediaCodecCreateInputSurface(
MLHandle handle,
MLHandle * out_input_surface_handle
)
Create an input surface for a hardware encoder.
Parameters
MLHandle | handle | MLHandle to the MLMediaCodec. |
MLHandle * | out_input_surface_handle | MLHandle to created input native surface. Valid only if result is MLResult_Ok. |
Returns
MLResult | MLResult_AllocFailed | The operation failed to allocate the surface. |
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | Input input surface was created successfully. |
MLResult | MLMediaGenericResult_AlreadyExists | An input surface has already been created for the given handle. |
MLResult | MLMediaGenericResult_InvalidOperation | MLMediaCodec is not an encoder. |
MLResult | MLMediaGenericResult_NoInit | MLMediaCodec was not initialized. |
MLResult | MLMediaGenericResult_UnspecifiedFailure | Input surface could not be created. |
Required Permissions:
- None
Requests an input surface to use as the input to an encoder, in place of input buffers.
This API must only be called after MLMediaCodecConfigure() and before MLMediaCodecStart() otherwise the operation will fail and an input surface cannot be created.
An input surface allows video consumers, such as a video encoder, to process raw input video buffers natively. The input surface is intended to act as a destination surface for your input data.
When using an input surface, there are no accessible input buffers, as buffers are automatically passed from the input surface to the codec. In synchronous mode, calling MLMediaCodecDequeueInputBuffer() will return MLMediaGenericResult_InvalidOperation. In asynchronous mode, the client will not be notified when an input buffer is available (i.e. the on_input_buffer_available callback will not fire).
The returned input surface can be passed as a destination surface to a decoder when calling MLMediaCodecConfigure(). Decoded output of the decoder can be consumed direclty as input to an encoder without copying. This allows implementation of fast, zero-copy transcoding.
The returned input surface can also be passed as a destination surface to:
- A video capture session when using MLCameraConnectFlag_CamOnly.
- A virtual capture session when using MLCameraConnectFlag_VirtualOnly .
- A mixed reality capture session when using MLCameraConnectFlag_MR. Captured raw video frames will be consumed directly as input to an encoder without copying. The user of this API is responsible for calling #MLMediaCodecReleaseSurface() on the Surface when done.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 9
MLMediaCodecDestroyInputSurface
MLResult MLMediaCodecDestroyInputSurface(
MLHandle handle,
MLHandle input_surface_handle
)
Release the Surface that was created by MLMediaCodecCreateInputSurface.
Parameters
MLHandle | handle | MLHandle to the MLMediaCodec. |
MLHandle | input_surface_handle | MLHandle to the internal Surface object. |
Returns
MLResult | MLResult_InvalidParam | MLHandle is invalid. |
MLResult | MLResult_Ok | Surface object was successfully released. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
MLResult | MLMediaGenericResult_InvalidOperation | MLMediaCodec is not an encoder. |
MLResult | MLMediaGenericResult_NoInit | MLMediaCodec was not initialized. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 9
MLMediaCodecSignalEndOfInputStream
MLResult MLMediaCodecSignalEndOfInputStream(
MLHandle handle
)
Signal end-of-stream on input to a surface.
Parameters
MLHandle | handle | MLHandle to the MLMediaCodec. |
Returns
MLResult | MLResult_InvalidOperation | MLMediaCodec is not an encoder or MLMediaCodec is not receving input from a surface. |
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | The operation was successful. |
MLResult | MLMediaGenericResult_NoInit | MLMediaCodec was not initialized. |
This may only be used with encoders receiving input from a surface created by MLMediaCodecCreateInputSurface().
Equivalent to submitting an empty buffer with MLMediaCodecBufferFlag_EOS set when queueing an input buffer.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 9
MLMediaCodecReleaseOutputBuffer
MLResult MLMediaCodecReleaseOutputBuffer(
MLHandle handle,
int64_t buffer_index,
bool render
)
Release buffer to codec or to render it on output surface.
Parameters
MLHandle | handle | MLHandle to the MLMediaCodec object. |
int64_t | buffer_index | Index of a client-owned output buffer previously returned from a call to MLMediaCodecDequeueOutputBuffer(). |
bool | render | If a valid surface was specified when configuring the codec, passing true renders this output buffer to the surface. |
Returns
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | Output buffer was released successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
If codec is configured with an output surface, setting render to true
will send the buffer to that output surface. The surface will release the buffer back to the codec once it is no longer used/displayed.
Once an output buffer is released to codec, it MUST NOT be used until it is later retrieved by MLMediaCodecGetOutputBufferPointer() in response to a MLMediaCodecDequeueOutputBuffer() return value.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 20
MLMediaCodecReleaseOutputBufferAtTime
MLResult MLMediaCodecReleaseOutputBufferAtTime(
MLHandle handle,
int64_t buffer_index,
int64_t timestamp_ns
)
Update surface timestamp and returns it to the codec to render it on the output surface. If codec is not configured with output surface, this call simply returns the buffer to codec.
Parameters
MLHandle | handle | MLHandle to the MLMediaCodec object. |
int64_t | buffer_index | Index of a client-owned output buffer previously returned from a call to MLMediaCodecDequeueOutputBuffer(). |
int64_t | timestamp_ns | The timestamp in nanoseconds to associate with this buffer when it is sent to the Surface. |
Returns
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | Output buffer was released successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
The timestamp may have special meaning depending on the destination surface.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 20
MLMediaCodecListCountCodecs
MLResult MLMediaCodecListCountCodecs(
uint64_t * out_codec_count
)
Obtain the number of available codecs.
Parameters
uint64_t * | out_codec_count | Number of available codecs. |
Returns
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | If operation was successful. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
MLMediaCodecListIsSoftwareCodec
MLResult MLMediaCodecListIsSoftwareCodec(
const char * codec_name,
bool * out_val
)
Determine whether a codec is a software codec.
Parameters
const char * | codec_name | Name of the codec. |
bool * | out_val | Returns true if the codec is a software codec and false otherwise. |
Returns
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | If operation was successful. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
MLMediaCodecListGetMatchingCodecs
MLResult MLMediaCodecListGetMatchingCodecs(
const char * mime,
bool is_encoder,
MLMediaCodecListCodecTypeFlag flag,
MLMediaCodecListQueryResults * out_matching_codecs
)
Obtain a list of matching codecs for a given codec mime.
Parameters
const char * | mime | Codec mime. |
bool | is_encoder | Set to true if querying for encoder and false otherwise. |
MLMediaCodecListCodecTypeFlag | flag | Whether querying for software-only or hardware-only, defined by MLMediaCodecListCodecTypeFlag. |
MLMediaCodecListQueryResults * | out_matching_codecs | List of codecs supporting the given mime. |
Returns
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | If operation was successful. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
The memory used to store the list is maintained by the library. User shall call MLMediaCodecListQueryResultsRelease() to release it.
Deprecated since 1.4.0. Scheduled for removal.
MLMediaCodecListGetCodecByType
MLResult MLMediaCodecListGetCodecByType(
const char * type,
bool is_encoder,
uint64_t start_index,
int64_t * out_index
)
Obtain the codec matching the given codec type from the codec list.
Parameters
const char * | type | Codec mime. |
bool | is_encoder | Set to true if querying for encoder and false otherwise. |
uint64_t | start_index | Index from which to search in the codec list. The number shall be between 0 and number of available codecs. |
int64_t * | out_index | Index of the matching codec or -2. |
Returns
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | If operation was successful. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
MLMediaCodecListGetCodecByName
MLResult MLMediaCodecListGetCodecByName(
const char * name,
int64_t * out_index
)
Obtain the codec from the codec matching the given codec name from the codec list.
Parameters
const char * | name | Codec name. |
int64_t * | out_index | Index of the matching codec or -2. |
Returns
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | If operation was successful. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
MLMediaCodecListIsEncoder
MLResult MLMediaCodecListIsEncoder(
uint64_t index,
bool * out_val
)
Confirm whether a component is an Encoder or Decoder.
Parameters
uint64_t | index | Index of the codec in the codec list. The number shall be between 0 and number of available codecs. |
bool * | out_val | Returns true if the codec is an encoder and false otherwise. |
Returns
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | If operation was successful. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
MLMediaCodecListGetCodecName
MLResult MLMediaCodecListGetCodecName(
uint64_t index,
char * out_name
)
Obtain a codec name.
Parameters
uint64_t | index | Index of the codec in the codec list. The number shall be between 0 and number of available codecs. |
char * | out_name | Pointer to the user-maintained buffer for storing the output C-style name string. |
Returns
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | If operation was successful. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
User shall allocate at least MAX_CODEC_NAME_LENGTH bytes of memory for storing the output name string.
Deprecated since 1.4.0. Scheduled for removal.
MLMediaCodecListGetSupportedMimes
MLResult MLMediaCodecListGetSupportedMimes(
uint64_t index,
MLMediaCodecListQueryResults * out_supported_mimes
)
Obtain the list of mime types supported by a codec.
Parameters
uint64_t | index | Index of the codec in the codec list. The number shall be between 0 and number of available codecs. |
MLMediaCodecListQueryResults * | out_supported_mimes | List of supported mimes. |
Returns
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | If operation was successful. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
The memory used to store the list is maintained by the library. User shall call MLMediaCodecListQueryResultsRelease() to release it.
Deprecated since 1.4.0. Scheduled for removal.
MLMediaCodecListGetCapabilityFlag
MLResult MLMediaCodecListGetCapabilityFlag(
uint64_t index,
const char * mime,
MLMediaCodecListCapabilityFlag * out_capability_flag
)
Obtain the capability flag for a codec.
Parameters
uint64_t | index | Index of the codec in the codec list. The number shall be between 0 and number of available codecs. |
const char * | mime | Mime type of the codec being queried. |
MLMediaCodecListCapabilityFlag * | out_capability_flag | Codec capability flag defined by MLMediaCodecListCapabilityFlag. |
Returns
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | If operation was successful. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
MLMediaCodecListGetSecureCodecName
MLResult MLMediaCodecListGetSecureCodecName(
const char * mime,
bool is_decoder,
char * out_name
)
Obtain the name of a secure codec for the given mime type.
Parameters
const char * | mime | Mime type of the codec. |
bool | is_decoder | Set to true if querying for decoder and false otherwise. |
char * | out_name | Pointer to the user-maintained buffer for storing the output C-style name string. |
Returns
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | If operation was successful. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
User shall allocate at least MAX_CODEC_NAME_LENGTH bytes of memory for storing the output name string.
Deprecated since 1.4.0. Scheduled for removal.
MLMediaCodecListQueryResultsRelease
MLResult MLMediaCodecListQueryResultsRelease(
MLMediaCodecListQueryResults * query_results
)
Release the query results.
Parameters
MLMediaCodecListQueryResults * | query_results | Query results such as the list of codecs acquired by MLMediaCodecListGetMatchingCodecs() or the list of supported mime types acquired by MLMediaCodecListGetSupportedMimes(). |
Returns
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | If operation was successful. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
MLMediaCodecListGetSupportedProfileLevels
MLResult MLMediaCodecListGetSupportedProfileLevels(
uint64_t index,
const char * mime,
MLMediaCodecListProfileLevel ** out_profile_levels,
size_t * out_profile_levels_size
)
Obtain the supported profile levels for a codec.
Parameters
uint64_t | index | Index of the codec in the codec list. The number shall be between 0 and number of available codecs. |
const char * | mime | Mime type of the codec being queried. |
MLMediaCodecListProfileLevel ** | out_profile_levels | Codec supported profile levels defined by MLMediaCodecListProfileLevel. |
size_t * | out_profile_levels_size | Number of profile levels. |
Returns
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | If operation was successful. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
User shall call MLMediaCodecListProfileLevelsRelease() to release it.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 6
MLMediaCodecListProfileLevelsRelease
MLResult MLMediaCodecListProfileLevelsRelease(
MLMediaCodecListProfileLevel * profile_levels
)
Release profile levels.
Parameters
MLMediaCodecListProfileLevel * | profile_levels | The return value of MLMediaCodecListGetSupportedProfileLevels(). |
Returns
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | If operation was successful. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 6
MLMediaCodecListGetSupportedColorFormats
MLResult MLMediaCodecListGetSupportedColorFormats(
uint64_t index,
const char * mime,
uint32_t ** out_color_formats,
size_t * out_color_formats_size
)
Obtain the supported color formats for a codec. All the supported color formats are defined by MLMediaCodecColorFormat.
Parameters
uint64_t | index | Index of the codec in the codec list. The number shall be between 0 and number of available codecs. |
const char * | mime | Mime type of the codec being queried. |
uint32_t ** | out_color_formats | Codec supported color formats of type MLMediaCodecColorFormat. |
size_t * | out_color_formats_size | Number of color formats. |
Returns
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | If operation was successful. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
User shall call MLMediaCodecListColorFormatsRelease() to release it.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 6
MLMediaCodecListColorFormatsRelease
MLResult MLMediaCodecListColorFormatsRelease(
uint32_t * color_formats
)
Release color formats.
Parameters
uint32_t * | color_formats | The return value of MLMediaCodecListGetSupportedColorFormats(). |
Returns
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | If operation was successful. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 6
MLMediaCodecListGetSupportedBitrateModes
MLResult MLMediaCodecListGetSupportedBitrateModes(
uint64_t index,
const char * mime,
MLMediaCodecBitrateMode ** out_bitrate_modes,
size_t * out_bitrate_modes_size
)
Obtain the supported bitrate modes for a codec.
Parameters
uint64_t | index | Index of the codec in the codec list. The number shall be between 0 and number of available codecs. |
const char * | mime | Mime type of the codec being queried. |
MLMediaCodecBitrateMode ** | out_bitrate_modes | Codec supported Bitrate modes defined by MLMediaCodecBitrateMode. |
size_t * | out_bitrate_modes_size | Number of Bitrate modes. |
Returns
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | If operation was successful. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
User shall call MLMediaCodecBitrateModesRelease() to release it.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 9
MLMediaCodecBitrateModesRelease
MLResult MLMediaCodecBitrateModesRelease(
MLMediaCodecBitrateMode * bitrate_modes
)
Release Bitrate modes.
Parameters
MLMediaCodecBitrateMode * | bitrate_modes | The return value of MLMediaCodecListGetSupportedBitrateModes(). |
Returns
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | If operation was successful. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 9
MLMediaCodecListIsAdaptivePlaybackSupported
MLResult MLMediaCodecListIsAdaptivePlaybackSupported(
uint64_t index,
const char * mime,
bool * out_supported
)
Check whether Adaptive playback is supported.
Parameters
uint64_t | index | Index of the codec in the codec list. The number shall be between 0 and number of available codecs. |
const char * | mime | Mime type of the codec being queried. |
bool * | out_supported | Returns true if supported, false otherwise. |
Returns
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | If operation was successful. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
This function is used to query a video decoder to see whether it supports seamless resolution changes through Adaptive streaming. If the component is an audio decoder or encoder, it will always return false.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 9
MLMediaCodecListIsSecurePlaybackSupported
MLResult MLMediaCodecListIsSecurePlaybackSupported(
uint64_t index,
const char * mime,
bool * out_supported
)
Check whether Secure playback is supported.
Parameters
uint64_t | index | Index of the codec in the codec list. The number shall be between 0 and number of available codecs. |
const char * | mime | Mime type of the codec being queried. |
bool * | out_supported | Returns true if supported, false otherwise. |
Returns
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | If operation was successful. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
If the component is an encoder, it will always return false.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 9
MLMediaCodecListIsIntraRefreshSupported
MLResult MLMediaCodecListIsIntraRefreshSupported(
uint64_t index,
const char * mime,
bool * out_supported
)
Check whether Intra Refresh is supported.
Parameters
uint64_t | index | Index of the codec in the codec list. The number shall be between 0 and number of available codecs. |
const char * | mime | Mime type of the codec being queried. |
bool * | out_supported | Returns true if supported, false otherwise. |
Returns
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | If operation was successful. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
If the component is Decoder, it will always return false.
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 9
MLMediaCryptoCreate
MLResult MLMediaCryptoCreate(
MLUUID uuid,
const MLMediaDRMByteArray * data,
MLHandle * out_handle
)
Create a MLMediaCrypto instance from a UUID.
Parameters
MLUUID | uuid | The universal unique ID of the crypto scheme. uuid must be 16 bytes. |
const MLMediaDRMByteArray * | data | Opaque initialization data specific to the crypto scheme, This value must never be NULL. |
MLHandle * | out_handle | Upon successful return will point to handle to the created MLMediaCrypto. Or else, it will point to ML_INVALID_HANDLE. |
Returns
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | MLMediaCrypto object was created successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
MLMediaCryptoRelease
MLResult MLMediaCryptoRelease(
MLHandle media_crypto
)
Release the MLMediaCrypto instance.
Parameters
MLHandle | media_crypto | MLHandle to the MLMediaCrypto. |
Returns
MLResult | MLResult_InvalidParam | MLMediaCrypto object is invalid. |
MLResult | MLResult_Ok | MLMediaCrypto object was successfully destroyed. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
MLMediaCryptoIsCryptoSchemeSupported
MLResult MLMediaCryptoIsCryptoSchemeSupported(
MLUUID uuid,
bool * out_supported
)
Query if the given scheme identified by its UUID is supported on this device.
Parameters
MLUUID | uuid | Identifies the universal unique ID of the crypto scheme. uuid must be 16 bytes. |
bool * | out_supported | On successful return contains true or false based on whether the given crypto scheme is supported or not. |
Returns
MLResult | MLResult_InvalidParam | Parameter is invalid. |
MLResult | MLResult_Ok | The query has run successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
MLMediaCryptoRequiresSecureDecoderComponent
MLResult MLMediaCryptoRequiresSecureDecoderComponent(
const char * mime_type,
bool * out_required
)
Query if the crypto scheme requires the use of a secure decoder to decode data of the given mime type.
Parameters
const char * | mime_type | The MIME type of the media container, e.g. "video/mp4". |
bool * | out_required | On successful return contains true or false based on whether the given mime type requires a secure decoder. |
Returns
MLResult | MLResult_InvalidParam | Parameter is invalid. |
MLResult | MLResult_Ok | The query has run successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
MLMediaCryptoSetMediaDRMSession
MLResult MLMediaCryptoSetMediaDRMSession(
MLHandle media_crypto,
const MLMediaDRMByteArray * session_id
)
Associate a #MediaDRM session with this MLMediaCrypto instance.
Parameters
MLHandle | media_crypto | MLHandle to the MLMediaCrypto. |
const MLMediaDRMByteArray * | session_id | Session ID for the DRM session. |
Returns
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | Media DRM session was set successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
MLMediaDataSourceCreate
MLResult MLMediaDataSourceCreate(
MLMediaDataSourceReadAt read_at,
MLMediaDataSourceGetSize get_size,
MLMediaDataSourceClose close,
void * context,
MLHandle * out_handle
)
Create a new MediaDataSource object.
Parameters
MLMediaDataSourceReadAt | read_at | MLMediaDataSourceReadAt callback. |
MLMediaDataSourceGetSize | get_size | MLMediaDataSourceGetSize callback. |
MLMediaDataSourceClose | close | MLMediaDataSourceClose callback. |
void * | context | User data to be passed to callbacks. |
MLHandle * | out_handle | The MLHandle to the new source object created. Only valid if result is MLResult_Ok. |
Returns
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | if operation was successful. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
MLMediaDataSourceDestroy
MLResult MLMediaDataSourceDestroy(
MLHandle media_data_source
)
Destroy a #MediaDataSource object.
Parameters
MLHandle | media_data_source | MLHandle to the #MediaDataSource object to destroy. |
Returns
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | if operation was successful. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
MLMediaDRMEventCallbacksInit
static inline void MLMediaDRMEventCallbacksInit(
MLMediaDRMEventCallbacks * inout_callbacks
)
Initializes MLMediaDRMEventCallbacks with default values.
Parameters
MLMediaDRMEventCallbacks * | inout_callbacks | MediaDRM Callback structure defined by MLMediaDRMEventCallbacks that needs to be initialized. |
Deprecated since 1.4.0. Scheduled for removal.
MLMediaDRMByteArrayAllocate
MLResult MLMediaDRMByteArrayAllocate(
size_t size,
MLMediaDRMByteArray * out_array
)
Allocate byte array buffer.
Parameters
size_t | size | Maximum size of the desirable byte array to be allocated. |
MLMediaDRMByteArray * | out_array | Pointer to byte array buffer that needs to be allocated. To free/release, call MLMediaDRMByteArrayRelease(). |
Returns
MLResult | MLResult_AllocFailed | Failed because of allocation failure. |
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | Byte Array is allocated successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
MLMediaDRMByteArrayAllocAndCopy
MLResult MLMediaDRMByteArrayAllocAndCopy(
const uint8_t * copy_from,
size_t size,
MLMediaDRMByteArray * out_array
)
Allocate and Copy to byte array buffer.
Parameters
const uint8_t * | copy_from | Buffer from which copy into byte array. |
size_t | size | Number of bytes to be copied. |
MLMediaDRMByteArray * | out_array | Pointer to byte array buffer that needs to be allocated and copied to. To free/release, call MLMediaDRMByteArrayRelease(). |
Returns
MLResult | MLResult_AllocFailed | Failed because of allocation failure. |
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | Byte Array is allocated and copied successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
MLMediaDRMKeyValueArrayAllocate
MLResult MLMediaDRMKeyValueArrayAllocate(
size_t size,
MLMediaDRMKeyValueArray * out_array
)
Allocate array of key/value pairs.
Parameters
size_t | size | Maximum size of the desirable array of key/value pair to be allocated. |
MLMediaDRMKeyValueArray * | out_array | Pointer to array of key/value pair that needs to be allocated. To free/release, call MLMediaDRMKeyValueArrayRelease(). |
Returns
MLResult | MLResult_AllocFailed | Failed because of allocation failure. |
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | Key/value pair array is allocated successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
MLMediaDRMCreate
MLResult MLMediaDRMCreate(
MLUUID uuid,
MLHandle * out_handle
)
Create a MLMediaDRM instance from a UUID.
Parameters
MLUUID | uuid | The universal unique ID of the crypto scheme. uuid must be 16 bytes. |
MLHandle * | out_handle | Upon successful return will point to handle to the created MLMediaDRM. Or else, it will point to ML_INVALID_HANDLE. |
Returns
MLResult | MLResult_AllocFailed | MLMediaDRM object creation failed with resource allocation failure. |
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | MLMediaDRM object was created successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
MLMediaDRMRelease
MLResult MLMediaDRMRelease(
MLHandle media_drm
)
Release the MLMediaDRM instance.
Parameters
MLHandle | media_drm | Handle to the MLMediaDRM. |
Returns
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | MLMediaDRM object was released successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
MLMediaDRMByteArrayRelease
MLResult MLMediaDRMByteArrayRelease(
MLMediaDRMByteArray * array
)
Release byte array buffer.
Parameters
MLMediaDRMByteArray * | array | Byte array buffer that needs to be released. |
Returns
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | Byte Array was released successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
MLMediaDRMByteArrayListRelease
MLResult MLMediaDRMByteArrayListRelease(
MLMediaDRMByteArrayList * array
)
Release list of byte array buffer.
Parameters
MLMediaDRMByteArrayList * | array | List of byte array buffer that needs to be released. |
Returns
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | Byte Array List was released successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
MLMediaDRMKeyValueArrayRelease
MLResult MLMediaDRMKeyValueArrayRelease(
MLMediaDRMKeyValueArray * array
)
Release key/value pair array.
Parameters
MLMediaDRMKeyValueArray * | array | Key/value pair array that needs to be released. |
Returns
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | Key/value pair array was released successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
MLMediaDRMRequestMessageRelease
MLResult MLMediaDRMRequestMessageRelease(
MLMediaDRMRequestMessage * request
)
Release Request Message.
Parameters
MLMediaDRMRequestMessage * | request | Pointer to Request Message that needs to be released. |
Returns
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | DRM Request Message was released successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
MLMediaDRMKeyValueArrayAdd
MLResult MLMediaDRMKeyValueArrayAdd(
const MLMediaDRMKeyValue * pair,
MLMediaDRMKeyValueArray * out_array
)
Add a key/value pair to the array of key/value pairs.
Parameters
const MLMediaDRMKeyValue * | pair | The source key/value pair that needs to be added. |
MLMediaDRMKeyValueArray * | out_array | Pointer to array of key/value pair to which the pair needs to be added to. |
Returns
MLResult | MLResult_InvalidParam | One of the parameters is invalid. |
MLResult | MLResult_Ok | key/value pair is added successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
MLMediaDRMIsCryptoSchemeSupported
MLResult MLMediaDRMIsCryptoSchemeSupported(
MLUUID uuid,
const char * mime_type,
bool * out_supported
)
Query if the given scheme identified by its UUID is supported on this device. And whether the drm plugin is able to handle the media container format.
Parameters
MLUUID | uuid | Identifies the universal unique ID of the crypto scheme. UUID must be 16 bytes. |
const char * | mime_type | The MIME type of the media container, e.g. "video/mp4". If mime_type is not known or required, it can be provided as NULL. |
bool * | out_supported | On successful return contains true or false based on whether the given crypto scheme is supported or not. |
Returns
MLResult | MLResult_InvalidParam | Parameter is invalid. |
MLResult | MLResult_Ok | The query has run successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
MLMediaDRMSetOnEventListenerEx
MLResult MLMediaDRMSetOnEventListenerEx(
MLHandle media_drm,
MLMediaDRMEventCallbacks * callbacks,
void * data
)
Register a callback to be invoked when DRM events or updates or status change occurs.
Parameters
MLHandle | media_drm | Handle to the MLMediaDRM. |
MLMediaDRMEventCallbacks * | callbacks | Set of event callbacks. Can be set to NULL to unset the callbacks altogether. |
void * | data | Custom data to be returned when any callback is fired. |
Returns
MLResult | MLResult_InvalidParam | Parameter is invalid. |
MLResult | MLResult_Ok | Event listener was set successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 20
MLMediaDRMOpenSession
MLResult MLMediaDRMOpenSession(
MLHandle media_drm,
MLMediaDRMByteArray * out_session_id
)
Opens a new session. A session ID is returned.
Parameters
MLHandle | media_drm | Handle to the MLMediaDRM. |
MLMediaDRMByteArray * | out_session_id | ID of the session created/opened. This byte array will be released when MLMediaDRMCloseSession() is called. |
Returns
MLResult | MLResult_InvalidParam | Parameter is invalid. |
MLResult | MLResult_Ok | MLMediaDRM session was opened successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
MLMediaDRMCloseSession
MLResult MLMediaDRMCloseSession(
MLHandle media_drm,
MLMediaDRMByteArray * session_id
)
Closes a session on the MLMediaDRM object that was previously opened with openSession().
Parameters
MLHandle | media_drm | Handle to the MLMediaDRM. |
MLMediaDRMByteArray * | session_id | The session ID for the DRM session, which will be released on return. |
Returns
MLResult | MLResult_InvalidParam | Parameter is invalid. |
MLResult | MLResult_Ok | MLMediaDRM session was closed successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
MLMediaDRMGetKeyRequest
MLResult MLMediaDRMGetKeyRequest(
MLHandle media_drm,
const MLMediaDRMByteArray * session_id,
const MLMediaDRMKeyRequestInputParam * key_request_param,
MLMediaDRMRequestMessage * out_key_request
)
A key request/response exchange occurs between the app and a license server to obtain or release keys used to decrypt encrypted content.
Parameters
MLHandle | media_drm | Handle to the MLMediaDRM. |
const MLMediaDRMByteArray * | session_id | The session ID for the DRM session. |
const MLMediaDRMKeyRequestInputParam * | key_request_param | Placeholder for needed arguments for generating a key request message. |
MLMediaDRMRequestMessage * | out_key_request | Upon successful return, contains key request message. To free/release this, call MLMediaDRMRequestMessageRelease(). |
Returns
MLResult | MLResult_InvalidParam | Parameter is invalid. |
MLResult | MLResult_Ok | MLMediaDRM Key Request message is constructed successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
MLMediaDRMGetKeyRequest() is used to obtain an opaque key request byte array that is delivered to the license server. The opaque key request byte array is returned in out_key_request.request The recommended URL to deliver the key request to is returned in out_key_request.default_URL.
After the app has received the key request response from the server, it should deliver to the response to the DRM engine plugin using the method MLMediaDRMProvideKeyResponse().
Deprecated since 1.4.0. Scheduled for removal.
MLMediaDRMProvideKeyResponse
MLResult MLMediaDRMProvideKeyResponse(
MLHandle media_drm,
const MLMediaDRMByteArray * session_id,
const MLMediaDRMByteArray * response,
MLMediaDRMByteArray * out_key_set_id
)
A key response is received from the license server by the app, then it is provided to the DRM engine plugin using MLMediaDRMProvideKeyResponse().
Parameters
MLHandle | media_drm | Handle to the MLMediaDRM. |
const MLMediaDRMByteArray * | session_id | The session ID for the DRM session. |
const MLMediaDRMByteArray * | response | The opaque response from the server. |
MLMediaDRMByteArray * | out_key_set_id | Upon successful return, contains the key identifier. To free/release this buffer, call MLMediaDRMByteArrayRelease(). |
Returns
MLResult | MLResult_InvalidParam | Parameter is invalid. |
MLResult | MLResult_Ok | MLMediaDRM Key Response message was consumed successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
When the response is for an offline key request, a key_set_id is returned that can be used to later restore the keys to a new session with restoreKeys(). When the response is for a streaming or release request, a null key_set_id is returned.
Deprecated since 1.4.0. Scheduled for removal.
MLMediaDRMRestoreKeys
MLResult MLMediaDRMRestoreKeys(
MLHandle media_drm,
const MLMediaDRMByteArray * session_id,
const MLMediaDRMByteArray * key_set_id
)
Restore persisted offline keys into a new session. key_set_id identifies the keys to load, obtained from a prior call to MLMediaDRMProvideKeyResponse().
Parameters
MLHandle | media_drm | Handle to the MLMediaDRM. |
const MLMediaDRMByteArray * | session_id | The session ID for the DRM session. |
const MLMediaDRMByteArray * | key_set_id | The saved key set to restore. |
Returns
MLResult | MLResult_InvalidParam | Parameter is invalid. |
MLResult | MLResult_Ok | MLMediaDRM Keys are restored successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
MLMediaDRMRemoveKeys
MLResult MLMediaDRMRemoveKeys(
MLHandle media_drm,
MLMediaDRMByteArray * key_set_id
)
Remove the current keys from a session.
Parameters
MLHandle | media_drm | Handle to the MLMediaDRM. |
MLMediaDRMByteArray * | key_set_id | The keys to remove, which will be released on success. |
Returns
MLResult | MLResult_InvalidParam | Parameter is invalid. |
MLResult | MLResult_Ok | MLMediaDRM Keys are removed successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
MLMediaDRMQueryKeyStatus
MLResult MLMediaDRMQueryKeyStatus(
MLHandle media_drm,
const MLMediaDRMByteArray * session_id,
MLMediaDRMKeyValueArray * out_info_map
)
Request an informative description of the key status for the session.
Parameters
MLHandle | media_drm | Handle to the MLMediaDRM. |
const MLMediaDRMByteArray * | session_id | The session ID for the DRM session. |
MLMediaDRMKeyValueArray * | out_info_map | The Key-Value pair place-holder for the key status. To release/free this call MLMediaDRMKeyValueArrayRelease(). |
Returns
MLResult | MLResult_InvalidParam | Parameter is invalid. |
MLResult | MLResult_Ok | Query for MLMediaDRM Key status completed successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
The status is in the form of key/value pairs. Since DRM license policies vary by vendor, the specific status field names are determined by each DRM vendor. Refer to your DRM provider documentation for definitions of the field names for a particular DRM engine plugin.
Deprecated since 1.4.0. Scheduled for removal.
MLMediaDRMGetProvisionRequest
MLResult MLMediaDRMGetProvisionRequest(
MLHandle media_drm,
const char * cert_type,
MLMediaDRMRequestMessage * out_provision_request
)
A provision request/response exchange occurs between the app and a provisioning server to retrieve a device certificate.
Parameters
MLHandle | media_drm | Handle to the MLMediaDRM. |
const char * | cert_type | The device certificate type, which can be "none" or "X.509". |
MLMediaDRMRequestMessage * | out_provision_request | Upon successful return, contains provision request message. To free/release this, call MLMediaDRMRequestMessageRelease(). |
Returns
MLResult | MLResult_InvalidParam | Parameter is invalid. |
MLResult | MLResult_Ok | Device Provision Request message is constructed successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
If provisioning is required, the #EVENT_PROVISION_REQUIRED event will be sent to the event handler. MLMediaDRMGetProvisionRequest() is used to obtain the opaque provision request byte array that should be delivered to the provisioning server.
Deprecated since 1.4.0. Scheduled for removal.
MLMediaDRMProvideProvisionResponse
MLResult MLMediaDRMProvideProvisionResponse(
MLHandle media_drm,
const MLMediaDRMByteArray * response,
MLMediaDRMByteArray * out_certificate,
MLMediaDRMByteArray * out_wrapped_key
)
After a provision response is received by the app, it is provided to the DRM engine plugin using this method.
Parameters
MLHandle | media_drm | Handle to the MLMediaDRM. |
const MLMediaDRMByteArray * | response | The opaque provisioning response byte array to provide to the DRM engine plugin. |
MLMediaDRMByteArray * | out_certificate | The device certificate upon sucessful return. To release/free this call MLMediaDRMByteArrayRelease(). |
MLMediaDRMByteArray * | out_wrapped_key | The wrapped device key upon sucessful return. To release/free this call MLMediaDRMByteArrayRelease(). |
Returns
MLResult | MLResult_InvalidParam | Parameter is invalid. |
MLResult | MLResult_Ok | Device Provision Response message is consumed successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
MLMediaDRMGetSecureStops
MLResult MLMediaDRMGetSecureStops(
MLHandle media_drm,
MLMediaDRMByteArrayList * out_secure_stops
)
Access all secure stops.
Parameters
MLHandle | media_drm | Handle to the MLMediaDRM. |
MLMediaDRMByteArrayList * | out_secure_stops | List of all the secure stops upon successful return. To free/release call MLMediaDRMByteArrayListRelease(). |
Returns
MLResult | MLResult_InvalidParam | Parameter is invalid. |
MLResult | MLResult_Ok | MLMediaDRM Secure stops are retrieved successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Secure Stop:
A means of enforcing limits on the number of concurrent streams per subscriber across devices is provided via #SecureStop. This is achieved by securely monitoring the lifetime of sessions.
Information from the server related to the current playback session is written to persistent storage on the device when each #MediaCrypto object is created.
In the normal case, playback will be completed, the session destroyed and the Secure Stops will be queried. The app queries secure stops and forwards the secure stop message to the server which verifies the signature and notifies the server side database that the session destruction has been confirmed.
The persisted record on the client is only removed after positive confirmation that the server received the message using releaseSecureStops().
Deprecated since 1.4.0. Scheduled for removal.
MLMediaDRMGetSecureStop
MLResult MLMediaDRMGetSecureStop(
MLHandle media_drm,
const MLMediaDRMByteArray * ss_id,
MLMediaDRMByteArray * out_secure_stop
)
Access secure stop by secure stop ID.
Parameters
MLHandle | media_drm | Handle to the MLMediaDRM. |
const MLMediaDRMByteArray * | ss_id | The ID for the DRM securestop session. |
MLMediaDRMByteArray * | out_secure_stop | The secure stop upon successful return. To free/release call MLMediaDRMByteArrayRelease(). |
Returns
MLResult | MLResult_InvalidParam | Parameter is invalid. |
MLResult | MLResult_Ok | MLMediaDRM Secure stop is retrieved successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
See: MLMediaDRMGetSecureStops().
MLMediaDRMReleaseSecureStops
MLResult MLMediaDRMReleaseSecureStops(
MLHandle media_drm,
const MLMediaDRMByteArray * secure_stop
)
Process the SecureStop server response message. After authenticating the message, remove the SecureStops identified in the response. See MLMediaDRMGetSecureStops() for details.
Parameters
MLHandle | media_drm | Handle to the MLMediaDRM. |
const MLMediaDRMByteArray * | secure_stop | The server response indicating which secure stops to release. |
Returns
MLResult | MLResult_InvalidParam | Parameter is invalid. |
MLResult | MLResult_Ok | MLMediaDRM Secure stops are released successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
MLMediaDRMReleaseAllSecureStops
MLResult MLMediaDRMReleaseAllSecureStops(
MLHandle media_drm
)
Remove all the SecureStops.
Parameters
MLHandle | media_drm | Handle to the MLMediaDRM. |
Returns
MLResult | MLResult_InvalidParam | Parameter is invalid. |
MLResult | MLResult_Ok | All secure stops for the MLMediaDRM are released successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
See: MLMediaDRMGetSecureStops().
MLMediaDRMGetPropertyString
MLResult MLMediaDRMGetPropertyString(
MLHandle media_drm,
MLMediaDRMProperty property_name,
char ** out_property_value
)
Read a DRM engine plugin String property value, given the property name.
Parameters
MLHandle | media_drm | Handle to the MLMediaDRM. |
MLMediaDRMProperty | property_name | The property to query. Standard property names are: |
* MLMediaDRMProperty_Vendor. * MLMediaDRMProperty_Version. * MLMediaDRMProperty_Description. * MLMediaDRMProperty_Algorithms. | | char ** |out_property_value|The property value upon successful return. Ownership is passed, call free(*out_property_value) to free it.|
Returns
MLResult | MLResult_InvalidParam | Parameter is invalid. |
MLResult | MLResult_Ok | MLMediaDRM property is retrieved successfully. |
MLResult | MLResult_UnspecifiedFailure | The operation failed with an unspecified error. |
Required Permissions:
- None
Deprecated since 1.4.0. Scheduled for removal.
MLMediaDRMGetPropertyByteArray
MLResult MLMediaDRMGetPropertyByteArray(
MLHandle media_drm,
MLMediaDRMProperty property_name,
MLMediaDRMByteArray * out_property_value
)