ml_media_error.h
Enums
Functions
Name | |
---|---|
const char * | MLMediaResultGetString(MLResult code) Translate a media error code into a human-readable string. |
Enums Documentation
Anonymous Enum 19
Enumerator | Value | Description |
---|---|---|
MLResultAPIPrefix_MediaGeneric | ( 0xbf3b << 16) | Defines the prefix for MLMediaGenericResult codes. |
MLMediaGenericResult
Enumerator | Value | Description |
---|---|---|
MLMediaGenericResult_InvalidOperation | MLResultAPIPrefix_MediaGeneric | |
MLMediaGenericResult_BadType | ||
MLMediaGenericResult_NameNotFound | ||
MLMediaGenericResult_HandleNotFound | ||
MLMediaGenericResult_NoInit | ||
MLMediaGenericResult_AlreadyExists | ||
MLMediaGenericResult_DeadObject | ||
MLMediaGenericResult_FailedTransaction | ||
MLMediaGenericResult_BadIndex | ||
MLMediaGenericResult_NotEnoughData | ||
MLMediaGenericResult_WouldBlock | ||
MLMediaGenericResult_UnknownTransaction | ||
MLMediaGenericResult_FDSNotAllowed | ||
MLMediaGenericResult_UnexpectedNull | ||
MLMediaGenericResult_NotAvailable | ||
MLMediaGenericResult_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 bits. |
Generic return values for Multimedia API calls.
Anonymous Enum 20
Enumerator | Value | Description |
---|---|---|
MLResultAPIPrefix_Media | ( 0x4184 << 16) | Defines the prefix for MLMediaResult codes. |
MLMediaResult
Enumerator | Value | Description |
---|---|---|
MLMediaResult_AlreadyConnected | MLResultAPIPrefix_Media | |
MLMediaResult_NotConnected | ||
MLMediaResult_UnknownHost | ||
MLMediaResult_CannotConnect | ||
MLMediaResult_IO | ||
MLMediaResult_ConnectionLost | ||
MLMediaResult_Legacy1 | ||
MLMediaResult_Malformed | ||
MLMediaResult_OutOfRange | ||
MLMediaResult_BufferTooSmall | ||
MLMediaResult_Unsupported | ||
MLMediaResult_EndOfStream | ||
MLMediaResult_FormatChanged | ||
MLMediaResult_Discontinuity | ||
MLMediaResult_OutputBuffersChanged | ||
MLMediaResult_PermissionRevoked | ||
MLMediaResult_UnsupportedAudioFormat | ||
MLMediaResult_HeartbeatTerminateRequested | ||
MLMediaResult_UnknownResource | Unknown Media Codec Resource Request Error. | |
MLMediaResult_InvalidResourceRequest | Invalid Request on Media Codec Resources. | |
MLMediaResult_OnlyHWResourceAvailable | Only Hardware Media Codec Resources are available. This error code is a result of requesting for Software Media Codec Resource that is not available. | |
MLMediaResult_OnlySWResourceAvailable | Only Software Media Codec Resources are available. This error code is a result of requesting for Hardware Media Codec Resource that is not available. | |
MLMediaResult_NoMoreResources | No more (Hardware or Software) Media Codec Resources available. | |
MLMediaResult_NoMoreHWResources | No more Hardware Media Codec Resources available. | |
MLMediaResult_NoMoreSWResources | No more Software Media Codec Resources available. | |
MLMediaResult_InvalidCodecParam | Media Codec Resource request made with Invalid Codec parameters. This error code could be a result of one of these cases (not limited to): Requested video frame width or height is beyond the maximum resolution (width or height) supported. Requested Framerate/Sample rate/Bitratre/Channel count is not supported. | |
MLMediaResult_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 bits. |
Detailed return values for Multimedia API calls.
Anonymous Enum 21
Enumerator | Value | Description |
---|---|---|
MLResultAPIPrefix_MediaDRM | ( 0x62ce << 16) | Defines the prefix for MLMediaDRMResult codes. |
MLMediaDRMResult
Enumerator | Value | Description |
---|---|---|
MLMediaDRMResult_Unknown | MLResultAPIPrefix_MediaDRM | Error code for undefined type. |
MLMediaDRMResult_NoLicense | Error code for no DRM license. | |
MLMediaDRMResult_LicenseExpired | Error code for DRM license expired. | |
MLMediaDRMResult_SessionNotOpened | Error code for DRM session not expired. | |
MLMediaDRMResult_DecryptUnitNotInitialized | Error code for DRM when decrypt unit is not initialized. | |
MLMediaDRMResult_Decrypt | Error code for DRM when failed to decrypt data. | |
MLMediaDRMResult_CannotHandle | Error code for DRM can not handle the operation. | |
MLMediaDRMResult_TamperDetect | Error code for DRM when data is tampered. | |
MLMediaDRMResult_NotProvisioned | Error Code when an operation on a MLMediaDRM handle is attempted and the device does not have a certificate. The app should obtain and install a certificate using the MLMediaDRM provisioning methods then retry the operation. | |
MLMediaDRMResult_DeviceRevoked | Error code for Device License Revoked. | |
MLMediaDRMResult_ResourceBusy | Error code if the MLMediaDRM operation fails when the required resources are in use. | |
MLMediaDRMResult_InsufficientOutputProtection | Error code for insufficient output protection. | |
MLMediaDRMResult_LastUsedErrorCode | MLMediaDRMResult_InsufficientOutputProtection | |
MLMediaDRMResult_VendorMin | MLResultAPIPrefix_MediaDRM + 500 | Range for vendor specific DRM errors. |
MLMediaDRMResult_VendorMax | MLResultAPIPrefix_MediaDRM + 999 | |
MLMediaDRMResult_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 bits. |
DRM related return values for Multimedia API calls.
Anonymous Enum 22
Enumerator | Value | Description |
---|---|---|
MLResultAPIPrefix_MediaOMX | ( 0x5f76 << 16) | Defines the prefix for OMX specific error codes. |
MLResultAPIPrefix_MediaOMXExtensions | ( 0x11d9 << 16) | Defines the prefix for OMX extensions specific error codes. |
MLResultAPIPrefix_MediaOMXVendors | ( 0xe4d0 << 16) | Defines the prefix for OMX vendor specific error codes. |
Anonymous Enum 23
Enumerator | Value | Description |
---|---|---|
MLResultAPIPrefix_MediaPlayer | ( 0xc435 << 16) | Defines the prefix for MLMediaPlayerResult codes. |
MLMediaPlayerResult
Enumerator | Value | Description |
---|---|---|
MLMediaPlayerResult_ServerDied | MLResultAPIPrefix_MediaPlayer | Media errors (eg. Codec not supported). |
MLMediaPlayerResult_NotValidForProgressivePlayback | Runtime errors. | |
MLMediaPlayerResult_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 bits. |
Media player related return values for Multimedia API calls.
Functions Documentation
MLMediaResultGetString
const char * MLMediaResultGetString(
MLResult code
)
Translate a media error code into a human-readable string.
Parameters
MLResult | code | Error code to translate to a string. |
Required Permissions:
- None
Return: C-style ASCII string containing readable version of result code. Note that user should not keep a reference to the returned char pointer for future use as subsequent calls to MLMediaResultGetString will overwrite its content. Consequently, user must not explicitly free the returned pointer.
Source code
// %BANNER_BEGIN%
// ---------------------------------------------------------------------
// %COPYRIGHT_BEGIN%
// Copyright (c) 2017 Magic Leap, Inc. All Rights Reserved.
// Use of this file is governed by the Software License Agreement,
// located here: https://www.magicleap.com/software-license-agreement-ml2
// Terms and conditions applicable to third-party materials accompanying
// this distribution may also be found in the top-level NOTICE file
// appearing herein.
// %COPYRIGHT_END%
// ---------------------------------------------------------------------
// %BANNER_END%
#pragma once
#include "ml_api.h"
ML_EXTERN_C_BEGIN
enum {
MLResultAPIPrefix_MediaGeneric = MLRESULT_PREFIX(0xbf3b)
};
typedef enum MLMediaGenericResult {
MLMediaGenericResult_InvalidOperation = MLResultAPIPrefix_MediaGeneric,
MLMediaGenericResult_BadType,
MLMediaGenericResult_NameNotFound,
MLMediaGenericResult_HandleNotFound,
MLMediaGenericResult_NoInit,
MLMediaGenericResult_AlreadyExists,
MLMediaGenericResult_DeadObject,
MLMediaGenericResult_FailedTransaction,
MLMediaGenericResult_BadIndex,
MLMediaGenericResult_NotEnoughData,
MLMediaGenericResult_WouldBlock,
MLMediaGenericResult_UnknownTransaction,
MLMediaGenericResult_FDSNotAllowed,
MLMediaGenericResult_UnexpectedNull,
MLMediaGenericResult_NotAvailable,
MLMediaGenericResult_Ensure32Bits = 0x7FFFFFFF
} MLMediaGenericResult;
enum {
MLResultAPIPrefix_Media = MLRESULT_PREFIX(0x4184)
};
typedef enum MLMediaResult {
MLMediaResult_AlreadyConnected = MLResultAPIPrefix_Media,
MLMediaResult_NotConnected,
MLMediaResult_UnknownHost,
MLMediaResult_CannotConnect,
MLMediaResult_IO,
MLMediaResult_ConnectionLost,
MLMediaResult_Legacy1,
MLMediaResult_Malformed,
MLMediaResult_OutOfRange,
MLMediaResult_BufferTooSmall,
MLMediaResult_Unsupported,
MLMediaResult_EndOfStream,
MLMediaResult_FormatChanged,
MLMediaResult_Discontinuity,
MLMediaResult_OutputBuffersChanged,
MLMediaResult_PermissionRevoked,
MLMediaResult_UnsupportedAudioFormat,
MLMediaResult_HeartbeatTerminateRequested,
MLMediaResult_UnknownResource,
MLMediaResult_InvalidResourceRequest,
MLMediaResult_OnlyHWResourceAvailable,
MLMediaResult_OnlySWResourceAvailable,
MLMediaResult_NoMoreResources,
MLMediaResult_NoMoreHWResources,
MLMediaResult_NoMoreSWResources,
MLMediaResult_InvalidCodecParam,
MLMediaResult_Ensure32Bits = 0x7FFFFFFF
} MLMediaResult;
enum {
MLResultAPIPrefix_MediaDRM = MLRESULT_PREFIX(0x62ce)
};
typedef enum MLMediaDRMResult {
MLMediaDRMResult_Unknown = MLResultAPIPrefix_MediaDRM,
MLMediaDRMResult_NoLicense,
MLMediaDRMResult_LicenseExpired,
MLMediaDRMResult_SessionNotOpened,
MLMediaDRMResult_DecryptUnitNotInitialized,
MLMediaDRMResult_Decrypt,
MLMediaDRMResult_CannotHandle,
MLMediaDRMResult_TamperDetect,
MLMediaDRMResult_NotProvisioned,
MLMediaDRMResult_DeviceRevoked,
MLMediaDRMResult_ResourceBusy,
MLMediaDRMResult_InsufficientOutputProtection,
MLMediaDRMResult_LastUsedErrorCode = MLMediaDRMResult_InsufficientOutputProtection,
MLMediaDRMResult_VendorMin = MLResultAPIPrefix_MediaDRM + 500,
MLMediaDRMResult_VendorMax = MLResultAPIPrefix_MediaDRM + 999,
MLMediaDRMResult_Ensure32Bits = 0x7FFFFFFF
} MLMediaDRMResult;
enum {
MLResultAPIPrefix_MediaOMX = MLRESULT_PREFIX(0x5f76),
MLResultAPIPrefix_MediaOMXExtensions = MLRESULT_PREFIX(0x11d9),
MLResultAPIPrefix_MediaOMXVendors = MLRESULT_PREFIX(0xe4d0),
};
enum {
MLResultAPIPrefix_MediaPlayer = MLRESULT_PREFIX(0xc435),
};
typedef enum MLMediaPlayerResult {
MLMediaPlayerResult_ServerDied = MLResultAPIPrefix_MediaPlayer,
MLMediaPlayerResult_NotValidForProgressivePlayback,
MLMediaPlayerResult_Ensure32Bits = 0x7FFFFFFF
} MLMediaPlayerResult;
ML_DEPRECATED_MSG("Use standard Android SDK and NDK APIs.")
ML_API const char * ML_CALL MLMediaResultGetString(MLResult code);
ML_EXTERN_C_END