Skip to main content
Version: 21 Aug 2024

ml_media_error.h

Enums

Name
enumAnonymous Enum 19
{
MLResultAPIPrefix_MediaGeneric = ( 0xbf3b << 16)
}
enumMLMediaGenericResult
{
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
}
enumAnonymous Enum 20
{
MLResultAPIPrefix_Media = ( 0x4184 << 16)
}
enumMLMediaResult
{
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
}
enumAnonymous Enum 21
{
MLResultAPIPrefix_MediaDRM = ( 0x62ce << 16)
}
enumMLMediaDRMResult
{
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
}
enumAnonymous Enum 22
{
MLResultAPIPrefix_MediaOMX = ( 0x5f76 << 16),
MLResultAPIPrefix_MediaOMXExtensions = ( 0x11d9 << 16),
MLResultAPIPrefix_MediaOMXVendors = ( 0xe4d0 << 16)
}
enumAnonymous Enum 23
{
MLResultAPIPrefix_MediaPlayer = ( 0xc435 << 16)
}
enumMLMediaPlayerResult
{
MLMediaPlayerResult_ServerDied = MLResultAPIPrefix_MediaPlayer,
MLMediaPlayerResult_NotValidForProgressivePlayback,
MLMediaPlayerResult_Ensure32Bits = 0x7FFFFFFF
}

Functions

Name
const char *MLMediaResultGetString(MLResult code)
Translate a media error code into a human-readable string.

Enums Documentation

Anonymous Enum 19

EnumeratorValueDescription
MLResultAPIPrefix_MediaGeneric( 0xbf3b << 16)Defines the prefix for MLMediaGenericResult codes.

MLMediaGenericResult

EnumeratorValueDescription
MLMediaGenericResult_InvalidOperationMLResultAPIPrefix_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_Ensure32Bits0x7FFFFFFFEnsure enum is represented as 32 bits.

Generic return values for Multimedia API calls.


Anonymous Enum 20

EnumeratorValueDescription
MLResultAPIPrefix_Media( 0x4184 << 16)Defines the prefix for MLMediaResult codes.

MLMediaResult

EnumeratorValueDescription
MLMediaResult_AlreadyConnectedMLResultAPIPrefix_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_UnknownResourceUnknown Media Codec Resource Request Error.
MLMediaResult_InvalidResourceRequestInvalid Request on Media Codec Resources.
MLMediaResult_OnlyHWResourceAvailableOnly Hardware Media Codec Resources are available. This error code is a result of requesting for Software Media Codec Resource that is not available.
MLMediaResult_OnlySWResourceAvailableOnly Software Media Codec Resources are available. This error code is a result of requesting for Hardware Media Codec Resource that is not available.
MLMediaResult_NoMoreResourcesNo more (Hardware or Software) Media Codec Resources available.
MLMediaResult_NoMoreHWResourcesNo more Hardware Media Codec Resources available.
MLMediaResult_NoMoreSWResourcesNo more Software Media Codec Resources available.
MLMediaResult_InvalidCodecParamMedia 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_Ensure32Bits0x7FFFFFFFEnsure enum is represented as 32 bits.

Detailed return values for Multimedia API calls.


Anonymous Enum 21

EnumeratorValueDescription
MLResultAPIPrefix_MediaDRM( 0x62ce << 16)Defines the prefix for MLMediaDRMResult codes.

MLMediaDRMResult

EnumeratorValueDescription
MLMediaDRMResult_UnknownMLResultAPIPrefix_MediaDRMError code for undefined type.
MLMediaDRMResult_NoLicenseError code for no DRM license.
MLMediaDRMResult_LicenseExpiredError code for DRM license expired.
MLMediaDRMResult_SessionNotOpenedError code for DRM session not expired.
MLMediaDRMResult_DecryptUnitNotInitializedError code for DRM when decrypt unit is not initialized.
MLMediaDRMResult_DecryptError code for DRM when failed to decrypt data.
MLMediaDRMResult_CannotHandleError code for DRM can not handle the operation.
MLMediaDRMResult_TamperDetectError code for DRM when data is tampered.
MLMediaDRMResult_NotProvisionedError 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_DeviceRevokedError code for Device License Revoked.
MLMediaDRMResult_ResourceBusyError code if the MLMediaDRM operation fails when the required resources are in use.
MLMediaDRMResult_InsufficientOutputProtectionError code for insufficient output protection.
MLMediaDRMResult_LastUsedErrorCodeMLMediaDRMResult_InsufficientOutputProtection
MLMediaDRMResult_VendorMinMLResultAPIPrefix_MediaDRM + 500Range for vendor specific DRM errors.
MLMediaDRMResult_VendorMaxMLResultAPIPrefix_MediaDRM + 999
MLMediaDRMResult_Ensure32Bits0x7FFFFFFFEnsure enum is represented as 32 bits.

DRM related return values for Multimedia API calls.


Anonymous Enum 22

EnumeratorValueDescription
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

EnumeratorValueDescription
MLResultAPIPrefix_MediaPlayer( 0xc435 << 16)Defines the prefix for MLMediaPlayerResult codes.

MLMediaPlayerResult

EnumeratorValueDescription
MLMediaPlayerResult_ServerDiedMLResultAPIPrefix_MediaPlayerMedia errors (eg. Codec not supported).
MLMediaPlayerResult_NotValidForProgressivePlaybackRuntime errors.
MLMediaPlayerResult_Ensure32Bits0x7FFFFFFFEnsure 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

MLResultcodeError 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