Skip to main content
Version: 22 May 2023

Camera Metadata

Enumeration definitions for the various metadata entries. More...

Classes

Name
structMLCameraMetadataRational

Types

Name
typedef struct MLCameraMetadataRationalMLCameraMetadataRational

Enums

Name
enumMLCameraMetadataColorCorrectionMode
{
MLCameraMetadataColorCorrectionMode_TransformMatrix = 0,
MLCameraMetadataColorCorrectionMode_Fast,
MLCameraMetadataColorCorrectionMode_HighQuality,
MLCameraMetadataColorCorrectionMode_Ensure32Bits = 0x7FFFFFFF
}
enumMLCameraMetadataColorCorrectionAberrationMode
{
MLCameraMetadataColorCorrectionAberrationMode_Off = 0,
MLCameraMetadataColorCorrectionAberrationMode_Fast,
MLCameraMetadataColorCorrectionAberrationMode_HighQuality,
MLCameraMetadataColorCorrectionAberrationMode_Ensure32Bits = 0x7FFFFFFF
}
enumMLCameraMetadataControlAEAntibandingMode
{
MLCameraMetadataControlAEAntibandingMode_Off = 0,
MLCameraMetadataControlAEAntibandingMode_50Hz,
MLCameraMetadataControlAEAntibandingMode_60Hz,
MLCameraMetadataControlAEAntibandingMode_Auto,
MLCameraMetadataControlAEAntibandingMode_Ensure32Bits = 0x7FFFFFFF
}
enumMLCameraMetadataControlAELock
{
MLCameraMetadataControlAELock_Off = 0,
MLCameraMetadataControlAELock_On,
MLCameraMetadataControlAELock_Ensure32Bits = 0x7FFFFFFF
}
enumMLCameraMetadataControlAEMode
{
MLCameraMetadataControlAEMode_Off = 0,
MLCameraMetadataControlAEMode_On,
MLCameraMetadataControlAEMode_Ensure32Bits = 0x7FFFFFFF
}
enumMLCameraMetadataControlAWBLock
{
MLCameraMetadataControlAWBLock_Off = 0,
MLCameraMetadataControlAWBLock_On,
MLCameraMetadataControlAWBLock_Ensure32Bits = 0x7FFFFFFF
}
enumMLCameraMetadataControlAWBMode
{
MLCameraMetadataControlAWBMode_Off = 0,
MLCameraMetadataControlAWBMode_Auto,
MLCameraMetadataControlAWBMode_Incandescent,
MLCameraMetadataControlAWBMode_Fluorescent,
MLCameraMetadataControlAWBMode_WarmFluorescent,
MLCameraMetadataControlAWBMode_Daylight,
MLCameraMetadataControlAWBMode_CloudyDaylight,
MLCameraMetadataControlAWBMode_Twilight,
MLCameraMetadataControlAWBMode_Shade,
MLCameraMetadataControlAWBMode_Ensure32Bits = 0x7FFFFFFF
}
enumMLCameraMetadataControlAFMode
{
MLCameraMetadataControlAFMode_Off = 0,
MLCameraMetadataControlAFMode_Auto,
MLCameraMetadataControlAFMode_Macro,
MLCameraMetadataControlAFMode_ContinuousVideo,
MLCameraMetadataControlAFMode_ContinuousPicture,
MLCameraMetadataControlAFMode_Ensure32Bits = 0x7FFFFFFF
}
enumMLCameraMetadataControlAFTrigger
{
MLCameraMetadataControlAFTrigger_Idle = 0,
MLCameraMetadataControlAFTrigger_Start,
MLCameraMetadataControlAFTrigger_Cancel,
MLCameraMetadataControlAFTrigger_Ensure32Bits = 0x7FFFFFFF
}
enumMLCameraMetadataControlMode
{
MLCameraMetadataControlMode_Off = 0,
MLCameraMetadataControlMode_Auto,
MLCameraMetadataControlMode_UseSceneMode,
MLCameraMetadataControlMode_OffKeepState,
MLCameraMetadataControlMode_Ensure32Bits = 0x7FFFFFFF
}
enumMLCameraMetadataControlSceneMode
{
MLCameraMetadataControlSceneMode_None = 0,
MLCameraMetadataControlSceneMode_Action = 2,
MLCameraMetadataControlSceneMode_Portrait = 3,
MLCameraMetadataControlSceneMode_Landscape = 4,
MLCameraMetadataControlSceneMode_Theatre = 7,
MLCameraMetadataControlSceneMode_Sports = 13,
MLCameraMetadataControlSceneMode_Party = 14,
MLCameraMetadataControlSceneMode_CandleLight = 15,
MLCameraMetadataControlSceneMode_Barcode = 16,
MLCameraMetadataControlSceneMode_Medical = 100,
MLCameraMetadataControlSceneMode_Ensure32Bits = 0x7FFFFFFF
}
enumMLCameraMetadataControlEffectMode
{
MLCameraMetadataControlEffectMode_Off = 0,
MLCameraMetadataControlEffectMode_Grayscale,
MLCameraMetadataControlEffectMode_Negative,
MLCameraMetadataControlEffectMode_Sepia,
MLCameraMetadataControlEffectMode_ColorSelection,
MLCameraMetadataControlEffectMode_Sharpening,
MLCameraMetadataControlEffectMode_Emboss,
MLCameraMetadataControlEffectMode_Sketch,
MLCameraMetadataControlEffectMode_Ensure32Bits = 0x7FFFFFFF
}
enumMLCameraMetadataControlAEState
{
MLCameraMetadataControlAEState_Inactive = 0,
MLCameraMetadataControlAEState_Searching,
MLCameraMetadataControlAEState_Converged,
MLCameraMetadataControlAEState_Locked,
MLCameraMetadataControlAEState_FlashRequired,
MLCameraMetadataControlAEState_PreCapture,
MLCameraMetadataControlAEState_Ensure32Bits = 0x7FFFFFFF
}
enumMLCameraMetadataControlAWBState
{
MLCameraMetadataControlAWBState_Inactive = 0,
MLCameraMetadataControlAWBState_Searching,
MLCameraMetadataControlAWBState_Converged,
MLCameraMetadataControlAWBState_Locked,
MLCameraMetadataControlAWBState_Ensure32Bits = 0x7FFFFFFF
}
enumMLCameraMetadataControlAFState
{
MLCameraMetadataControlAFState_Inactive = 0,
MLCameraMetadataControlAFState_PassiveScan,
MLCameraMetadataControlAFState_PassiveFocussed,
MLCameraMetadataControlAFState_ActiveScan,
MLCameraMetadataControlAFState_FocusedLocked,
MLCameraMetadataControlAFState_NotFocusedLocked,
MLCameraMetadataControlAFState_PassiveUnFocussed,
MLCameraMetadataControlAFState_Ensure32Bits = 0x7FFFFFFF
}
enumMLCameraMetadataControlAFSceneChange
{
MLCameraMetadataControlAFSceneChange_NotDetected = 0,
MLCameraMetadataControlAFSceneChange_Detected,
MLCameraMetadataControlAFSceneChange_Ensure32Bits = 0x7FFFFFFF
}
enumMLCameraMetadataLensState
{
MLCameraMetadataLensState_Stationary = 0,
MLCameraMetadataLensState_Moving,
MLCameraMetadataLensState_Ensure32Bits = 0x7FFFFFFF
}
enumMLCameraMetadataScalerAvailableFormats
{
MLCameraMetadataScalerAvailableFormats_RAW16 = 0x20,
MLCameraMetadataScalerAvailableFormats_RAW_OPAQUE = 0x24,
MLCameraMetadataScalerAvailableFormats_YV12 = 0x32315659,
MLCameraMetadataScalerAvailableFormats_YCrCb_420_SP = 0x11,
MLCameraMetadataScalerAvailableFormats_IMPLEMENTATION_DEFINED = 0x22,
MLCameraMetadataScalerAvailableFormats_YCbCr_420_888 = 0x23,
MLCameraMetadataScalerAvailableFormats_BLOB = 0x21,
MLCameraMetadataScalerAvailableFormats_Ensure32Bits = 0x7FFFFFFF
}
enumMLCameraMetadataScalerAvailableStreamConfigurations
{
MLCameraMetadataScalerAvailableStreamConfigurations_OUTPUT = 0,
MLCameraMetadataScalerAvailableStreamConfigurations_INPUT,
MLCameraMetadataScalerAvailableStreamConfigurations_Ensure32Bits = 0x7FFFFFFF
}
enumMLCameraMetadataJpegThumbnailSize
{
MLCameraMetadataJpegThumbnailSize_160x120 = 1,
MLCameraMetadataJpegThumbnailSize_240x135 = 2,
MLCameraMetadataJpegThumbnailSize_256x135 = 3,
MLCameraMetadataJpegThumbnailSize_Ensure32Bits = 0x7FFFFFFF
}
enumMLCameraMetadataControlForceApplyMode
{
MLCameraMetadataControlForceApplyMode_Off = 0,
MLCameraMetadataControlForceApplyMode_On = 1,
MLCameraMetadataControlForceApplyMode_Ensure32Bits = 0x7FFFFFFF
}

Functions

Name
MLResultMLCameraMetadataGetColorCorrectionAvailableAberrationModes(MLHandle characteristics_handle, MLCameraMetadataColorCorrectionAberrationMode * out_data, uint32_t out_count)
Gets color correction aberration modes.
MLResultMLCameraMetadataGetControlAEAvailableModes(MLHandle characteristics_handle, MLCameraMetadataControlAEMode * out_data, uint32_t out_count)
Gets auto-exposure modes.
MLResultMLCameraMetadataGetControlAEAvailableAntibandingModes(MLHandle characteristics_handle, MLCameraMetadataControlAEAntibandingMode * out_data, uint32_t out_count)
Gets anti-banding modes.
MLResultMLCameraMetadataGetControlAECompensationRange(MLHandle characteristics_handle, int32_t out_data[2])
Gets auto-exposure compensation range.
MLResultMLCameraMetadataGetControlAECompensationStep(MLHandle characteristics_handle, MLCameraMetadataRational * out_data)
Gets AE compensation step.
MLResultMLCameraMetadataGetControlAELockAvailable(MLHandle characteristics_handle, MLCameraMetadataControlAELock * out_data)
Gets AE lock.
MLResultMLCameraMetadataGetControlAEMaxRegions(MLHandle characteristics_handle, int32_t * out_data)
Gets AE Max Regions.
MLResultMLCameraMetadataGetControlAvailableModes(MLHandle characteristics_handle, MLCameraMetadataControlMode * out_data, uint32_t out_count)
Gets Available Modes.
MLResultMLCameraMetadataGetControlAWBAvailableModes(MLHandle characteristics_handle, MLCameraMetadataControlAWBMode * out_data, uint32_t out_count)
Gets AWB modes.
MLResultMLCameraMetadataGetControlAFAvailableModes(MLHandle characteristics_handle, MLCameraMetadataControlAFMode * out_data, uint32_t out_count)
Gets AF modes.
MLResultMLCameraMetadataGetControlAFMaxRegions(MLHandle characteristics_handle, int32_t * out_data)
Gets max number of AF regions supported.
MLResultMLCameraMetadataGetControlAvailableSceneModes(MLHandle characteristics_handle, MLCameraMetadataControlSceneMode * out_data, uint32_t out_count)
Gets Scene modes.
MLResultMLCameraMetadataGetControlAvailableEffectModes(MLHandle characteristics_handle, MLCameraMetadataControlEffectMode * out_data, uint32_t out_count)
Gets Effect modes.
MLResultMLCameraMetadataGetControlAWBLockAvailable(MLHandle characteristics_handle, MLCameraMetadataControlAWBLock * out_data)
Gets AWB lock.
MLResultMLCameraMetadataGetSensorInfoActiveArraySize(MLHandle characteristics_handle, int32_t out_data[4])
Gets sensor info active array sizes.
MLResultMLCameraMetadataGetSensorInfoSensitivityRange(MLHandle characteristics_handle, int32_t out_data[2])
Gets sensor info sensitivity range (Analog Gain).
MLResultMLCameraMetadataGetPostRawSensitivityBoostRange(MLHandle characteristics_handle, int32_t out_data[2])
Gets post raw sensitivity boost range (Digital Gain).
MLResultMLCameraMetadataGetLensInfoHyperfocalDistance(MLHandle characteristics_handle, float * out_data)
Gets lens hyperfocal distance.
MLResultMLCameraMetadataGetLensInfoMinimumFocusDistance(MLHandle characteristics_handle, float * out_data)
Gets lens minimum focus distance.
MLResultMLCameraMetadataGetLensInfoMinimumFocusDistanceIncrement(MLHandle characteristics_handle, float * out_data)
Gets lens minimum focus distance increment. The lens position can be set in multiples of distance increments between hyperfocal distance and minimum focus distance.
MLResultMLCameraMetadataGetSensorOrientation(MLHandle characteristics_handle, int32_t * out_data)
Gets sensor orientation degree.
MLResultMLCameraMetadataGetColorCorrectionModeRequestMetadata(MLHandle request_handle, MLCameraMetadataColorCorrectionMode * out_data)
Gets color correction mode.
MLResultMLCameraMetadataGetColorCorrectionTransformRequestMetadata(MLHandle request_handle, MLCameraMetadataRational out_data[3][3])
Gets color correction transform.
MLResultMLCameraMetadataGetColorCorrectionGainsRequestMetadata(MLHandle request_handle, float out_data[4])
Gets color correction gains.
MLResultMLCameraMetadataGetColorCorrectionAberrationModeRequestMetadata(MLHandle request_handle, MLCameraMetadataColorCorrectionAberrationMode * out_data)
Gets color correction aberration.
MLResultMLCameraMetadataGetControlAEAntibandingModeRequestMetadata(MLHandle request_handle, MLCameraMetadataControlAEAntibandingMode * out_data)
Gets AE antibanding mode.
MLResultMLCameraMetadataGetControlAEExposureCompensationRequestMetadata(MLHandle request_handle, int32_t * out_data)
Gets AE exposure compensation.
MLResultMLCameraMetadataGetControlAELockRequestMetadata(MLHandle request_handle, MLCameraMetadataControlAELock * out_data)
Gets AE lock.
MLResultMLCameraMetadataGetControlAEModeRequestMetadata(MLHandle request_handle, MLCameraMetadataControlAEMode * out_data)
Gets AE mode.
MLResultMLCameraMetadataGetControlAERegionsRequestMetadata(MLHandle request_handle, int32_t out_data[3][5], uint32_t * out_count)
Gets auto-exposure regions.
MLResultMLCameraMetadataGetControlAWBLockRequestMetadata(MLHandle request_handle, MLCameraMetadataControlAWBLock * out_data)
Gets AWB lock.
MLResultMLCameraMetadataGetControlAWBModeRequestMetadata(MLHandle request_handle, MLCameraMetadataControlAWBMode * out_data)
Gets AWB mode.
MLResultMLCameraMetadataGetControlAFModeRequestMetadata(MLHandle request_handle, MLCameraMetadataControlAFMode * out_data)
Gets AF mode.
MLResultMLCameraMetadataGetControlAFTriggerRequestMetadata(MLHandle request_handle, MLCameraMetadataControlAFTrigger * out_data)
Gets AF trigger.
MLResultMLCameraMetadataGetControlAFRegionsRequestMetadata(MLHandle request_handle, int32_t out_data[3][5], uint32_t * out_count)
Gets auto-focus regions.
MLResultMLCameraMetadataGetAFDistanceRangeRequestMetadata(MLHandle request_handle, float out_data[2])
Gets AF distance range. Both Min and Max are specified as focus distance in diopters. The min value specifies the lower bound for focus distance used by Autofocus algorithm and should be more than min focus distance which can be queried using MLCameraMetadataGetLensInfoMinimumFocusDistance. The max value specifies the upper bound for focus distance used by Autofocus algorithm and should be less than hyperfocal distance which can be queried using api MLCameraMetadataGetLensInfoHyperfocalDistance.
MLResultMLCameraMetadataGetLensFocusDistanceRequestMetadata(MLHandle request_handle, float * out_data)
Gets Lens focus distance in diopters. The distance is between minimum focus distance and hyperfocal distance.
MLResultMLCameraMetadataGetControlModeRequestMetadata(MLHandle request_handle, MLCameraMetadataControlMode * out_data)
Gets mode.
MLResultMLCameraMetadataGetControlSceneModeRequestMetadata(MLHandle request_handle, MLCameraMetadataControlSceneMode * out_data)
Gets Scene mode.
MLResultMLCameraMetadataGetSensorExposureTimeRequestMetadata(MLHandle request_handle, int64_t * out_data)
Gets sensor exposure time.
MLResultMLCameraMetadataGetSensorSensitivityRequestMetadata(MLHandle request_handle, int32_t * out_data)
Gets sensor sensitivity.
MLResultMLCameraMetadataGetPostRawSensitivityBoostRequestMetadata(MLHandle request_handle, int32_t * out_data)
Gets post raw sensitivity boost.
MLResultMLCameraMetadataGetControlEffectModeRequestMetadata(MLHandle request_handle, MLCameraMetadataControlEffectMode * out_data)
Effect mode.
MLResultMLCameraMetadataGetControlExposureUpperTimeLimitRequestMetadata(MLHandle request_handle, int64_t * out_data)
Gets exposure time upper limit.
MLResultMLCameraMetadataGetJpegGPSCoordinatesRequestMetadata(MLHandle request_handle, double out_data[3])
Gets JPEG GPS coordinates.
MLResultMLCameraMetadataGetJpegGPSTimestampRequestMetadata(MLHandle request_handle, int64_t * out_data)
Gets JPEG timestamp.
MLResultMLCameraMetadataGetJpegThumbnailSizeRequestMetadata(MLHandle request_handle, MLCameraMetadataJpegThumbnailSize * out_data)
Gets JPEG thumbnail size.
MLResultMLCameraMetadataGetJpegQualityRequestMetadata(MLHandle request_handle, uint8_t * out_data)
Gets JPEG quality.
MLResultMLCameraMetadataGetControlForceApplyModeRequestMetadata(MLHandle request_handle, MLCameraMetadataControlForceApplyMode * out_data)
Gets force apply mode. Main camera and CV Camera share the same camera hardware resources. When both the cameras are streaming, request metadata properties for both cameras are merged and then applied. While merging, the metadata properties from Main Camera take precedence over CV camera metadata properties. The force apply mode property can be used to override this. If CV Camera metadata has force apply mode on, the CV Camera metadata properties take precedence over Main Camera metadata properties.
MLResultMLCameraMetadataSetColorCorrectionMode(MLHandle request_handle, const MLCameraMetadataColorCorrectionMode * data)
Sets color correction mode.
MLResultMLCameraMetadataSetColorCorrectionTransform(MLHandle request_handle, const MLCameraMetadataRational data[3][3])
Sets color correction transform from RGB color space to output linear sRGB.
MLResultMLCameraMetadataSetColorCorrectionGains(MLHandle request_handle, const float data[4])
Sets color correction gains. The gains in the request metadata are the gains applied by the camera device.
MLResultMLCameraMetadataSetColorCorrectionAberrationMode(MLHandle request_handle, const MLCameraMetadataColorCorrectionAberrationMode * data)
Sets color correction chromatic aberration, minimizing chromatic artifacts that may occur.
MLResultMLCameraMetadataSetControlAEAntibandingMode(MLHandle request_handle, const MLCameraMetadataControlAEAntibandingMode * data)
Sets AE antiband mode.
MLResultMLCameraMetadataSetControlAEExposureCompensation(MLHandle request_handle, const int32_t * data)
Sets auto-exposure compensation.
MLResultMLCameraMetadataSetControlAELock(MLHandle request_handle, const MLCameraMetadataControlAELock * data)
Sets auto-exposure lock.
MLResultMLCameraMetadataSetControlAEMode(MLHandle request_handle, const MLCameraMetadataControlAEMode * data)
Sets auto-exposure mode. MLCameraMetadataControlAEMode_Off is not supported if camera is configured for 15FPS.
MLResultMLCameraMetadataSetControlAERegions(MLHandle request_handle, const int32_t data[3][5], const uint32_t count)
Sets auto-exposure regions.
MLResultMLCameraMetadataSetControlAWBLock(MLHandle request_handle, const MLCameraMetadataControlAWBLock * data)
Sets automatic white balance lock.
MLResultMLCameraMetadataSetControlAWBMode(MLHandle request_handle, const MLCameraMetadataControlAWBMode * data)
Sets AWB mode.
MLResultMLCameraMetadataSetControlAFMode(MLHandle request_handle, const MLCameraMetadataControlAFMode * data)
Sets AF mode.
MLResultMLCameraMetadataSetControlAFTrigger(MLHandle request_handle, const MLCameraMetadataControlAFTrigger * data)
Sets AF trigger.
MLResultMLCameraMetadataSetControlAFRegions(MLHandle request_handle, const int32_t data[3][5], const uint32_t count)
Sets auto-focus regions.
MLResultMLCameraMetadataSetAFDistanceRange(MLHandle request_handle, const float data[2])
Sets AF distance range. Both min and max are specified as focus distance in diopters. The min value specifies the lower bound for focus distance used by Autofocus algorithm and should be more than min focus distance which can be queried using MLCameraMetadataGetLensInfoMinimumFocusDistance. The max value specifies the upper bound for focus distance used by Autofocus algorithm and should be less than hyperfocal distance which can be queried using api MLCameraMetadataGetLensInfoHyperfocalDistance.
MLResultMLCameraMetadataSetLensFocusDistance(MLHandle request_handle, const float * data)
Sets Lens focus distance.
MLResultMLCameraMetadataSetControlMode(MLHandle request_handle, const MLCameraMetadataControlMode * data)
Sets mode.
MLResultMLCameraMetadataSetControlSceneMode(MLHandle request_handle, const MLCameraMetadataControlSceneMode * data)
Sets Scene mode.
MLResultMLCameraMetadataSetSensorExposureTime(MLHandle request_handle, const int64_t * data)
Sets sensor exposure time.
MLResultMLCameraMetadataSetSensorSensitivity(MLHandle request_handle, const int32_t * data)
Sets sensor sensitivity.
MLResultMLCameraMetadataSetPostRawSensitivityBoost(MLHandle request_handle, const int32_t * data)
Sets post raw sensitivity boost.
MLResultMLCameraMetadataSetControlEffectMode(MLHandle request_handle, const MLCameraMetadataControlEffectMode * data)
Sets Effect mode.
MLResultMLCameraMetadataSetControlExposureUpperTimeLimit(MLHandle request_handle, const int64_t * data)
Sets exposure time upper limit.
MLResultMLCameraMetadataSetJpegGPSCoordinates(MLHandle request_handle, const double data[3])
Sets JPEG GPS coordinates.
MLResultMLCameraMetadataSetJpegGPSTimestamp(MLHandle request_handle, const int64_t * data)
Sets JPEG timestamp.
MLResultMLCameraMetadataSetJpegThumbnailSize(MLHandle request_handle, const MLCameraMetadataJpegThumbnailSize * data)
Sets JPEG thumbnail size.
MLResultMLCameraMetadataSetJpegQuality(MLHandle request_handle, const uint8_t * data)
Sets JPEG quality.
MLResultMLCameraMetadataSetControlForceApplyMode(MLHandle request_handle, const MLCameraMetadataControlForceApplyMode * data)
Sets force apply mode. Main camera and CV Camera share the same camera hardware resources. When both the cameras are streaming, request metadata properties for both cameras are merged and then applied. While merging, the metadata properties from Main Camera take precedence over CV camera metadata properties. The force apply mode property can be used to override this. If CV Camera metadata has force apply mode on, the CV Camera metadata properties take precedence over Main Camera metadata properties.
MLResultMLCameraMetadataGetColorCorrectionModeResultMetadata(MLHandle result_handle, MLCameraMetadataColorCorrectionMode * out_data)
Gets color correction.
MLResultMLCameraMetadataGetColorCorrectionTransformResultMetadata(MLHandle result_handle, MLCameraMetadataRational out_data[3][3])
Gets color correction transform from RGB color space to output linear sRGB.
MLResultMLCameraMetadataGetColorCorrectionAberrationModeResultMetadata(MLHandle result_handle, MLCameraMetadataColorCorrectionAberrationMode * out_data)
Gets color correction aberration.
MLResultMLCameraMetadataGetColorCorrectionGainsResultMetadata(MLHandle result_handle, float out_data[4])
Gets color correction gains. The gains in the result metadata are the gains applied by the camera device to the current frame.
MLResultMLCameraMetadataGetControlAEAntibandingModeResultMetadata(MLHandle result_handle, MLCameraMetadataControlAEAntibandingMode * out_data)
Gets AE antibanding mode.
MLResultMLCameraMetadataGetControlAEExposureCompensationResultMetadata(MLHandle result_handle, int32_t * out_data)
Gets AE exposure compensation.
MLResultMLCameraMetadataGetControlAELockResultMetadata(MLHandle result_handle, MLCameraMetadataControlAELock * out_data)
Gets auto-exposure lock.
MLResultMLCameraMetadataGetControlAEModeResultMetadata(MLHandle result_handle, MLCameraMetadataControlAEMode * out_data)
Gets AE mode.
MLResultMLCameraMetadataGetControlAERegionsResultMetadata(MLHandle result_handle, int32_t out_data[3][5], uint32_t * out_count)
Gets auto-exposure regions.
MLResultMLCameraMetadataGetControlAETargetFPSRangeResultMetadata(MLHandle result_handle, int32_t out_data[2])
Gets auto-exposure target FPS range.
MLResultMLCameraMetadataGetControlAEStateResultMetadata(MLHandle result_handle, MLCameraMetadataControlAEState * out_data)
Gets AE state.
MLResultMLCameraMetadataGetControlAWBLockResultMetadata(MLHandle result_handle, MLCameraMetadataControlAWBLock * out_data)
Gets AWB lock.
MLResultMLCameraMetadataGetControlAWBStateResultMetadata(MLHandle result_handle, MLCameraMetadataControlAWBState * out_data)
Gets AWB state.
MLResultMLCameraMetadataGetControlAWBModeResultMetadata(MLHandle result_handle, MLCameraMetadataControlAWBMode * out_data)
Gets AWB mode.
MLResultMLCameraMetadataGetControlAFModeResultMetadata(MLHandle result_handle, MLCameraMetadataControlAFMode * out_data)
Gets AF mode.
MLResultMLCameraMetadataGetControlAFTriggerResultMetadata(MLHandle result_handle, MLCameraMetadataControlAFTrigger * out_data)
Gets AF trigger.
MLResultMLCameraMetadataGetControlAFRegionsResultMetadata(MLHandle result_handle, int32_t out_data[3][5], uint32_t * out_count)
Gets auto-focus regions.
MLResultMLCameraMetadataGetAFDistanceRangeResultMetadata(MLHandle result_handle, float out_data[2])
Gets AF distance range. Both Min and Max are specified as focus distance in diopters. The min value specifies the lower bound for focus distance used by Autofocus algorithm and should be more than min focus distance which can be queried using MLCameraMetadataGetLensInfoMinimumFocusDistance. The max value specifies the upper bound for focus distance used by Autofocus algorithm and should be less than hyperfocal distance which can be queried using API MLCameraMetadataGetLensInfoHyperfocalDistance.
MLResultMLCameraMetadataGetControlAFStateResultMetadata(MLHandle result_handle, MLCameraMetadataControlAFState * out_data)
Gets AF state.
MLResultMLCameraMetadataGetControlAFSceneChangeResultMetadata(MLHandle result_handle, MLCameraMetadataControlAFSceneChange * out_data)
Gets AF scene change detection status.
MLResultMLCameraMetadataGetLensFocusDistanceResultMetadata(MLHandle result_handle, float * out_data)
Gets Lens focus distance.
MLResultMLCameraMetadataGetLensStateResultMetadata(MLHandle result_handle, MLCameraMetadataLensState * out_data)
Get Lens state.
MLResultMLCameraMetadataGetControlModeResultMetadata(MLHandle result_handle, MLCameraMetadataControlMode * out_data)
Gets mode.
MLResultMLCameraMetadataGetControlSceneModeResultMetadata(MLHandle result_handle, MLCameraMetadataControlSceneMode * out_data)
Gets Scene mode.
MLResultMLCameraMetadataGetSensorExposureTimeResultMetadata(MLHandle result_handle, int64_t * out_data)
Gets sensor exposure time.
MLResultMLCameraMetadataGetSensorSensitivityResultMetadata(MLHandle result_handle, int32_t * out_data)
Gets sensor sensitivity.
MLResultMLCameraMetadataGetPostRawSensitivityBoostResultMetadata(MLHandle result_handle, int32_t * out_data)
Gets post raw sensitivity boost.
MLResultMLCameraMetadataGetSensorTimestampResultMetadata(MLHandle result_handle, int64_t * out_data)
Gets frame captured timestamp.
MLResultMLCameraMetadataGetSensorFrameDurationResultMetadata(MLHandle result_handle, int64_t * out_data)
Gets sensor frame duration.
MLResultMLCameraMetadataGetControlEffectModeResultMetadata(MLHandle result_handle, MLCameraMetadataControlEffectMode * out_data)
Gets Effect mode.
MLResultMLCameraMetadataGetControlExposureUpperTimeLimitResultMetadata(MLHandle result_handle, int64_t * out_data)
Gets exposure time upper limit.
MLResultMLCameraMetadataGetJpegGPSCoordinatesResultMetadata(MLHandle result_handle, double out_data[3])
Gets JPEG GPS coordinates.
MLResultMLCameraMetadataGetJpegGPSTimestampResultMetadata(MLHandle result_handle, int64_t * out_data)
Gets JPEG timestamp.
MLResultMLCameraMetadataGetJpegThumbnailSizeResultMetadata(MLHandle result_handle, MLCameraMetadataJpegThumbnailSize * out_data)
Gets JPEG thumbnail size.
MLResultMLCameraMetadataGetControlForceApplyModeResultMetadata(MLHandle result_handle, MLCameraMetadataControlForceApplyMode * out_data)
Gets force apply mode. Main camera and CV Camera share the same camera hardware resources. When both the cameras are streaming, request metadata properties for both cameras are merged and then applied. While merging, the metadata properties from Main Camera take precedence over CV camera metadata properties. The force apply mode property can be used to override this. If CV Camera metadata has force apply mode on, the CV Camera metadata properties take precedence over Main Camera metadata properties.
MLResultMLCameraMetadataGetJpegQualityResultMetadata(MLHandle result_handle, uint8_t * out_data)
Gets JPEG quality.

Detailed Description

Enumeration definitions for the various metadata entries.

APIs for getting/setting camera characteristic/request/result metadata. Main camera and CV Camera share the same camera hardware resources. It is recommended that applications try to use as much as possible the default metadata returned by MLCameraPrepareCapture otherwise metadata properties from one camera can affect the other. When both the cameras are streaming, request metadata properties for both cameras are merged and then applied. While merging, the metadata properties from Main Camera take precedence over CV camera except for metadata proprties for exposure upper time limit, JPEG gps timestamp, JPEG gps coordinates, JPEG quality and JPEG thumbnail size. The Force Apply mode setting can be used to override this. If CV Camera metadata have force apply mode on, the CV Camera metadata properties take precedence over Main Camera properties. The result metadata returned in MLCameraCaptureCallbacks can be used to check the actual metadata settings applied. For exposure upper time limit the lower of 2 values (Main Camera and CV Camera) are applied by default.If one of the cameras has force apply mode on the exposure upper time limit setting from that camera is applied. The JPEG gps timestamp , JPEG gps coordinates, JPEG quality and JPEG thumbnail size settings from one camera donot affect the other camera.

State Machine for Auto Focus for different Modes.

AutoFocus Mode Auto/MacroStateTransition CauseNew State
AFState_InactiveAFTrigger_StartAFState_ActiveScanStart AF scan, Lens now moving
AFState_ActiveScanCamera AF completes current scanAFState_FocussedLockedFocussed, Lens now locked
AFState_ActiveScanCamera AF fails current scanAFState_NotFocussedLockedNot focussed, Lens now locked
AFState_ActiveScanAFTrigger_CancelAFState_InactiveCancel/reset AF
AFState_FocussedLockedAFTrigger_CancelAFState_InactiveCancel/reset AF
AFState_FocussedLockedAFTrigger_StartAFState_ActiveScanRestart AF scan, Lens now moving
AFState_NotFocussedLockedAFTrigger_CancelAFState_InactiveCancel/reset AF
AFState_NotFocussedLockedAFTrigger_StartAFState_ActiveScanRestart AF scan, Lens now moving
AutoFocus Mode Continuous VideoStateTransition CauseNew State
AFState_PassiveScanCamera AF completes current scanAFState_PassiveFocussedEnd AF scan, Lens Focussed
AFState_PassiveScanCamera AF fails current scanAFState_PassiveUnFocussedEnd AF scan, Lens Not Focussed
AFState_PassiveScanAFTrigger_StartAFState_FocussedLockedImmediate transition, if focus is good, Lens now locked
AFState_PassiveScanAFTrigger_StartAFState_NotFocussedLockedImmediate transition, if focus is not good, Lens now locked
AFState_PassiveFocussedCamera AF initiates new scanAFState_PassiveScanRestart AF scan, Lens now moving
AFState_PassiveUnFocussedCamera AF initiates new scanAFState_PassiveScanRestart AF scan, Lens now moving
AFState_PassiveFocussedAFTrigger_StartAFState_FocussedLockedLens now locked and Focussed
AFState_PassiveUnFocussedAFTrigger_StartAFState_NotFocussedLockedLens now locked and Not Focussed
AFState_FocussedLockedAFTrigger_CancelAFState_PassiveScanRestart AF Scan, Lens now moving
AFState_NotFocussedLockedAFTrigger_CancelAFState_PassiveScanRestart AF Scan, Lens now moving
AutoFocus Mode Continuous PictureStateTransition CauseNew State
AFState_PassiveScanCamera AF completes current scanAFState_PassiveFocussedEnd AF scan, Lens Focussed
AFState_PassiveScanCamera AF fails current scanAFState_PassiveUnFocussedEnd AF scan, Lens Not Focussed
AFState_PassiveScanAFTrigger_StartAFState_FocussedLockedEventual transition once focus is good, Lens now locked
AFState_PassiveScanAFTrigger_StartAFState_NotFocussedLockedEventual transition if cannot find focus, Lens now locked
AFState_PassiveFocussedCamera AF initiates new scanAFState_PassiveScanRestart AF scan, Lens now moving
AFState_PassiveUnFocussedCamera AF initiates new scanAFState_PassiveScanRestart AF scan, Lens now moving
AFState_PassiveFocussedAFTrigger_StartAFState_FocussedLockedLens now locked and Focussed
AFState_PassiveUnFocussedAFTrigger_StartAFState_NotFocussedLockedLens now locked and Not Focussed
AFState_FocussedLockedAFTrigger_CancelAFState_PassiveScanRestart AF Scan, Lens now moving
AFState_NotFocussedLockedAFTrigger_CancelAFState_PassiveScanRestart AF Scan, Lens now moving

Stringify the error codes returned by these APIs, call MLMediaResultGetString.

Shared Object:

  • camera_metadata.magicleap*

Enums Documentation

MLCameraMetadataColorCorrectionMode

EnumeratorValueDescription
MLCameraMetadataColorCorrectionMode_TransformMatrix0Uses data provided by the High Quality or Fast method to provide a picture with the same white point as the previous frame.
MLCameraMetadataColorCorrectionMode_FastThe camera device will not slow down capture rate when applying color correction.
MLCameraMetadataColorCorrectionMode_HighQualityThe camera device will use the highest-quality color correction algorithm, at the expense of capture rate speed.
MLCameraMetadataColorCorrectionMode_Ensure32Bits0x7FFFFFFFEnsure enum is represented as 32 bits.

Color correction mode.


MLCameraMetadataColorCorrectionAberrationMode

EnumeratorValueDescription
MLCameraMetadataColorCorrectionAberrationMode_Off0No aberration correction is applied.
MLCameraMetadataColorCorrectionAberrationMode_FastThe camera device will not slow down capture rate when applying aberration correction.
MLCameraMetadataColorCorrectionAberrationMode_HighQualityThe camera device will use the highest-quality aberration correction algorithm, at the expense of capture rate speed.
MLCameraMetadataColorCorrectionAberrationMode_Ensure32Bits0x7FFFFFFFEnsure enum is represented as 32 bits.

Color correction aberration mode.


MLCameraMetadataControlAEAntibandingMode

EnumeratorValueDescription
MLCameraMetadataControlAEAntibandingMode_Off0AE antibanding is disabled.
MLCameraMetadataControlAEAntibandingMode_50Hz50Hz.
MLCameraMetadataControlAEAntibandingMode_60Hz60Hz.
MLCameraMetadataControlAEAntibandingMode_AutoAuto.
MLCameraMetadataControlAEAntibandingMode_Ensure32Bits0x7FFFFFFFEnsure enum is represented as 32 bits.

The list of auto-exposure (AE) antibanding modes. These controls prevent the appearance of vertical lines when capturing TV screens or monitors.


MLCameraMetadataControlAELock

EnumeratorValueDescription
MLCameraMetadataControlAELock_Off0Auto-exposure lock is disabled. The algorithm can update exposure parameters.
MLCameraMetadataControlAELock_OnAuto-exposure lock is enabled. The algorithm cannot update exposure parameters.
MLCameraMetadataControlAELock_Ensure32Bits0x7FFFFFFFEnsure enum is represented as 32 bits.

The current auto-exposure (AE) lockc controls.


MLCameraMetadataControlAEMode

EnumeratorValueDescription
MLCameraMetadataControlAEMode_Off0Disables the camera device's auto-exposure routine.
MLCameraMetadataControlAEMode_OnEnables the camera device's auto-exposure routine.
MLCameraMetadataControlAEMode_Ensure32Bits0x7FFFFFFFEnsure enum is represented as 32 bits.

The current auto-exposure (AE) mode controls.


MLCameraMetadataControlAWBLock

EnumeratorValueDescription
MLCameraMetadataControlAWBLock_Off0Disables the auto-white balance lock. AWB algorithm is free to update its parameters.
MLCameraMetadataControlAWBLock_OnEnables the auto-white balance lock. AWB algorithm cannot update its parameters.
MLCameraMetadataControlAWBLock_Ensure32Bits0x7FFFFFFFEnsure enum is represented as 32 bits.

Control AWB lock.


MLCameraMetadataControlAWBMode

EnumeratorValueDescription
MLCameraMetadataControlAWBMode_Off0Disables the camera device's auto-white balance routine.
MLCameraMetadataControlAWBMode_AutoSets the camera device's auto-white balance routine to automatic.
MLCameraMetadataControlAWBMode_IncandescentIncandescent light is assumed for the white balance. Auto-white balance is disabled. White balance transforms will approximately match the CIE standard illuminant A.
MLCameraMetadataControlAWBMode_FluorescentFluorescent light is assumed for the white balance. Auto-white balance is disabled. White balance transforms will approximately match the CIE standard illuminant F2.
MLCameraMetadataControlAWBMode_WarmFluorescentWarm fluorescent light is assumed for the white balance. Auto-white balance is disabled. White balance transforms will approximately match the CIE standard illuminant F4.
MLCameraMetadataControlAWBMode_DaylightDaylight light is assumed for the white balance. Auto-white balance is disabled. White balance transforms will approximately match the CIE standard illuminant D65.
MLCameraMetadataControlAWBMode_CloudyDaylightCloudy daylight is assumed for the white balance. Auto-white balance is disabled.
MLCameraMetadataControlAWBMode_TwilightTwilight light is assumed for the white balance. Auto-white balance is disabled.
MLCameraMetadataControlAWBMode_ShadeShade light is assumed for the white balance. Auto-white balance is disabled.
MLCameraMetadataControlAWBMode_Ensure32Bits0x7FFFFFFFEnsure enum is represented as 32 bits.

The current auto-white-balance (AWB) mode controls.


MLCameraMetadataControlAFMode

EnumeratorValueDescription
MLCameraMetadataControlAFMode_Off0Disables the camera device's auto-focus routine.
MLCameraMetadataControlAFMode_AutoSets the camera device's auto-focus routine to automatic.
MLCameraMetadataControlAFMode_MacroSets the camera device's auto-focus routine to close-up focusing mode.
MLCameraMetadataControlAFMode_ContinuousVideoSets the camera device's auto-focus routine to Continuous Video Mode. The focusing behavior should be suitable for good quality video recording.
MLCameraMetadataControlAFMode_ContinuousPictureSets the camera device's auto-focus routine to Continuous Picture Mode. The focusing behavior should be suitable for still image capture.
MLCameraMetadataControlAFMode_Ensure32Bits0x7FFFFFFFEnsure enum is represented as 32 bits.

The current auto-focus (AF) mode controls.


MLCameraMetadataControlAFTrigger

EnumeratorValueDescription
MLCameraMetadataControlAFTrigger_Idle0AF trigger is idle.
MLCameraMetadataControlAFTrigger_StartAF will trigger now.
MLCameraMetadataControlAFTrigger_CancelCancel any currently active AF trigger.
MLCameraMetadataControlAFTrigger_Ensure32Bits0x7FFFFFFFEnsure enum is represented as 32 bits.

The current auto-focus (AF) trigger.


MLCameraMetadataControlMode

EnumeratorValueDescription
MLCameraMetadataControlMode_Off0Disables control of the device's metering and focusing routines (3A).
MLCameraMetadataControlMode_AutoManual control of capture parameters is disabled.
MLCameraMetadataControlMode_UseSceneModeUse a specific scene mode. This setting is available only if scene mode is supported.
MLCameraMetadataControlMode_OffKeepStateSame as MLCameraMetadataControlMode_Off mode, except any statistics or state updates collected from manual captures will be discarded by the camera device.
MLCameraMetadataControlMode_Ensure32Bits0x7FFFFFFFEnsure enum is represented as 32 bits.

Overall control mode of the 3A (auto-white balance, auto-focus, auto-exposure) parameters.


MLCameraMetadataControlSceneMode

EnumeratorValueDescription
MLCameraMetadataControlSceneMode_None0Scene mode not used.
MLCameraMetadataControlSceneMode_Action2Action mode – optimized for photos of quickly moving objects.
MLCameraMetadataControlSceneMode_Portrait3Portrait mode – optimized for still photos of people.
MLCameraMetadataControlSceneMode_Landscape4Landscape mode – optimized for photos of distant macroscopic objects.
MLCameraMetadataControlSceneMode_Theatre7Theatre mode – ptimized for dim, indoor settings without flash.
MLCameraMetadataControlSceneMode_Sports13Sports mode – similar to Action mode, and optimized for photos of quickly moving people.
MLCameraMetadataControlSceneMode_Party14Party mode – optimized for dim, indoor settings with multiple moving people.
MLCameraMetadataControlSceneMode_CandleLight15CandleLight mode – optimized for extremely dim settings with a single light source.
MLCameraMetadataControlSceneMode_Barcode16Barcode mode. This mode is optimized for accurately capturing barcode images with the intent of processing the barcode value.
MLCameraMetadataControlSceneMode_Medical100Medical mode. This mode is optimized for brightly lit settings (100-200K lux) such as an operation theater.
MLCameraMetadataControlSceneMode_Ensure32Bits0x7FFFFFFFEnsure enum is represented as 32 bits.

Scene mode.


MLCameraMetadataControlEffectMode

EnumeratorValueDescription
MLCameraMetadataControlEffectMode_Off0Off.
MLCameraMetadataControlEffectMode_GrayscaleGrayScale – maps the image into grayscale colors.
MLCameraMetadataControlEffectMode_NegativeNegative – inverts the colors of the image.
MLCameraMetadataControlEffectMode_SepiaSepia – maps the image into warm gray, red, and brown tones.
MLCameraMetadataControlEffectMode_ColorSelectionColorSelection.
MLCameraMetadataControlEffectMode_SharpeningSharpening – emphasises the edges of adjacent areas with tonal contrast to one another.
MLCameraMetadataControlEffectMode_EmbossEmboss – applies an emboss filter, replacing each pixel with shadow or highlight depending on its light or dark boundaries.
MLCameraMetadataControlEffectMode_SketchSketch.
MLCameraMetadataControlEffectMode_Ensure32Bits0x7FFFFFFFEnsure enum is represented as 32 bits.

Effect mode. Applies color effects.


MLCameraMetadataControlAEState

EnumeratorValueDescription
MLCameraMetadataControlAEState_Inactive0AE is off or recently reset. The camera device begins in this mode. Device may fail to report this state.
MLCameraMetadataControlAEState_SearchingAE does not yet have a good set of control values for the current scene. Device may fail to report this state.
MLCameraMetadataControlAEState_ConvergedAE has a good set of control values for the current scene.
MLCameraMetadataControlAEState_LockedAE is locked.
MLCameraMetadataControlAEState_FlashRequiredAE has a good set of control values, but flash is required for good quality still capture.
MLCameraMetadataControlAEState_PreCaptureAE has been asked to do a precapture sequence and is currently executing it. Once this mode is complete, AE will transition to MLCameraMetadataControlAEState_Converged or MLCameraMetadataControlAEState_FlashRequired.
MLCameraMetadataControlAEState_Ensure32Bits0x7FFFFFFFEnsure enum is represented as 32 bits.

Currents state of auto-exposure (AE) controls.


MLCameraMetadataControlAWBState

EnumeratorValueDescription
MLCameraMetadataControlAWBState_Inactive0AWB is in not in automatic mode or has not yet started metering. The camera device begins in this mode. Device may fail to report this state.
MLCameraMetadataControlAWBState_SearchingAWB does not yet have a good set of control values for the current scene. Device may fail to report this state.
MLCameraMetadataControlAWBState_ConvergedAWB has a good set of control values for the current scene.
MLCameraMetadataControlAWBState_LockedAWB is locked.
MLCameraMetadataControlAWBState_Ensure32Bits0x7FFFFFFFEnsure enum is represented as 32 bits.

Current state of auto-white-balance (AWB) controls.


MLCameraMetadataControlAFState

EnumeratorValueDescription
MLCameraMetadataControlAFState_Inactive0AF is off or has not yet tried to scan.
MLCameraMetadataControlAFState_PassiveScanAF is currently performing an AF scan initiated by the camera device in a continuous autofocus mode.
MLCameraMetadataControlAFState_PassiveFocussedAF currently is in focus, but may restart scanning at any time.
MLCameraMetadataControlAFState_ActiveScanAF is performing an AF scan triggered by AF trigger.
MLCameraMetadataControlAFState_FocusedLockedAF is focused correctly and has locked focus.
MLCameraMetadataControlAFState_NotFocusedLockedAF has failed to focus successfully and has locked focus.
MLCameraMetadataControlAFState_PassiveUnFocussedAF finished a passive scan without finding focus,and may restart scanning at any time.
MLCameraMetadataControlAFState_Ensure32Bits0x7FFFFFFFEnsure enum is represented as 32 bits.

Current state of auto-focus (AF) routine.


MLCameraMetadataControlAFSceneChange

EnumeratorValueDescription
MLCameraMetadataControlAFSceneChange_NotDetected0No scene change detected by AF.
MLCameraMetadataControlAFSceneChange_DetectedScene change detected by AF.
MLCameraMetadataControlAFSceneChange_Ensure32Bits0x7FFFFFFFEnsure enum is represented as 32 bits.

Whether a significant scene change is detected by AF algorithm.


MLCameraMetadataLensState

EnumeratorValueDescription
MLCameraMetadataLensState_Stationary0Lens focal length is not changing.
MLCameraMetadataLensState_MovingLens focal length is changing.
MLCameraMetadataLensState_Ensure32Bits0x7FFFFFFFEnsure enum is represented as 32 bits.

Current Lens status.


MLCameraMetadataScalerAvailableFormats

EnumeratorValueDescription
MLCameraMetadataScalerAvailableFormats_RAW160x20Raw16.
MLCameraMetadataScalerAvailableFormats_RAW_OPAQUE0x24Raw opaque.
MLCameraMetadataScalerAvailableFormats_YV120x32315659TV12.
MLCameraMetadataScalerAvailableFormats_YCrCb_420_SP0x11YCrCb 420 SP.
MLCameraMetadataScalerAvailableFormats_IMPLEMENTATION_DEFINED0x22Implementation defined.
MLCameraMetadataScalerAvailableFormats_YCbCr_420_8880x23YCrCb 420 888.
MLCameraMetadataScalerAvailableFormats_BLOB0x21BLOB.
MLCameraMetadataScalerAvailableFormats_Ensure32Bits0x7FFFFFFFEnsure enum is represented as 32 bits.

Scaler available formats.


MLCameraMetadataScalerAvailableStreamConfigurations

EnumeratorValueDescription
MLCameraMetadataScalerAvailableStreamConfigurations_OUTPUT0Output.
MLCameraMetadataScalerAvailableStreamConfigurations_INPUTInput.
MLCameraMetadataScalerAvailableStreamConfigurations_Ensure32Bits0x7FFFFFFFEnsure enum is represented as 32 bits.

The available stream configurations .


MLCameraMetadataJpegThumbnailSize

EnumeratorValueDescription
MLCameraMetadataJpegThumbnailSize_160x1201160x120.
MLCameraMetadataJpegThumbnailSize_240x1352240x135.
MLCameraMetadataJpegThumbnailSize_256x1353256x135.
MLCameraMetadataJpegThumbnailSize_Ensure32Bits0x7FFFFFFFEnsure enum is represented as 32 bits.

JPEG Thumbnail Size.


MLCameraMetadataControlForceApplyMode

EnumeratorValueDescription
MLCameraMetadataControlForceApplyMode_Off0Off.
MLCameraMetadataControlForceApplyMode_On1On.
MLCameraMetadataControlForceApplyMode_Ensure32Bits0x7FFFFFFFEnsure enum is represented as 32 bits.

Force Apply Metadata Settings.


Types Documentation

MLCameraMetadataRational

typedef struct MLCameraMetadataRational MLCameraMetadataRational;

Rational data type.

More Info


Functions Documentation

MLCameraMetadataGetColorCorrectionAvailableAberrationModes

MLResult MLCameraMetadataGetColorCorrectionAvailableAberrationModes(
MLHandle characteristics_handle,
MLCameraMetadataColorCorrectionAberrationMode ** out_data,
uint32_t * out_count
)

Gets color correction aberration modes.

Parameters

MLHandlecharacteristics_handleCamera characteristic metadata handle acquired from MLCameraGetCameraCharacteristics.
MLCameraMetadataColorCorrectionAberrationMode **out_dataArray of aberration modes. The Library allocates and maintains the lifetime of the output data.
uint32_t *out_countNumber of output data elements.

Returns

MLResultMLResult_InvalidParamFailed to obtain color correction aberration modes due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained color correction aberration modes.
MLResultMLResult_UnspecifiedFailureFailed to obtain color correction aberration modes due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlAEAvailableModes

MLResult MLCameraMetadataGetControlAEAvailableModes(
MLHandle characteristics_handle,
MLCameraMetadataControlAEMode ** out_data,
uint32_t * out_count
)

Gets auto-exposure modes.

Parameters

MLHandlecharacteristics_handleCamera characteristic metadata handle acquired from MLCameraGetCameraCharacteristics.
MLCameraMetadataControlAEMode **out_dataArray of auto-exposure modes. The Library allocates and maintains the lifetime of the output data.
uint32_t *out_countNumber of output data elements.

Returns

MLResultMLResult_InvalidParamFailed to obtain AE modes due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained AE modes.
MLResultMLResult_UnspecifiedFailureFailed to obtain AE modes due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlAEAvailableAntibandingModes

MLResult MLCameraMetadataGetControlAEAvailableAntibandingModes(
MLHandle characteristics_handle,
MLCameraMetadataControlAEAntibandingMode ** out_data,
uint32_t * out_count
)

Gets anti-banding modes.

Parameters

MLHandlecharacteristics_handleCamera characteristic metadata handle acquired from MLCameraGetCameraCharacteristics.
MLCameraMetadataControlAEAntibandingMode **out_dataArray of anti-banding modes. The Library allocates and maintains the lifetime of the output data.
uint32_t *out_countNumber of output data elements.

Returns

MLResultMLResult_InvalidParamFailed to obtain AntiBanding modes due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained AntiBanding modes.
MLResultMLResult_UnspecifiedFailureFailed to obtain AntiBanding modes due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlAECompensationRange

MLResult MLCameraMetadataGetControlAECompensationRange(
MLHandle characteristics_handle,
int32_t out_data[2]
)

Gets auto-exposure compensation range.

Parameters

MLHandlecharacteristics_handleCamera characteristic metadata handle acquired from MLCameraGetCameraCharacteristics.
int32_tout_dataArray of min (1st) and max (2nd) of auto-exposure compensation. The adjustment is measured as a count of steps.

Returns

MLResultMLResult_InvalidParamFailed to obtain AE compensation range due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained AE compensation range.
MLResultMLResult_UnspecifiedFailureFailed to obtain AE compensation range due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlAECompensationStep

MLResult MLCameraMetadataGetControlAECompensationStep(
MLHandle characteristics_handle,
MLCameraMetadataRational * out_data
)

Gets AE compensation step.

Parameters

MLHandlecharacteristics_handleCamera characteristic metadata handle acquired from MLCameraGetCameraCharacteristics.
MLCameraMetadataRational *out_dataAE compensation step.

Returns

MLResultMLResult_InvalidParamFailed to obtain AE compensation step due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained AE compensation step.
MLResultMLResult_UnspecifiedFailureFailed to obtain AE compensation step due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlAELockAvailable

MLResult MLCameraMetadataGetControlAELockAvailable(
MLHandle characteristics_handle,
MLCameraMetadataControlAELock * out_data
)

Gets AE lock.

Parameters

MLHandlecharacteristics_handleCamera characteristic metadata handle acquired from MLCameraGetCameraCharacteristics.
MLCameraMetadataControlAELock *out_dataAE lock.

Returns

MLResultMLResult_InvalidParamFailed to obtain AE lock due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained AE lock.
MLResultMLResult_UnspecifiedFailureFailed to obtain AE lock due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlAEMaxRegions

MLResult MLCameraMetadataGetControlAEMaxRegions(
MLHandle characteristics_handle,
int32_t * out_data
)

Gets AE Max Regions.

Parameters

MLHandlecharacteristics_handleCamera characteristic metadata handle acquired from MLCameraGetCameraCharacteristics.
int32_t *out_dataNum AE Regions.

Returns

MLResultMLResult_InvalidParamFailed to obtain AE Max Regions due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained AE Max Regions.
MLResultMLResult_UnspecifiedFailureFailed to obtain AE Max Regions due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlAvailableModes

MLResult MLCameraMetadataGetControlAvailableModes(
MLHandle characteristics_handle,
MLCameraMetadataControlMode ** out_data,
uint32_t * out_count
)

Gets Available Modes.

Parameters

MLHandlecharacteristics_handleCamera characteristic metadata handle acquired from MLCameraGetCameraCharacteristics.
MLCameraMetadataControlMode **out_dataArray of modes. The Library allocates and maintains the lifetime of the output data.
uint32_t *out_countNumber of output data elements.

Returns

MLResultMLResult_InvalidParamFailed to obtain Avaialble Modes due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained Available Modes.
MLResultMLResult_UnspecifiedFailureFailed to obtain Available Modes due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlAWBAvailableModes

MLResult MLCameraMetadataGetControlAWBAvailableModes(
MLHandle characteristics_handle,
MLCameraMetadataControlAWBMode ** out_data,
uint32_t * out_count
)

Gets AWB modes.

Parameters

MLHandlecharacteristics_handleCamera characteristic metadata handle acquired from MLCameraGetCameraCharacteristics.
MLCameraMetadataControlAWBMode **out_dataArray of AWB modes. The Library allocates and maintains the lifetime of the output data.
uint32_t *out_countNumber of output data elements.

Returns

MLResultMLResult_InvalidParamFailed to obtain AWB modes due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained AWB modes.
MLResultMLResult_UnspecifiedFailureFailed to obtain AWB modes due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlAFAvailableModes

MLResult MLCameraMetadataGetControlAFAvailableModes(
MLHandle characteristics_handle,
MLCameraMetadataControlAFMode ** out_data,
uint32_t * out_count
)

Gets AF modes.

Parameters

MLHandlecharacteristics_handleCamera characteristic metadata handle acquired from MLCameraGetCameraCharacteristics.
MLCameraMetadataControlAFMode **out_dataArray of AF modes. The Library allocates and maintains the lifetime of the output data.
uint32_t *out_countNumber of output data elements.

Returns

MLResultMLResult_InvalidParamFailed to obtain AF modes due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained AF modes.
MLResultMLResult_UnspecifiedFailureFailed to obtain AF modes due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlAFMaxRegions

MLResult MLCameraMetadataGetControlAFMaxRegions(
MLHandle characteristics_handle,
int32_t * out_data
)

Gets max number of AF regions supported.

Parameters

MLHandlecharacteristics_handleCamera characteristic metadata handle acquired from MLCameraGetCameraCharacteristics.
int32_t *out_dataNum AF Regions.

Returns

MLResultMLResult_InvalidParamFailed to obtain AF Max Regions due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained AF Max Regions.
MLResultMLResult_UnspecifiedFailureFailed to obtain AF Max Regions due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlAvailableSceneModes

MLResult MLCameraMetadataGetControlAvailableSceneModes(
MLHandle characteristics_handle,
MLCameraMetadataControlSceneMode ** out_data,
uint32_t * out_count
)

Gets Scene modes.

Parameters

MLHandlecharacteristics_handleCamera characteristic metadata handle acquired from MLCameraGetCameraCharacteristics.
MLCameraMetadataControlSceneMode **out_dataArray of Scene modes. The Library allocates and maintains the lifetime of the output data.
uint32_t *out_countNumber of output data elements.

Returns

MLResultMLResult_InvalidParamFailed to obtain Scene modes due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained Scene modes.
MLResultMLResult_UnspecifiedFailureFailed to obtain Scene modes due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlAvailableEffectModes

MLResult MLCameraMetadataGetControlAvailableEffectModes(
MLHandle characteristics_handle,
MLCameraMetadataControlEffectMode ** out_data,
uint32_t * out_count
)

Gets Effect modes.

Parameters

MLHandlecharacteristics_handleCamera characteristic metadata handle acquired from MLCameraGetCameraCharacteristics.
MLCameraMetadataControlEffectMode **out_dataArray of Effect modes. The Library allocates and maintains the lifetime of the output data.
uint32_t *out_countNumber of output data elements.

Returns

MLResultMLResult_InvalidParamFailed to obtain Effect modes due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained Effect modes.
MLResultMLResult_UnspecifiedFailureFailed to obtain Effect modes due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlAWBLockAvailable

MLResult MLCameraMetadataGetControlAWBLockAvailable(
MLHandle characteristics_handle,
MLCameraMetadataControlAWBLock * out_data
)

Gets AWB lock.

Parameters

MLHandlecharacteristics_handleCamera characteristic metadata handle acquired from MLCameraGetCameraCharacteristics.
MLCameraMetadataControlAWBLock *out_dataAWB lock.

Returns

MLResultMLResult_InvalidParamFailed to obtain AWB lock due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained AWB lock.
MLResultMLResult_UnspecifiedFailureFailed to obtain AWB lock due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetSensorInfoActiveArraySize

MLResult MLCameraMetadataGetSensorInfoActiveArraySize(
MLHandle characteristics_handle,
int32_t out_data[4]
)

Gets sensor info active array sizes.

Parameters

MLHandlecharacteristics_handleCamera characteristic metadata handle acquired from MLCameraGetCameraCharacteristics.
int32_tout_dataActive array size [left, top, right, bottom].

Returns

MLResultMLResult_InvalidParamFailed to obtain sensor info active array sizes due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained sensor info active array sizes.
MLResultMLResult_UnspecifiedFailureFailed to obtain sensor info active array sizes due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetSensorInfoSensitivityRange

MLResult MLCameraMetadataGetSensorInfoSensitivityRange(
MLHandle characteristics_handle,
int32_t out_data[2]
)

Gets sensor info sensitivity range (Analog Gain).

Parameters

MLHandlecharacteristics_handleCamera characteristic metadata handle acquired from MLCameraGetCameraCharacteristics.
int32_tout_dataSensor info sensitivity range[min, max].

Returns

MLResultMLResult_InvalidParamFailed to obtain sensor info sensitivity range due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained sensor info sensitivity range.
MLResultMLResult_UnspecifiedFailureFailed to obtain sensor info sensitivity range due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetPostRawSensitivityBoostRange

MLResult MLCameraMetadataGetPostRawSensitivityBoostRange(
MLHandle characteristics_handle,
int32_t out_data[2]
)

Gets post raw sensitivity boost range (Digital Gain).

Parameters

MLHandlecharacteristics_handleCamera characteristic metadata handle acquired from MLCameraGetCameraCharacteristics.
int32_tout_dataPost raw sensitivity boost range[min, max].

Returns

MLResultMLResult_InvalidParamFailed to obtain post raw sensitivity boost range due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained post raw sensitivity boost range.
MLResultMLResult_UnspecifiedFailureFailed to obtain post raw sensitivity boost range due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetLensInfoHyperfocalDistance

MLResult MLCameraMetadataGetLensInfoHyperfocalDistance(
MLHandle characteristics_handle,
float * out_data
)

Gets lens hyperfocal distance.

Parameters

MLHandlecharacteristics_handleCamera characteristic metadata handle acquired from MLCameraGetCameraCharacteristics.
float *out_dataLens hyperfocal distance in diopters.

Returns

MLResultMLResult_InvalidParamFailed to obtain hyperfocal distance due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained hyperfocal distance.
MLResultMLResult_UnspecifiedFailureFailed to obtain hyperfocal distance due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetLensInfoMinimumFocusDistance

MLResult MLCameraMetadataGetLensInfoMinimumFocusDistance(
MLHandle characteristics_handle,
float * out_data
)

Gets lens minimum focus distance.

Parameters

MLHandlecharacteristics_handleCamera characteristic metadata handle acquired from MLCameraGetCameraCharacteristics.
float *out_dataMinimum focus distance in diopters.

Returns

MLResultMLResult_InvalidParamFailed to obtain minimum focus distance due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained minimum focus distance.
MLResultMLResult_UnspecifiedFailureFailed to obtain minimum focus distance due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetLensInfoMinimumFocusDistanceIncrement

MLResult MLCameraMetadataGetLensInfoMinimumFocusDistanceIncrement(
MLHandle characteristics_handle,
float * out_data
)

Gets lens minimum focus distance increment. The lens position can be set in multiples of distance increments between hyperfocal distance and minimum focus distance.

Parameters

MLHandlecharacteristics_handleCamera characteristic metadata handle acquired from MLCameraGetCameraCharacteristics.
float *out_dataMinimum focus distance increment in diopters.

Returns

MLResultMLResult_InvalidParamFailed to obtain minimum focus distance increment due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained minimum focus distance increment.
MLResultMLResult_UnspecifiedFailureFailed to obtain minimum focus distance increment due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetSensorOrientation

MLResult MLCameraMetadataGetSensorOrientation(
MLHandle characteristics_handle,
int32_t * out_data
)

Gets sensor orientation degree.

Parameters

MLHandlecharacteristics_handleCamera characteristic metadata handle acquired from MLCameraGetCameraCharacteristics.
int32_t *out_dataSensor orientation degree.

Returns

MLResultMLResult_InvalidParamFailed to obtain sensor orientation degree due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained sensor orientation degree.
MLResultMLResult_UnspecifiedFailureFailed to obtain sensor orientation degree due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetColorCorrectionModeRequestMetadata

MLResult MLCameraMetadataGetColorCorrectionModeRequestMetadata(
MLHandle request_handle,
MLCameraMetadataColorCorrectionMode * out_data
)

Gets color correction mode.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
MLCameraMetadataColorCorrectionMode *out_dataColor correction mode.

Returns

MLResultMLResult_InvalidParamFailed to obtain color correction mode due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained color correction mode.
MLResultMLResult_UnspecifiedFailureFailed to obtain color correction mode due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetColorCorrectionTransformRequestMetadata

MLResult MLCameraMetadataGetColorCorrectionTransformRequestMetadata(
MLHandle request_handle,
MLCameraMetadataRational out_data[3][3]
)

Gets color correction transform.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
MLCameraMetadataRationalout_data3x3 color correction transform.

Returns

MLResultMLResult_InvalidParamFailed to obtain color correction transform due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained color correction transform.
MLResultMLResult_UnspecifiedFailureFailed to obtain color correction transform due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetColorCorrectionGainsRequestMetadata

MLResult MLCameraMetadataGetColorCorrectionGainsRequestMetadata(
MLHandle request_handle,
float out_data[4]
)

Gets color correction gains.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
floatout_dataColor correction gains.

Returns

MLResultMLResult_InvalidParamFailed to obtain color correction gains due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained color correction gains.
MLResultMLResult_UnspecifiedFailureFailed to obtain color correction gains due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetColorCorrectionAberrationModeRequestMetadata

MLResult MLCameraMetadataGetColorCorrectionAberrationModeRequestMetadata(
MLHandle request_handle,
MLCameraMetadataColorCorrectionAberrationMode * out_data
)

Gets color correction aberration.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
MLCameraMetadataColorCorrectionAberrationMode *out_dataColor correction aberration.

Returns

MLResultMLResult_InvalidParamFailed to obtain color correction aberration due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained color correction aberration.
MLResultMLResult_UnspecifiedFailureFailed to obtain color correction aberration due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlAEAntibandingModeRequestMetadata

MLResult MLCameraMetadataGetControlAEAntibandingModeRequestMetadata(
MLHandle request_handle,
MLCameraMetadataControlAEAntibandingMode * out_data
)

Gets AE antibanding mode.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
MLCameraMetadataControlAEAntibandingMode *out_dataAE antibanding mode.

Returns

MLResultMLResult_InvalidParamFailed to obtain AE antibanding mode due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained AE antibanding mode.
MLResultMLResult_UnspecifiedFailureFailed to obtain AE antibanding mode due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlAEExposureCompensationRequestMetadata

MLResult MLCameraMetadataGetControlAEExposureCompensationRequestMetadata(
MLHandle request_handle,
int32_t * out_data
)

Gets AE exposure compensation.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
int32_t *out_dataExposure compensation value.

Returns

MLResultMLResult_InvalidParamFailed to obtain AE exposure compensation due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained AE exposure compensation.
MLResultMLResult_UnspecifiedFailureFailed to obtain AE exposure compensation due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlAELockRequestMetadata

MLResult MLCameraMetadataGetControlAELockRequestMetadata(
MLHandle request_handle,
MLCameraMetadataControlAELock * out_data
)

Gets AE lock.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
MLCameraMetadataControlAELock *out_dataAE Lock.

Returns

MLResultMLResult_InvalidParamFailed to obtain AE lock due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained AE lock.
MLResultMLResult_UnspecifiedFailureFailed to obtain AE lock due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlAEModeRequestMetadata

MLResult MLCameraMetadataGetControlAEModeRequestMetadata(
MLHandle request_handle,
MLCameraMetadataControlAEMode * out_data
)

Gets AE mode.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
MLCameraMetadataControlAEMode *out_dataAE mode.

Returns

MLResultMLResult_InvalidParamFailed to obtain AE mode due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained AE mode.
MLResultMLResult_UnspecifiedFailureFailed to obtain AE mode due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlAERegionsRequestMetadata

MLResult MLCameraMetadataGetControlAERegionsRequestMetadata(
MLHandle request_handle,
int32_t out_data[3][5],
uint32_t * out_count
)

Gets auto-exposure regions.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
int32_tout_dataAuto-exposure regions. Regions array of area_size x 5[xmin, ymin, xmax, ymax, weight]. Coordinates must be between [(0,0), (width, height)).
uint32_t *out_countNumber of auto-exposure regions.

Returns

MLResultMLResult_InvalidParamFailed to obtain AE regions due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained AE regions.
MLResultMLResult_UnspecifiedFailureFailed to obtain AE regions due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlAWBLockRequestMetadata

MLResult MLCameraMetadataGetControlAWBLockRequestMetadata(
MLHandle request_handle,
MLCameraMetadataControlAWBLock * out_data
)

Gets AWB lock.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
MLCameraMetadataControlAWBLock *out_dataAWB Lock.

Returns

MLResultMLResult_InvalidParamFailed to obtain AWB lock due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained AWB lock.
MLResultMLResult_UnspecifiedFailureFailed to obtain AWB lock due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlAWBModeRequestMetadata

MLResult MLCameraMetadataGetControlAWBModeRequestMetadata(
MLHandle request_handle,
MLCameraMetadataControlAWBMode * out_data
)

Gets AWB mode.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
MLCameraMetadataControlAWBMode *out_dataAWB mode.

Returns

MLResultMLResult_InvalidParamFailed to obtain AWB mode due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained AWB mode.
MLResultMLResult_UnspecifiedFailureFailed to obtain AWB mode due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlAFModeRequestMetadata

MLResult MLCameraMetadataGetControlAFModeRequestMetadata(
MLHandle request_handle,
MLCameraMetadataControlAFMode * out_data
)

Gets AF mode.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
MLCameraMetadataControlAFMode *out_dataAF mode.

Returns

MLResultMLResult_InvalidParamFailed to obtain AF mode due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained AF mode.
MLResultMLResult_UnspecifiedFailureFailed to obtain AF mode due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlAFTriggerRequestMetadata

MLResult MLCameraMetadataGetControlAFTriggerRequestMetadata(
MLHandle request_handle,
MLCameraMetadataControlAFTrigger * out_data
)

Gets AF trigger.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
MLCameraMetadataControlAFTrigger *out_dataAF trigger.

Returns

MLResultMLResult_InvalidParamFailed to obtain AF trigger due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained AF trigger.
MLResultMLResult_UnspecifiedFailureFailed to obtain AF trigger due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlAFRegionsRequestMetadata

MLResult MLCameraMetadataGetControlAFRegionsRequestMetadata(
MLHandle request_handle,
int32_t out_data[3][5],
uint32_t * out_count
)

Gets auto-focus regions.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
int32_tout_dataAuto-focus regions. Regions array of area_size x 5[xmin, ymin, xmax, ymax, weight]. Coordinates must be between [(0,0), (width, height)).
uint32_t *out_countNumber of auto-focus regions.

Returns

MLResultMLResult_InvalidParamFailed to obtain AF regions due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained AF regions.
MLResultMLResult_UnspecifiedFailureFailed to obtain AF regions due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetAFDistanceRangeRequestMetadata

MLResult MLCameraMetadataGetAFDistanceRangeRequestMetadata(
MLHandle request_handle,
float out_data[2]
)

Gets AF distance range. Both Min and Max are specified as focus distance in diopters. The min value specifies the lower bound for focus distance used by Autofocus algorithm and should be more than min focus distance which can be queried using MLCameraMetadataGetLensInfoMinimumFocusDistance. The max value specifies the upper bound for focus distance used by Autofocus algorithm and should be less than hyperfocal distance which can be queried using api MLCameraMetadataGetLensInfoHyperfocalDistance.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
floatout_dataAF distance range [min, max].

Returns

MLResultMLResult_InvalidParamFailed to obtain AF distance range due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained AF distance range.
MLResultMLResult_UnspecifiedFailureFailed to obtain AF distance range due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetLensFocusDistanceRequestMetadata

MLResult MLCameraMetadataGetLensFocusDistanceRequestMetadata(
MLHandle request_handle,
float * out_data
)

Gets Lens focus distance in diopters. The distance is between minimum focus distance and hyperfocal distance.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
float *out_dataLens focus distance.

Returns

MLResultMLResult_InvalidParamFailed to obtain Lens focus distance range due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained Lens focus distance range.
MLResultMLResult_UnspecifiedFailureFailed to obtain Lens focus distance range due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlModeRequestMetadata

MLResult MLCameraMetadataGetControlModeRequestMetadata(
MLHandle request_handle,
MLCameraMetadataControlMode * out_data
)

Gets mode.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
MLCameraMetadataControlMode *out_dataMode.

Returns

MLResultMLResult_InvalidParamFailed to obtain mode due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained mode.
MLResultMLResult_UnspecifiedFailureFailed to obtain mode due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlSceneModeRequestMetadata

MLResult MLCameraMetadataGetControlSceneModeRequestMetadata(
MLHandle request_handle,
MLCameraMetadataControlSceneMode * out_data
)

Gets Scene mode.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
MLCameraMetadataControlSceneMode *out_dataScene mode.

Returns

MLResultMLResult_InvalidParamFailed to obtain scene mode due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained scene mode.
MLResultMLResult_UnspecifiedFailureFailed to obtain scene mode due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetSensorExposureTimeRequestMetadata

MLResult MLCameraMetadataGetSensorExposureTimeRequestMetadata(
MLHandle request_handle,
int64_t * out_data
)

Gets sensor exposure time.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
int64_t *out_dataDuration each pixel is exposed to light in nanoseconds.

Returns

MLResultMLResult_InvalidParamFailed to obtain sensor exposure time due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained sensor exposure time.
MLResultMLResult_UnspecifiedFailureFailed to obtain sensor exposure time due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetSensorSensitivityRequestMetadata

MLResult MLCameraMetadataGetSensorSensitivityRequestMetadata(
MLHandle request_handle,
int32_t * out_data
)

Gets sensor sensitivity.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
int32_t *out_dataSensor sensitivity.

Returns

MLResultMLResult_InvalidParamFailed to obtain sensor sensitivity due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained sensor sensitivity.
MLResultMLResult_UnspecifiedFailureFailed to obtain sensor sensitivity due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetPostRawSensitivityBoostRequestMetadata

MLResult MLCameraMetadataGetPostRawSensitivityBoostRequestMetadata(
MLHandle request_handle,
int32_t * out_data
)

Gets post raw sensitivity boost.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
int32_t *out_dataPost raw sensitivity boost.

Returns

MLResultMLResult_InvalidParamFailed to obtain post raw sensitivity boost due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained post raw sensitivity boost.
MLResultMLResult_UnspecifiedFailureFailed to obtain post raw sensitivity boost due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlEffectModeRequestMetadata

MLResult MLCameraMetadataGetControlEffectModeRequestMetadata(
MLHandle request_handle,
MLCameraMetadataControlEffectMode * out_data
)

Effect mode.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
MLCameraMetadataControlEffectMode *out_dataEffect mode.

Returns

MLResultMLResult_InvalidParamFailed to obtain effect mode due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained effect mode.
MLResultMLResult_UnspecifiedFailureFailed to obtain effect mode due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlExposureUpperTimeLimitRequestMetadata

MLResult MLCameraMetadataGetControlExposureUpperTimeLimitRequestMetadata(
MLHandle request_handle,
int64_t * out_data
)

Gets exposure time upper limit.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
int64_t *out_dataExposure time upper limit for auto exposure algorithm.

Returns

MLResultMLResult_InvalidParamFailed to obtain exposure time upper limit due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained exposure time upper limit.
MLResultMLResult_UnspecifiedFailureFailed to obtain exposure time upperlimit due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetJpegGPSCoordinatesRequestMetadata

MLResult MLCameraMetadataGetJpegGPSCoordinatesRequestMetadata(
MLHandle request_handle,
double out_data[3]
)

Gets JPEG GPS coordinates.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
doubleout_dataJPEG GPS coordinates – latitude and longitude in degrees, altitude in meters.

Returns

MLResultMLResult_InvalidParamFailed to obtain JPEG GPS coordinates due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained JPEG GPS coordinates.
MLResultMLResult_UnspecifiedFailureFailed to obtain JPEG GPS coordinates due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetJpegGPSTimestampRequestMetadata

MLResult MLCameraMetadataGetJpegGPSTimestampRequestMetadata(
MLHandle request_handle,
int64_t * out_data
)

Gets JPEG timestamp.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
int64_t *out_dataJPEG timestamp in UNIX Epoch time (UTC in seconds since January 1, 1970).

Returns

MLResultMLResult_InvalidParamFailed to obtain JPEG timestamp due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained JPEG timestamp.
MLResultMLResult_UnspecifiedFailureFailed to obtain JPEG timestamp due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetJpegThumbnailSizeRequestMetadata

MLResult MLCameraMetadataGetJpegThumbnailSizeRequestMetadata(
MLHandle request_handle,
MLCameraMetadataJpegThumbnailSize * out_data
)

Gets JPEG thumbnail size.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
MLCameraMetadataJpegThumbnailSize *out_dataResolution of embedded JPEG thumbnail.

Returns

MLResultMLResult_InvalidParamFailed to obtain JPEG thumbnail size due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained JPEG thumbnail size.
MLResultMLResult_UnspecifiedFailureFailed to obtain JPEG thumbnail size due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetJpegQualityRequestMetadata

MLResult MLCameraMetadataGetJpegQualityRequestMetadata(
MLHandle request_handle,
uint8_t * out_data
)

Gets JPEG quality.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
uint8_t *out_dataCompression quality of JPEG thumbnail, with 100 being the highest quality, and 1 the lowest.

Returns

MLResultMLResult_InvalidParamFailed to obtain JPEG quality due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained JPEG quality.
MLResultMLResult_UnspecifiedFailureFailed to obtain JPEG quality due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlForceApplyModeRequestMetadata

MLResult MLCameraMetadataGetControlForceApplyModeRequestMetadata(
MLHandle request_handle,
MLCameraMetadataControlForceApplyMode * out_data
)

Gets force apply mode. Main camera and CV Camera share the same camera hardware resources. When both the cameras are streaming, request metadata properties for both cameras are merged and then applied. While merging, the metadata properties from Main Camera take precedence over CV camera metadata properties. The force apply mode property can be used to override this. If CV Camera metadata has force apply mode on, the CV Camera metadata properties take precedence over Main Camera metadata properties.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
MLCameraMetadataControlForceApplyMode *out_dataForce apply mode.

Returns

MLResultMLResult_InvalidParamFailed to obtain force apply mode due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained force apply mode.
MLResultMLResult_UnspecifiedFailureFailed to obtain force apply mode due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataSetColorCorrectionMode

MLResult MLCameraMetadataSetColorCorrectionMode(
MLHandle request_handle,
const MLCameraMetadataColorCorrectionMode * data
)

Sets color correction mode.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
const MLCameraMetadataColorCorrectionMode *dataColor correction mode.

Returns

MLResultMLResult_InvalidParamFailed to set color correction mode due to an invalid input parameter.
MLResultMLResult_OkSet color correction mode.
MLResultMLResult_UnspecifiedFailureFailed to set color correction mode due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataSetColorCorrectionTransform

MLResult MLCameraMetadataSetColorCorrectionTransform(
MLHandle request_handle,
const MLCameraMetadataRational data[3][3]
)

Sets color correction transform from RGB color space to output linear sRGB.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
const MLCameraMetadataRationaldataColor correction transform (3x3). Set all values to 0/1 to clear the data.

Returns

MLResultMLResult_InvalidParamFailed to set color correction transform due to an invalid input parameter.
MLResultMLResult_OkSet color correction transform.
MLResultMLResult_UnspecifiedFailureFailed to set color correction transform due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataSetColorCorrectionGains

MLResult MLCameraMetadataSetColorCorrectionGains(
MLHandle request_handle,
const float data[4]
)

Sets color correction gains. The gains in the request metadata are the gains applied by the camera device.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
const floatdataAn array of floats for 4 color channel color correction gains. Set all values to 0 to clear the data.

Returns

MLResultMLResult_InvalidParamFailed to set color correction gains due to an invalid input parameter.
MLResultMLResult_OkSet color correction gains.
MLResultMLResult_UnspecifiedFailureFailed to set color correction gains due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataSetColorCorrectionAberrationMode

MLResult MLCameraMetadataSetColorCorrectionAberrationMode(
MLHandle request_handle,
const MLCameraMetadataColorCorrectionAberrationMode * data
)

Sets color correction chromatic aberration, minimizing chromatic artifacts that may occur.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
const MLCameraMetadataColorCorrectionAberrationMode *dataColor correction aberration.

Returns

MLResultMLResult_InvalidParamFailed to set color correction aberration due to an invalid input parameter.
MLResultMLResult_OkSet color correction aberration.
MLResultMLResult_UnspecifiedFailureFailed to set color correction aberration due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataSetControlAEAntibandingMode

MLResult MLCameraMetadataSetControlAEAntibandingMode(
MLHandle request_handle,
const MLCameraMetadataControlAEAntibandingMode * data
)

Sets AE antiband mode.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
const MLCameraMetadataControlAEAntibandingMode *dataAE antibanding mode.

Returns

MLResultMLResult_InvalidParamFailed to set AE antiband mode due to an invalid input parameter.
MLResultMLResult_OkSet AE antiband mode.
MLResultMLResult_UnspecifiedFailureFailed to set AE antiband mode due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataSetControlAEExposureCompensation

MLResult MLCameraMetadataSetControlAEExposureCompensation(
MLHandle request_handle,
const int32_t * data
)

Sets auto-exposure compensation.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
const int32_t *dataExposure compensation value as a count of steps. If exposure compensation is set to 0, no exposure compensation will be applied.

Returns

MLResultMLResult_InvalidParamFailed to set AE exposure compensation due to an invalid input parameter.
MLResultMLResult_OkSet AE exposure compensation.
MLResultMLResult_UnspecifiedFailureFailed to set AE exposure compensation due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataSetControlAELock

MLResult MLCameraMetadataSetControlAELock(
MLHandle request_handle,
const MLCameraMetadataControlAELock * data
)

Sets auto-exposure lock.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
const MLCameraMetadataControlAELock *dataAuto-exposure Lock.

Returns

MLResultMLResult_InvalidParamFailed to set AE lock due to an invalid input parameter.
MLResultMLResult_OkSet AE lock.
MLResultMLResult_UnspecifiedFailureFailed to set AE lock due to an unknown error.

Required Permissions:

  • None

When auto-exposure is locked, the algorithm cannot update its parameters and adjust exposure times and sensitivity.

API Level:

  • 20

MLCameraMetadataSetControlAEMode

MLResult MLCameraMetadataSetControlAEMode(
MLHandle request_handle,
const MLCameraMetadataControlAEMode * data
)

Sets auto-exposure mode. MLCameraMetadataControlAEMode_Off is not supported if camera is configured for 15FPS.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
const MLCameraMetadataControlAEMode *dataAuto-exposure mode.

Returns

MLResultMLResult_InvalidParamFailed to set AE mode due to an invalid input parameter.
MLResultMLResult_OkSet AE mode.
MLResultMLResult_UnspecifiedFailureFailed to set AE mode due to an unknown error.
MLResultMLMediaGenericResult_InvalidOperationFailed to set AE Mode due to conflict between fps setting and AE Mode.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataSetControlAERegions

MLResult MLCameraMetadataSetControlAERegions(
MLHandle request_handle,
const int32_t data[3][5],
const uint32_t count
)

Sets auto-exposure regions.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
const int32_tdataAuto-exposure regions. Regions array of area_size x 5[xmin, ymin, xmax, ymax, weight] array with all zeros and count 1 clears the data. Coordinates must be between [(0,0), (width, height)). Max width, height can be obtained using MLCameraMetadataGetSensorInfoActiveArraySize. Weight for a region can be between [0,1000].For a region to be used its weight should be > 0. Weight is used to decide relative priority between multiple regions.
const uint32_tcountNumber of auto-exposure regions.

Returns

MLResultMLResult_InvalidParamFailed to set AE regions due to an invalid input parameter.
MLResultMLResult_OkSet AE regions.
MLResultMLResult_UnspecifiedFailureFailed to set AE regions due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataSetControlAWBLock

MLResult MLCameraMetadataSetControlAWBLock(
MLHandle request_handle,
const MLCameraMetadataControlAWBLock * data
)

Sets automatic white balance lock.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
const MLCameraMetadataControlAWBLock *dataAutomatic White Balance Lock.

Returns

MLResultMLResult_InvalidParamFailed to set AE target FPS range due to an invalid input parameter.
MLResultMLResult_OkSet automatic white balance lock.
MLResultMLResult_UnspecifiedFailureFailed to set automatic white balance lock due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataSetControlAWBMode

MLResult MLCameraMetadataSetControlAWBMode(
MLHandle request_handle,
const MLCameraMetadataControlAWBMode * data
)

Sets AWB mode.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
const MLCameraMetadataControlAWBMode *dataAWB mode.

Returns

MLResultMLResult_InvalidParamFailed to set AWB mode due to an invalid input parameter.
MLResultMLResult_OkSet AWB mode.
MLResultMLResult_UnspecifiedFailureFailed to set AWB mode due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataSetControlAFMode

MLResult MLCameraMetadataSetControlAFMode(
MLHandle request_handle,
const MLCameraMetadataControlAFMode * data
)

Sets AF mode.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
const MLCameraMetadataControlAFMode *dataAF mode.

Returns

MLResultMLResult_InvalidParamFailed to set AF mode due to an invalid input parameter.
MLResultMLResult_OkSuccessfully set AF mode.
MLResultMLResult_UnspecifiedFailureFailed to set AF mode due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataSetControlAFTrigger

MLResult MLCameraMetadataSetControlAFTrigger(
MLHandle request_handle,
const MLCameraMetadataControlAFTrigger * data
)

Sets AF trigger.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
const MLCameraMetadataControlAFTrigger *dataAF trigger.

Returns

MLResultMLResult_InvalidParamFailed to set AF trigger due to an invalid input parameter.
MLResultMLResult_OkSuccessfully set AF trigger.
MLResultMLResult_UnspecifiedFailureFailed to set AF trigger due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataSetControlAFRegions

MLResult MLCameraMetadataSetControlAFRegions(
MLHandle request_handle,
const int32_t data[3][5],
const uint32_t count
)

Sets auto-focus regions.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
const int32_tdataAuto-focus regions. Regions array of area_size x 5[xmin, ymin, xmax, ymax, weight]. Coordinates must be between [(0,0), (width, height)). Max width, height can be obtained using MLCameraMetadataGetSensorInfoActiveArraySize. Weight for a region can be between [0,1000]. For a region to be used its weight should be > 0. All regions with weight > 0 are treated as same priority.
const uint32_tcountNumber of auto-focus regions.

Returns

MLResultMLResult_InvalidParamFailed to set AF regions due to an invalid input parameter.
MLResultMLResult_OkSuccessfully set AF regions.
MLResultMLResult_UnspecifiedFailureFailed to set AF regions due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataSetAFDistanceRange

MLResult MLCameraMetadataSetAFDistanceRange(
MLHandle request_handle,
const float data[2]
)

Sets AF distance range. Both min and max are specified as focus distance in diopters. The min value specifies the lower bound for focus distance used by Autofocus algorithm and should be more than min focus distance which can be queried using MLCameraMetadataGetLensInfoMinimumFocusDistance. The max value specifies the upper bound for focus distance used by Autofocus algorithm and should be less than hyperfocal distance which can be queried using api MLCameraMetadataGetLensInfoHyperfocalDistance.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
const floatdataAF distance range [min, max].

Returns

MLResultMLResult_InvalidParamFailed to set AF distance range due to an invalid input parameter.
MLResultMLResult_OkSuccessfully set AF distance range.
MLResultMLResult_UnspecifiedFailureFailed to set AF distance range due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataSetLensFocusDistance

MLResult MLCameraMetadataSetLensFocusDistance(
MLHandle request_handle,
const float * data
)

Sets Lens focus distance.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
const float *dataLens focus distance.

Returns

MLResultMLResult_InvalidParamFailed to set Lens focus distance due to an invalid input parameter.
MLResultMLResult_OkSuccessfully set Lens focus distance.
MLResultMLResult_UnspecifiedFailureFailed to set Lens focus distance due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataSetControlMode

MLResult MLCameraMetadataSetControlMode(
MLHandle request_handle,
const MLCameraMetadataControlMode * data
)

Sets mode.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
const MLCameraMetadataControlMode *dataMode.

Returns

MLResultMLResult_InvalidParamFailed to set mode due to an invalid input parameter.
MLResultMLResult_OkSet mode.
MLResultMLResult_UnspecifiedFailureFailed to set mode due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataSetControlSceneMode

MLResult MLCameraMetadataSetControlSceneMode(
MLHandle request_handle,
const MLCameraMetadataControlSceneMode * data
)

Sets Scene mode.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
const MLCameraMetadataControlSceneMode *dataScene mode.

Returns

MLResultMLResult_InvalidParamFailed to set scene mode due to an invalid input parameter.
MLResultMLResult_OkSet scene mode.
MLResultMLResult_UnspecifiedFailureFailed to set scene mode due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataSetSensorExposureTime

MLResult MLCameraMetadataSetSensorExposureTime(
MLHandle request_handle,
const int64_t * data
)

Sets sensor exposure time.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
const int64_t *dataDuration each pixel is exposed to light in nanoseconds.

Returns

MLResultMLResult_InvalidParamFailed to set sensor exposure time due to an invalid input parameter.
MLResultMLResult_OkSet sensor exposure time.
MLResultMLResult_UnspecifiedFailureFailed to set sensor exposure time due to an unknown error.

Required Permissions:

  • None

Exposure time provided should be less than frame duration(1/framerate). If the sensor can't expose this exact duration, it will shorten the duration exposed to the nearest possible value.

API Level:

  • 20

MLCameraMetadataSetSensorSensitivity

MLResult MLCameraMetadataSetSensorSensitivity(
MLHandle request_handle,
const int32_t * data
)

Sets sensor sensitivity.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
const int32_t *dataSensor sensitivity.

Returns

MLResultMLResult_InvalidParamFailed to set sensor sensitivity due to an invalid input parameter.
MLResultMLResult_OkSet sensor sensitivity.
MLResultMLResult_UnspecifiedFailureFailed to set sensor sensitivity due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataSetPostRawSensitivityBoost

MLResult MLCameraMetadataSetPostRawSensitivityBoost(
MLHandle request_handle,
const int32_t * data
)

Sets post raw sensitivity boost.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
const int32_t *dataPost raw sensitivity boost.

Returns

MLResultMLResult_InvalidParamFailed to set post raw sensitivity boost due to an invalid input parameter.
MLResultMLResult_OkSet post raw sensitivity boost.
MLResultMLResult_UnspecifiedFailureFailed to set post raw sensitivity boost due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataSetControlEffectMode

MLResult MLCameraMetadataSetControlEffectMode(
MLHandle request_handle,
const MLCameraMetadataControlEffectMode * data
)

Sets Effect mode.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
const MLCameraMetadataControlEffectMode *dataEffect mode.

Returns

MLResultMLResult_InvalidParamFailed to set effect mode due to an invalid input parameter.
MLResultMLResult_OkSet effect mode.
MLResultMLResult_UnspecifiedFailureFailed to set effect mode due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataSetControlExposureUpperTimeLimit

MLResult MLCameraMetadataSetControlExposureUpperTimeLimit(
MLHandle request_handle,
const int64_t * data
)

Sets exposure time upper limit.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
const int64_t *dataExposure time upper limit. Null pointer will clear the data.

Returns

MLResultMLResult_InvalidParamFailed to set exposure time upper limit due to an invalid input parameter.
MLResultMLResult_OkSet exposure time upper limit.
MLResultMLResult_UnspecifiedFailureFailed to set exposure time upperlimit due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataSetJpegGPSCoordinates

MLResult MLCameraMetadataSetJpegGPSCoordinates(
MLHandle request_handle,
const double data[3]
)

Sets JPEG GPS coordinates.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
const doubledataJPEG GPS coordinates – latitude and longitude in degrees, altitude in meters.Null pointer will clear the data.

Returns

MLResultMLResult_InvalidParamFailed to set JPEG GPS coordinates due to an invalid input parameter.
MLResultMLResult_OkSet JPEG GPS coordinates.
MLResultMLResult_UnspecifiedFailureFailed to set JPEG GPS coordinates due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataSetJpegGPSTimestamp

MLResult MLCameraMetadataSetJpegGPSTimestamp(
MLHandle request_handle,
const int64_t * data
)

Sets JPEG timestamp.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
const int64_t *dataJPEG timestamp in UNIX Epoch time (UTC in seconds since January 1, 1970). Null pointer will clear the data.

Returns

MLResultMLResult_InvalidParamFailed to set JPEG timestamp due to an invalid input parameter.
MLResultMLResult_OkSet JPEG timestamp.
MLResultMLResult_UnspecifiedFailureFailed to set JPEG timestamp due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataSetJpegThumbnailSize

MLResult MLCameraMetadataSetJpegThumbnailSize(
MLHandle request_handle,
const MLCameraMetadataJpegThumbnailSize * data
)

Sets JPEG thumbnail size.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
const MLCameraMetadataJpegThumbnailSize *dataResolution of embedded JPEG thumbnail. Null pointer will prevent the inclusion of a thumbnail.

Returns

MLResultMLResult_InvalidParamFailed to set JPEG thumbnail size due to an invalid input parameter.
MLResultMLResult_OkSet JPEG thumbnail size.
MLResultMLResult_UnspecifiedFailureFailed to set JPEG thumbnail size due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataSetJpegQuality

MLResult MLCameraMetadataSetJpegQuality(
MLHandle request_handle,
const uint8_t * data
)

Sets JPEG quality.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
const uint8_t *dataCompression quality of JPEG thumbnail, with 100 being the highest quality, and 1 the lowest.

Returns

MLResultMLResult_InvalidParamFailed to set JPEG quality due to an invalid input parameter.
MLResultMLResult_OkSet JPEG quality.
MLResultMLResult_UnspecifiedFailureFailed to set JPEG quality due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataSetControlForceApplyMode

MLResult MLCameraMetadataSetControlForceApplyMode(
MLHandle request_handle,
const MLCameraMetadataControlForceApplyMode * data
)

Sets force apply mode. Main camera and CV Camera share the same camera hardware resources. When both the cameras are streaming, request metadata properties for both cameras are merged and then applied. While merging, the metadata properties from Main Camera take precedence over CV camera metadata properties. The force apply mode property can be used to override this. If CV Camera metadata has force apply mode on, the CV Camera metadata properties take precedence over Main Camera metadata properties.

Parameters

MLHandlerequest_handleCamera capture request metadata handle acquired from MLCameraPrepareCapture.
const MLCameraMetadataControlForceApplyMode *dataForce apply mode.

Returns

MLResultMLResult_InvalidParamFailed to set force apply mode due to an invalid input parameter.
MLResultMLResult_OkSuccessfully set force apply mode.
MLResultMLResult_UnspecifiedFailureFailed to set force apply mode due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetColorCorrectionModeResultMetadata

MLResult MLCameraMetadataGetColorCorrectionModeResultMetadata(
MLHandle result_handle,
MLCameraMetadataColorCorrectionMode * out_data
)

Gets color correction.

Parameters

MLHandleresult_handleCamera capture result metadata handle returned in MLCameraCaptureCallbacks.
MLCameraMetadataColorCorrectionMode *out_dataColor correction mode.

Returns

MLResultMLResult_InvalidParamFailed to obtain color correction due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained color correction.
MLResultMLResult_UnspecifiedFailureFailed to obtain color correction due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetColorCorrectionTransformResultMetadata

MLResult MLCameraMetadataGetColorCorrectionTransformResultMetadata(
MLHandle result_handle,
MLCameraMetadataRational out_data[3][3]
)

Gets color correction transform from RGB color space to output linear sRGB.

Parameters

MLHandleresult_handleCamera capture result metadata handle returned in MLCameraCaptureCallbacks.
MLCameraMetadataRationalout_data3x3 color correction transform matrix.

Returns

MLResultMLResult_InvalidParamFailed to obtain color correction transform due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained color correction transform.
MLResultMLResult_UnspecifiedFailureFailed to obtain color correction transform due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetColorCorrectionAberrationModeResultMetadata

MLResult MLCameraMetadataGetColorCorrectionAberrationModeResultMetadata(
MLHandle result_handle,
MLCameraMetadataColorCorrectionAberrationMode * out_data
)

Gets color correction aberration.

Parameters

MLHandleresult_handleCamera capture result metadata handle returned in MLCameraCaptureCallbacks.
MLCameraMetadataColorCorrectionAberrationMode *out_dataColor correction aberration mode.

Returns

MLResultMLResult_InvalidParamFailed to obtain color correction aberration due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained color correction aberration.
MLResultMLResult_UnspecifiedFailureFailed to obtain color correction aberration due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetColorCorrectionGainsResultMetadata

MLResult MLCameraMetadataGetColorCorrectionGainsResultMetadata(
MLHandle result_handle,
float out_data[4]
)

Gets color correction gains. The gains in the result metadata are the gains applied by the camera device to the current frame.

Parameters

MLHandleresult_handleCamera capture result metadata handle returned in MLCameraCaptureCallbacks.
floatout_dataAn array of floats for 4 color channel color correction gains.

Returns

MLResultMLResult_InvalidParamFailed to obtain color correction gains due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained color correction gains.
MLResultMLResult_UnspecifiedFailureFailed to obtain color correction gains due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlAEAntibandingModeResultMetadata

MLResult MLCameraMetadataGetControlAEAntibandingModeResultMetadata(
MLHandle result_handle,
MLCameraMetadataControlAEAntibandingMode * out_data
)

Gets AE antibanding mode.

Parameters

MLHandleresult_handleCamera capture result metadata handle returned in MLCameraCaptureCallbacks.
MLCameraMetadataControlAEAntibandingMode *out_dataAE antibanding mode.

Returns

MLResultMLResult_InvalidParamFailed to obtain AE antibanding mode due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained AE antibanding mode.
MLResultMLResult_UnspecifiedFailureFailed to obtain AE antibanding mode due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlAEExposureCompensationResultMetadata

MLResult MLCameraMetadataGetControlAEExposureCompensationResultMetadata(
MLHandle result_handle,
int32_t * out_data
)

Gets AE exposure compensation.

Parameters

MLHandleresult_handleCamera capture result metadata handle returned in MLCameraCaptureCallbacks.
int32_t *out_dataAE exposure compensation.

Returns

MLResultMLResult_InvalidParamFailed to obtain AE exposure compensation due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained AE exposure compensation.
MLResultMLResult_UnspecifiedFailureFailed to obtain AE exposure compensation due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlAELockResultMetadata

MLResult MLCameraMetadataGetControlAELockResultMetadata(
MLHandle result_handle,
MLCameraMetadataControlAELock * out_data
)

Gets auto-exposure lock.

Parameters

MLHandleresult_handleCamera capture result metadata handle returned in MLCameraCaptureCallbacks.
MLCameraMetadataControlAELock *out_dataAE lock.

Returns

MLResultMLResult_InvalidParamFailed to obtain AE lock due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained AE lock.
MLResultMLResult_UnspecifiedFailureFailed to obtain AE lock due to an unknown error.

Required Permissions:

  • None

When auto-exposure is locked, the algorithm cannot update its parameters and adjust exposure times and sensitivity.

API Level:

  • 20

MLCameraMetadataGetControlAEModeResultMetadata

MLResult MLCameraMetadataGetControlAEModeResultMetadata(
MLHandle result_handle,
MLCameraMetadataControlAEMode * out_data
)

Gets AE mode.

Parameters

MLHandleresult_handleCamera capture result metadata handle returned in MLCameraCaptureCallbacks.
MLCameraMetadataControlAEMode *out_dataAE control mode.

Returns

MLResultMLResult_InvalidParamFailed to obtain AE mode due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained AE mode.
MLResultMLResult_UnspecifiedFailureFailed to obtain AE mode due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlAERegionsResultMetadata

MLResult MLCameraMetadataGetControlAERegionsResultMetadata(
MLHandle result_handle,
int32_t out_data[3][5],
uint32_t * out_count
)

Gets auto-exposure regions.

Parameters

MLHandleresult_handleCamera capture result metadata handle returned in MLCameraCaptureCallbacks.
int32_tout_dataAuto-exposure regions. Regions array of area_size x 5[xmin, ymin, xmax, ymax, weight]. Coordinates must be between [(0,0), (width, height)).
uint32_t *out_countNumber of auto-exposure regions.

Returns

MLResultMLResult_InvalidParamFailed to obtain AE regions due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained AE regions.
MLResultMLResult_UnspecifiedFailureFailed to obtain AE regions due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlAETargetFPSRangeResultMetadata

MLResult MLCameraMetadataGetControlAETargetFPSRangeResultMetadata(
MLHandle result_handle,
int32_t out_data[2]
)

Gets auto-exposure target FPS range.

Parameters

MLHandleresult_handleCamera capture result metadata handle returned in MLCameraCaptureCallbacks.
int32_tout_dataTarget range over which good exposure can be maintained by adjusting the capture frame rate.

Returns

MLResultMLResult_InvalidParamFailed to obtain AE target FPS range due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained AE target FPS range.
MLResultMLResult_UnspecifiedFailureFailed to obtain AE target FPS range due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlAEStateResultMetadata

MLResult MLCameraMetadataGetControlAEStateResultMetadata(
MLHandle result_handle,
MLCameraMetadataControlAEState * out_data
)

Gets AE state.

Parameters

MLHandleresult_handleCamera capture result metadata handle returned in MLCameraCaptureCallbacks.
MLCameraMetadataControlAEState *out_dataAE state.

Returns

MLResultMLResult_InvalidParamFailed to obtain AE state due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained AE state.
MLResultMLResult_UnspecifiedFailureFailed to obtain AE state due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlAWBLockResultMetadata

MLResult MLCameraMetadataGetControlAWBLockResultMetadata(
MLHandle result_handle,
MLCameraMetadataControlAWBLock * out_data
)

Gets AWB lock.

Parameters

MLHandleresult_handleCamera capture result metadata handle returned in MLCameraCaptureCallbacks.
MLCameraMetadataControlAWBLock *out_dataAWB Lock.

Returns

MLResultMLResult_InvalidParamFailed to obtain AWB lock due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained AWB lock.
MLResultMLResult_UnspecifiedFailureFailed to obtain AWB lock due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlAWBStateResultMetadata

MLResult MLCameraMetadataGetControlAWBStateResultMetadata(
MLHandle result_handle,
MLCameraMetadataControlAWBState * out_data
)

Gets AWB state.

Parameters

MLHandleresult_handleCamera capture result metadata handle returned in MLCameraCaptureCallbacks.
MLCameraMetadataControlAWBState *out_dataAWB state.

Returns

MLResultMLResult_InvalidParamFailed to obtain AWB state due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained AWB state.
MLResultMLResult_UnspecifiedFailureFailed to obtain AWB state due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlAWBModeResultMetadata

MLResult MLCameraMetadataGetControlAWBModeResultMetadata(
MLHandle result_handle,
MLCameraMetadataControlAWBMode * out_data
)

Gets AWB mode.

Parameters

MLHandleresult_handleCamera capture result metadata handle returned in MLCameraCaptureCallbacks.
MLCameraMetadataControlAWBMode *out_dataAWB mode.

Returns

MLResultMLResult_InvalidParamFailed to obtain AWB mode due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained AWB mode.
MLResultMLResult_UnspecifiedFailureFailed to obtain AWB mode due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlAFModeResultMetadata

MLResult MLCameraMetadataGetControlAFModeResultMetadata(
MLHandle result_handle,
MLCameraMetadataControlAFMode * out_data
)

Gets AF mode.

Parameters

MLHandleresult_handleCamera capture result metadata handle returned in MLCameraCaptureCallbacks.
MLCameraMetadataControlAFMode *out_dataAF mode.

Returns

MLResultMLResult_InvalidParamFailed to obtain AF mode due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained AF mode.
MLResultMLResult_UnspecifiedFailureFailed to obtain AF mode due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlAFTriggerResultMetadata

MLResult MLCameraMetadataGetControlAFTriggerResultMetadata(
MLHandle result_handle,
MLCameraMetadataControlAFTrigger * out_data
)

Gets AF trigger.

Parameters

MLHandleresult_handleCamera capture result metadata handle returned in MLCameraCaptureCallbacks.
MLCameraMetadataControlAFTrigger *out_dataAF trigger.

Returns

MLResultMLResult_InvalidParamFailed to obtain AF trigger due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained AF trigger.
MLResultMLResult_UnspecifiedFailureFailed to obtain AF trigger due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlAFRegionsResultMetadata

MLResult MLCameraMetadataGetControlAFRegionsResultMetadata(
MLHandle result_handle,
int32_t out_data[3][5],
uint32_t * out_count
)

Gets auto-focus regions.

Parameters

MLHandleresult_handleCamera capture result metadata handle returned in MLCameraCaptureCallbacks.
int32_tout_dataAuto-focus regions. Regions array of area_size x 5[xmin, ymin, xmax, ymax, weight]. Coordinates must be between [(0,0), (width, height)).
uint32_t *out_countNumber of auto-focus regions.

Returns

MLResultMLResult_InvalidParamFailed to obtain AF regions due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained AF regions.
MLResultMLResult_UnspecifiedFailureFailed to obtain AF regions due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetAFDistanceRangeResultMetadata

MLResult MLCameraMetadataGetAFDistanceRangeResultMetadata(
MLHandle result_handle,
float out_data[2]
)

Gets AF distance range. Both Min and Max are specified as focus distance in diopters. The min value specifies the lower bound for focus distance used by Autofocus algorithm and should be more than min focus distance which can be queried using MLCameraMetadataGetLensInfoMinimumFocusDistance. The max value specifies the upper bound for focus distance used by Autofocus algorithm and should be less than hyperfocal distance which can be queried using API MLCameraMetadataGetLensInfoHyperfocalDistance.

Parameters

MLHandleresult_handleCamera capture result metadata handle returned in MLCameraCaptureCallbacks.
floatout_dataAF distance range [min, max].

Returns

MLResultMLResult_InvalidParamFailed to obtain AF distance range due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained AF distance range.
MLResultMLResult_UnspecifiedFailureFailed to obtain AF distance range due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlAFStateResultMetadata

MLResult MLCameraMetadataGetControlAFStateResultMetadata(
MLHandle result_handle,
MLCameraMetadataControlAFState * out_data
)

Gets AF state.

Parameters

MLHandleresult_handleCamera capture result metadata handle returned in MLCameraCaptureCallbacks.
MLCameraMetadataControlAFState *out_dataAF state.

Returns

MLResultMLResult_InvalidParamFailed to obtain AF state due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained AF state.
MLResultMLResult_UnspecifiedFailureFailed to obtain AF state due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlAFSceneChangeResultMetadata

MLResult MLCameraMetadataGetControlAFSceneChangeResultMetadata(
MLHandle result_handle,
MLCameraMetadataControlAFSceneChange * out_data
)

Gets AF scene change detection status.

Parameters

MLHandleresult_handleCamera capture result metadata handle returned in MLCameraCaptureCallbacks.
MLCameraMetadataControlAFSceneChange *out_dataAF scene change detected or not.

Returns

MLResultMLResult_InvalidParamFailed to obtain AF scene change detection status due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained AF scene change detection status.
MLResultMLResult_UnspecifiedFailureFailed to obtain AF scene change detection status due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetLensFocusDistanceResultMetadata

MLResult MLCameraMetadataGetLensFocusDistanceResultMetadata(
MLHandle result_handle,
float * out_data
)

Gets Lens focus distance.

Parameters

MLHandleresult_handleCamera capture result metadata handle returned in MLCameraCaptureCallbacks.
float *out_dataLens focus distance.

Returns

MLResultMLResult_InvalidParamFailed to obtain Lens focus distance range due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained Lens focus distance range.
MLResultMLResult_UnspecifiedFailureFailed to obtain Lens focus distance range due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetLensStateResultMetadata

MLResult MLCameraMetadataGetLensStateResultMetadata(
MLHandle result_handle,
MLCameraMetadataLensState * out_data
)

Get Lens state.

Parameters

MLHandleresult_handleCamera capture result metadata handle returned in MLCameraCaptureCallbacks.
MLCameraMetadataLensState *out_dataLens state.

Returns

MLResultMLResult_InvalidParamFailed to obtain Lens state due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained Lens state.
MLResultMLResult_UnspecifiedFailureFailed to obtain Lens state due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlModeResultMetadata

MLResult MLCameraMetadataGetControlModeResultMetadata(
MLHandle result_handle,
MLCameraMetadataControlMode * out_data
)

Gets mode.

Parameters

MLHandleresult_handleCamera capture result metadata handle returned in MLCameraCaptureCallbacks.
MLCameraMetadataControlMode *out_dataObtained mode.

Returns

MLResultMLResult_InvalidParamFailed to obtain mode due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained mode.
MLResultMLResult_UnspecifiedFailureFailed to obtain mode due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlSceneModeResultMetadata

MLResult MLCameraMetadataGetControlSceneModeResultMetadata(
MLHandle result_handle,
MLCameraMetadataControlSceneMode * out_data
)

Gets Scene mode.

Parameters

MLHandleresult_handleCamera capture result metadata handle returned in MLCameraCaptureCallbacks.
MLCameraMetadataControlSceneMode *out_dataScene mode.

Returns

MLResultMLResult_InvalidParamFailed to obtain scene mode due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained scene mode.
MLResultMLResult_UnspecifiedFailureFailed to obtain scene mode due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetSensorExposureTimeResultMetadata

MLResult MLCameraMetadataGetSensorExposureTimeResultMetadata(
MLHandle result_handle,
int64_t * out_data
)

Gets sensor exposure time.

Parameters

MLHandleresult_handleCamera capture result metadata handle returned in MLCameraCaptureCallbacks.
int64_t *out_dataDuration each pixel is exposed to light in nanoseconds.

Returns

MLResultMLResult_InvalidParamFailed to obtain sensor exposure time due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained sensor exposure time.
MLResultMLResult_UnspecifiedFailureFailed to obtain sensor exposure time due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetSensorSensitivityResultMetadata

MLResult MLCameraMetadataGetSensorSensitivityResultMetadata(
MLHandle result_handle,
int32_t * out_data
)

Gets sensor sensitivity.

Parameters

MLHandleresult_handleCamera capture result metadata handle returned in MLCameraCaptureCallbacks.
int32_t *out_dataSensor sensitivity.

Returns

MLResultMLResult_InvalidParamFailed to obtain sensor sensitivity due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained sensor sensitivity.
MLResultMLResult_UnspecifiedFailureFailed to obtain sensor sensitivity due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetPostRawSensitivityBoostResultMetadata

MLResult MLCameraMetadataGetPostRawSensitivityBoostResultMetadata(
MLHandle result_handle,
int32_t * out_data
)

Gets post raw sensitivity boost.

Parameters

MLHandleresult_handleCamera capture result metadata handle returned in MLCameraCaptureCallbacks.
int32_t *out_dataPost raw sensitivity boost.

Returns

MLResultMLResult_InvalidParamFailed to obtain post raw sensitivity boost due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained post raw sensitivity boost.
MLResultMLResult_UnspecifiedFailureFailed to obtain post raw sensitivity boost due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetSensorTimestampResultMetadata

MLResult MLCameraMetadataGetSensorTimestampResultMetadata(
MLHandle result_handle,
int64_t * out_data
)

Gets frame captured timestamp.

Parameters

MLHandleresult_handleCamera capture result metadata handle returned in MLCameraCaptureCallbacks.
int64_t *out_dataTimestamp in nanoseconds when captured.

Returns

MLResultMLResult_InvalidParamFailed to obtain frame captured timestamp due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained frame captured timestamp.
MLResultMLResult_UnspecifiedFailureFailed to obtain frame captured timestamp due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetSensorFrameDurationResultMetadata

MLResult MLCameraMetadataGetSensorFrameDurationResultMetadata(
MLHandle result_handle,
int64_t * out_data
)

Gets sensor frame duration.

Parameters

MLHandleresult_handleCamera capture result metadata handle returned in MLCameraCaptureCallbacks.
int64_t *out_dataSensor frame duration.

Returns

MLResultMLResult_InvalidParamFailed to obtain sensor frame duration due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained sensor frame duration.
MLResultMLResult_UnspecifiedFailureFailed to obtain sensor frame duration due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlEffectModeResultMetadata

MLResult MLCameraMetadataGetControlEffectModeResultMetadata(
MLHandle result_handle,
MLCameraMetadataControlEffectMode * out_data
)

Gets Effect mode.

Parameters

MLHandleresult_handleCamera capture result metadata handle returned in MLCameraCaptureCallbacks.
MLCameraMetadataControlEffectMode *out_dataEffect mode.

Returns

MLResultMLResult_InvalidParamFailed to obtain effect mode due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained effect mode.
MLResultMLResult_UnspecifiedFailureFailed to obtain effect mode due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlExposureUpperTimeLimitResultMetadata

MLResult MLCameraMetadataGetControlExposureUpperTimeLimitResultMetadata(
MLHandle result_handle,
int64_t * out_data
)

Gets exposure time upper limit.

Parameters

MLHandleresult_handleCamera capture result metadata handle returned in MLCameraCaptureCallbacks.
int64_t *out_dataExposure time upper limit.

Returns

MLResultMLResult_InvalidParamFailed to obtain exposure time upper limit due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained exposure time upper limit.
MLResultMLResult_UnspecifiedFailureFailed to obtain exposure time upperlimit due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetJpegGPSCoordinatesResultMetadata

MLResult MLCameraMetadataGetJpegGPSCoordinatesResultMetadata(
MLHandle result_handle,
double out_data[3]
)

Gets JPEG GPS coordinates.

Parameters

MLHandleresult_handleCamera capture result metadata handle returned in MLCameraCaptureCallbacks.
doubleout_dataJPEG GPS coordinates – latitude and longitude in degrees, altitude in meters.

Returns

MLResultMLResult_InvalidParamFailed to obtain JPEG GPS coordinates due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained JPEG GPS coordinates.
MLResultMLResult_UnspecifiedFailureFailed to obtain JPEG GPS coordinates due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetJpegGPSTimestampResultMetadata

MLResult MLCameraMetadataGetJpegGPSTimestampResultMetadata(
MLHandle result_handle,
int64_t * out_data
)

Gets JPEG timestamp.

Parameters

MLHandleresult_handleCamera capture result metadata handle returned in MLCameraCaptureCallbacks.
int64_t *out_dataJPEG timestamp in UNIX Epoch time (UTC in seconds since January 1, 1970).

Returns

MLResultMLResult_InvalidParamFailed to obtain JPEG timestamp due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained JPEG timestamp.
MLResultMLResult_UnspecifiedFailureFailed to obtain JPEG timestamp due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetJpegThumbnailSizeResultMetadata

MLResult MLCameraMetadataGetJpegThumbnailSizeResultMetadata(
MLHandle result_handle,
MLCameraMetadataJpegThumbnailSize * out_data
)

Gets JPEG thumbnail size.

Parameters

MLHandleresult_handleCamera capture result metadata handle returned in MLCameraCaptureCallbacks.
MLCameraMetadataJpegThumbnailSize *out_dataResolution of embedded JPEG thumbnail. When set to 0, thumbnail will not be included.

Returns

MLResultMLResult_InvalidParamFailed to obtain JPEG thumbnail size due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained JPEG thumbnail size.
MLResultMLResult_UnspecifiedFailureFailed to obtain JPEG thumbnail size due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetControlForceApplyModeResultMetadata

MLResult MLCameraMetadataGetControlForceApplyModeResultMetadata(
MLHandle result_handle,
MLCameraMetadataControlForceApplyMode * out_data
)

Gets force apply mode. Main camera and CV Camera share the same camera hardware resources. When both the cameras are streaming, request metadata properties for both cameras are merged and then applied. While merging, the metadata properties from Main Camera take precedence over CV camera metadata properties. The force apply mode property can be used to override this. If CV Camera metadata has force apply mode on, the CV Camera metadata properties take precedence over Main Camera metadata properties.

Parameters

MLHandleresult_handleCamera capture result metadata handle returned in MLCameraCaptureCallbacks.
MLCameraMetadataControlForceApplyMode *out_dataForce apply mode.

Returns

MLResultMLResult_InvalidParamFailed to obtain force apply mode due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained force apply mode.
MLResultMLResult_UnspecifiedFailureFailed to obtain force apply mode due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20

MLCameraMetadataGetJpegQualityResultMetadata

MLResult MLCameraMetadataGetJpegQualityResultMetadata(
MLHandle result_handle,
uint8_t * out_data
)

Gets JPEG quality.

Parameters

MLHandleresult_handleCamera capture result metadata handle returned in MLCameraCaptureCallbacks.
uint8_t *out_dataCompression quality of JPEG thumbnail, with 100 being the highest quality, and 1 the lowest.

Returns

MLResultMLResult_InvalidParamFailed to obtain JPEG quality due to an invalid input parameter.
MLResultMLResult_OkSuccessfully obtained JPEG quality.
MLResultMLResult_UnspecifiedFailureFailed to obtain JPEG quality due to an unknown error.

Required Permissions:

  • None

API Level:

  • 20