// %BANNER_BEGIN% // --------------------------------------------------------------------- // %COPYRIGHT_BEGIN% // Copyright (c) (2018-2024) Magic Leap, Inc. All Rights Reserved. // Use of this file is governed by the Software License Agreement, located here: https://www.magicleap.com/software-license-agreement-ml2 // Terms and conditions applicable to third-party materials accompanying this distribution may also be found in the top-level NOTICE file appearing herein. // %COPYRIGHT_END% // --------------------------------------------------------------------- // %BANNER_END% namespace UnityEngine.XR.MagicLeap { using System; using System.Runtime.InteropServices; public partial class MLCameraBase { /// /// MLCameraMetadata description goes here. /// public partial class Metadata { /// /// See ml_camera_metadata_v2.h for additional comments. /// private class NativeBindings : Native.MagicLeapNativeBindings { /// /// Rational data type. /// [StructLayout(LayoutKind.Sequential)] public struct MLCameraMetadataRational { /// /// Numerator. /// public int Numerator; /// /// Denominator. /// public int Denominator; /// /// Create and return an initialized version of this struct. /// /// A new instance of this struct. public static MLCameraMetadataRational Create() { return new MLCameraMetadataRational() { }; } }; /// /// Gets sensor sensitivity. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetSensorSensitivityRequestMetadata(ulong Handle, out int OutData); /// /// Sets AE lock. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataSetControlAELock( ulong Handle, ref ControlAELock Data); /// /// Gets AE Max Regions. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetControlAEMaxRegions(ulong Handle, out int OutData); /// /// Gets AE mode. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetControlAEModeResultMetadata( ulong Handle, out ControlAEMode OutData); /// /// Gets AE antibanding mode. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetControlAEAntibandingModeResultMetadata( ulong Handle, out ControlAEAntibandingMode OutData); /// /// 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. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataSetControlForceApplyMode( ulong Handle, ControlForceApplyMode Data); /// /// Gets AE compensation step. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetControlAECompensationStep(ulong Handle, IntPtr OutData); /// /// Gets color correction transform. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetColorCorrectionTransformRequestMetadata(ulong Handle, IntPtr OutData); /// /// Gets sensor info sensitivity range. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetSensorInfoSensitivityRange( ulong Handle, [MarshalAs(UnmanagedType.LPArray, SizeConst = 2)] int[] OutData); /// /// Sets Effect mode. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataSetControlEffectMode( ulong Handle, ref ControlEffectMode Data); /// /// Sets color correction aberration. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataSetColorCorrectionAberrationMode( ulong Handle, ref ColorCorrectionAberrationMode Data); /// /// Gets color correction aberration modes. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetColorCorrectionAvailableAberrationModes( ulong Handle, [MarshalAs(UnmanagedType.LPArray)] out IntPtr OutData, out int OutCount); /// /// Gets color correction aberration. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetColorCorrectionAberrationModeRequestMetadata( ulong Handle, out ColorCorrectionAberrationMode OutData); /// /// Gets AE lock. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetControlAELockAvailable( ulong Handle, out ControlAELock OutData); /// /// Gets jpeg GPS coordinates. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetJpegGPSCoordinatesRequestMetadata( ulong Handle, [MarshalAs(UnmanagedType.LPArray, SizeConst = 3)] double[] OutData); /// /// Gets Effect modes. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetControlAvailableEffectModes( ulong Handle, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] out ControlEffectMode[] OutData, [MarshalAs(UnmanagedType.SysUInt)] out int OutCount); /// /// Gets Scene modes. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetControlAvailableSceneModes( ulong Handle, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] out ControlSceneMode[] OutData, [MarshalAs(UnmanagedType.SysUInt)] out int OutCount); /// /// Gets AE modes. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetControlAEAvailableModes( ulong Handle, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] out ControlAEMode[] OutData, [MarshalAs(UnmanagedType.SysUInt)] out int OutCount); /// /// Gets AE compensation range. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetControlAECompensationRange( ulong Handle, [MarshalAs(UnmanagedType.LPArray, SizeConst = 2, ArraySubType = UnmanagedType.SysInt)] out int[] OutData); /// /// Gets AWB modes. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetControlAWBAvailableModes( ulong Handle, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] out ControlAWBMode[] OutData, [MarshalAs(UnmanagedType.SysUInt)] out int OutCount); /// /// Gets AF modes /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetControlAFAvailableModes( ulong Handle, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] out ControlAFMode[] OutData, [MarshalAs(UnmanagedType.SysUInt)] out int OutCount); /// /// Gets lens hyperfocal distance. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetLensInfoHyperfocalDistance(ulong Handle, out float OutData); /// /// Gets lens minimum focus distance /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetLensInfoMinimumFocusDistance(ulong Handle, out float OutData); /// /// Gets lens minimum focus distance increment. /// The lens position can be set in multiples of distance increments between hyperfocal distance and minimum focus distance. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetLensInfoMinimumFocusDistanceIncrement(ulong Handle, out float OutData); /// /// Gets AF mode /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetControlAFModeRequestMetadata(ulong Handle, out ControlAFMode OutData); /// /// Gets AF trigger /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetControlAFTriggerRequestMetadata(ulong Handle, out ControlAFTrigger OutData); /// /// 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 . /// 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 . /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetAFDistanceRangeRequestMetadata(ulong Handle, [MarshalAs(UnmanagedType.LPArray, SizeConst = 2)] out float[] OutData); /// /// Gets Lens focus distance in diopters. /// The distance is between minimum focus distance and hyperfocal distance. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetLensFocusDistanceRequestMetadata(ulong Handle, out float OutData); /// /// Sets AF mode /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataSetControlAFMode(ulong Handle, in ControlAFMode InData); /// /// Sets AF trigger /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataSetControlAFTrigger(ulong Handle, in ControlAFTrigger InData); /// /// 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 . /// 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 . /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataSetAFDistanceRange(ulong Handle, [MarshalAs(UnmanagedType.LPArray, SizeConst = 2)] in float[] InData); /// /// Sets Lens focus distance /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataSetLensFocusDistance(ulong Handle, in float InData); /// /// Gets AF mode /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetControlAFModeResultMetadata(ulong Handle, out ControlAFMode OutData); /// /// Gets AF trigger /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetControlAFTriggerResultMetadata(ulong Handle, out ControlAFTrigger OutData); /// /// 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 . /// 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 . /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetAFDistanceRangeResultMetadata(ulong Handle, [MarshalAs(UnmanagedType.LPArray, SizeConst = 2)] out float[] OutData); /// /// Gets AF state /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetControlAFStateResultMetadata(ulong Handle, out ControlAFState OutData); /// /// Gets AF scene change detection status /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetControlAFSceneChangeResultMetadata(ulong Handle, out ControlAFSceneChange OutData); /// /// Gets Lens focus distance /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetLensFocusDistanceResultMetadata(ulong Handle, out float OutData); /// /// Gets Lens state /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetLensStateResultMetadata(ulong Handle, out LensState OutData); /// /// Gets AE regions. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetControlAERegionsRequestMetadata( ulong Handle, IntPtr OutData, out int OutCount); /// /// Gets Available Modes. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetControlAvailableModes( ulong Handle, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] out ControlMode[] OutData, [MarshalAs(UnmanagedType.SysUInt)] out int OutCount); /// /// Sets color correction transform. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataSetColorCorrectionTransform( ulong Handle, IntPtr Data); /// /// Gets AWB lock. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetControlAWBLockAvailable( ulong Handle, out ControlAWBLock OutData); /// /// Gets sensor info active array sizes. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetSensorInfoActiveArraySize( ulong Handle, [MarshalAs(UnmanagedType.LPArray, SizeConst = 4)] int[] OutData); /// /// Gets color correction mode. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetColorCorrectionModeRequestMetadata( ulong Handle, out ColorCorrectionMode OutData); /// /// Gets sensor orientation degree. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetSensorOrientation( ulong Handle, [MarshalAs(UnmanagedType.SysInt)] out int OutData); /// /// Gets color correction gains. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetColorCorrectionGainsRequestMetadata( ulong Handle, [MarshalAs(UnmanagedType.LPArray, SizeConst = 4)] float[] OutData); /// /// Gets color correction transform. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetColorCorrectionTransformResultMetadata( ulong Handle, IntPtr OutData); /// /// Gets AE antibanding mode. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetControlAEAntibandingModeRequestMetadata( ulong Handle, out ControlAEAntibandingMode OutData); /// /// Gets AE exposure compensation. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetControlAEExposureCompensationRequestMetadata( ulong Handle, [MarshalAs(UnmanagedType.SysInt)] out int OutData); /// /// Gets AE lock. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetControlAELockRequestMetadata( ulong Handle, out ControlAELock OutData); /// /// Gets AE mode. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetControlAEModeRequestMetadata( ulong Handle, out ControlAEMode OutData); /// /// Gets AWB lock. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetControlAWBLockRequestMetadata( ulong Handle, out ControlAWBLock OutData); /// /// Gets AWB mode. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetControlAWBModeRequestMetadata( ulong Handle, out ControlAWBMode OutData); /// /// Gets mode. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetControlModeRequestMetadata( ulong Handle, out ControlMode OutData); /// /// Gets Scene mode. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetControlSceneModeRequestMetadata( ulong Handle, out ControlSceneMode OutData); /// /// Gets sensor exposure time. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetSensorExposureTimeRequestMetadata( ulong Handle, out long OutData); /// /// Effect mode. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetControlEffectModeRequestMetadata( ulong Handle, out ControlEffectMode OutData); /// /// Gets AE lock. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetControlAELockResultMetadata( ulong Handle, out ControlAELock OutData); /// /// Gets exposure time upper limit. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetControlExposureUpperTimeLimitRequestMetadata( ulong Handle, out long OutData); /// /// Gets jpeg timestamp. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetJpegGPSTimestampRequestMetadata( ulong Handle, out long OutData); /// /// Gets jpeg thumbnail size. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetJpegThumbnailSizeRequestMetadata( ulong Handle, out JpegThumbnailSize OutData); /// /// 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. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetControlForceApplyModeRequestMetadata( ulong Handle, out ControlForceApplyMode OutData); /// /// Gets jpeg quality. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetJpegQualityRequestMetadata( ulong Handle, out byte OutData); /// /// Sets color correction mode. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataSetColorCorrectionMode( ulong Handle, ref ColorCorrectionMode Data); /// /// Gets color correction gains. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetColorCorrectionGainsResultMetadata( ulong Handle, [MarshalAs(UnmanagedType.LPArray, SizeConst = 4)] float[] OutData); /// /// Sets color correction gains. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataSetColorCorrectionGains( ulong Handle, [MarshalAs(UnmanagedType.LPArray, SizeConst = 4)] float[] Data); /// /// Sets AE antiband mode. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataSetControlAEAntibandingMode( ulong Handle, ref ControlAEAntibandingMode Data); /// /// Sets AE exposure compensation. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataSetControlAEExposureCompensation( ulong Handle, [MarshalAs(UnmanagedType.SysInt)] ref int Data); /// /// Sets AE mode. MLCameraMetadataControlAEMode_Off is not supported if camera is configured for 15FPS /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataSetControlAEMode( ulong Handle, ref ControlAEMode Data); /// /// set AE regions. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataSetControlAERegions( ulong Handle, [MarshalAs(UnmanagedType.LPArray, SizeConst = 15)] IntPtr Data, int Count); /// /// Sets AWB lock. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataSetControlAWBLock( ulong Handle, ref ControlAWBLock Data); /// /// Sets AWB mode. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataSetControlAWBMode( ulong Handle, ref ControlAWBMode Data); /// /// Sets mode. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataSetControlMode( ulong Handle, ref ControlMode Data); /// /// Sets Scene mode. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataSetControlSceneMode( ulong Handle, ref ControlSceneMode Data); /// /// Gets AWB lock. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetControlAWBLockResultMetadata( ulong Handle, out ControlAWBLock OutData); /// /// Sets sensor exposure time. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataSetSensorExposureTime( ulong Handle, ref long Data); /// /// Sets sensor sensitivity. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataSetSensorSensitivity( ulong Handle, [MarshalAs(UnmanagedType.SysInt)] ref int Data); /// /// Sets exposure time upper limit. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataSetControlExposureUpperTimeLimit( ulong Handle, long Data); /// /// Sets jpeg GPS coordinates. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataSetJpegGPSCoordinates( ulong Handle, [MarshalAs(UnmanagedType.LPArray, SizeConst = 3)] double[] Data); /// /// Sets jpeg timestamp. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataSetJpegGPSTimestamp( ulong Handle, long Data); /// /// Sets jpeg thumbnail size. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataSetJpegThumbnailSize( ulong Handle, ref JpegThumbnailSize Data); /// /// Sets jpeg quality. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataSetJpegQuality( ulong Handle, ref byte Data); /// /// Gets color correction. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetColorCorrectionModeResultMetadata( ulong Handle, out ColorCorrectionMode OutData); /// /// Gets color correction aberration. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetColorCorrectionAberrationModeResultMetadata( ulong Handle, out ColorCorrectionAberrationMode OutData); /// /// Gets AE exposure compensation. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetControlAEExposureCompensationResultMetadata( ulong Handle, [MarshalAs(UnmanagedType.SysInt)] out int OutData); /// /// Gets AE regions. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetControlAERegionsResultMetadata( ulong Handle, [MarshalAs(UnmanagedType.LPArray, SizeConst = 15)] IntPtr OutData, [MarshalAs(UnmanagedType.SysInt)] out int OutCount); /// /// Gets AE target FPS range. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetControlAETargetFPSRangeResultMetadata( ulong Handle, [MarshalAs(UnmanagedType.LPArray, SizeConst = 2)] int[] OutData); /// /// Gets AE state. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetControlAEStateResultMetadata( ulong Handle, out ControlAEState OutData); /// /// Gets AWB state. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetControlAWBStateResultMetadata( ulong Handle, out ControlAWBState OutData); /// /// Gets AWB mode. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetControlAWBModeResultMetadata( ulong Handle, out ControlAWBMode OutData); /// /// Gets mode. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetControlModeResultMetadata( ulong Handle, out ControlMode OutData); /// /// Gets Scene mode. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetControlSceneModeResultMetadata( ulong Handle, out ControlSceneMode OutData); /// /// Gets sensor exposure time. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetSensorExposureTimeResultMetadata( ulong Handle, out long OutData); /// /// Gets sensor sensitivity. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetSensorSensitivityResultMetadata( ulong Handle, [MarshalAs(UnmanagedType.SysInt)] out int OutData); /// /// Gets frame captured timestamp. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetSensorTimestampResultMetadata( ulong Handle, out long OutData); /// /// Gets sensor frame duration. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetSensorFrameDurationResultMetadata( ulong Handle, out long OutData); /// /// Gets Effect mode. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetControlEffectModeResultMetadata( ulong Handle, out ControlEffectMode OutData); /// /// Gets exposure time upper limit. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetControlExposureUpperTimeLimitResultMetadata( ulong Handle, out long OutData); /// /// Gets jpeg GPS coordinates. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetJpegGPSCoordinatesResultMetadata( ulong Handle, [MarshalAs(UnmanagedType.LPArray, SizeConst = 3)] out double[] OutData); /// /// Gets jpeg timestamp. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetJpegGPSTimestampResultMetadata( ulong Handle, out long OutData); /// /// Gets jpeg thumbnail size. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetJpegThumbnailSizeResultMetadata( ulong Handle, out JpegThumbnailSize OutData); /// /// 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. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetControlForceApplyModeResultMetadata( ulong Handle, out ControlForceApplyMode OutData); /// /// Gets jpeg quality. /// [DllImport(MLCameraMetadataDll, CallingConvention = CallingConvention.Cdecl)] public static extern MLResult.Code MLCameraMetadataGetJpegQualityResultMetadata( ulong Handle, out byte OutData); } } } }