// %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% using System; namespace UnityEngine.XR.MagicLeap { /// /// APIs for accessing Camera Device and to do Camera Capture. /// public partial class MLCameraBase { /// /// Camera errors /// public enum ErrorType { /// /// No error /// None = 0, /// /// Invalid state /// Invalid, /// /// Camera disabled /// Disabled, /// /// Camera device failed /// DeviceFailed, /// /// Camera service failed /// ServiceFailed, /// /// Capture failed /// CaptureFailed } /// /// Capture operation type /// public enum CaptureType { /// /// To capture an image /// Image, /// /// To capture a video /// Video, /// /// To capture a video and and access the raw buffer of the frames. /// Preview, } /// /// Captured output format /// public enum OutputFormat { /// /// YUV planar format. /// YUV_420_888 = 1, /// /// Compressed output stream. /// JPEG, /// /// RGB32 format. /// RGBA_8888, } /// /// Client can implement polling mechanism to retrieve device status /// and use these masks to view device status. /// [Flags] public enum DeviceStatusFlag { /// /// Connected /// Connected = 1 << 0, /// /// Idle /// Idle = 1 << 1, /// /// Opened. /// Streaming = 1 << 2, /// /// Disconnected. /// Disconnected = 1 << 3, /// /// Error. Call MLCameraGetErrorCode() to obtain the error code. /// Error = 1 << 4, } /// /// The metadata for the control AE mode. /// public enum MetadataControlAEMode { /// /// The control AE mode: Off. /// Off = 0, /// /// The control AE mode: On. /// On } /// /// The metadata for the color correction aberration mode. /// public enum MetadataColorCorrectionAberrationMode { /// /// The color correction aberration mode: Off. /// Off = 0, /// /// The color correction aberration mode: Fast. /// Fast, /// /// The color correction aberration mode: High Quality. /// HighQuality, } /// /// The metadata for the control AE lock. /// public enum MetadataControlAELock { /// /// The control AE lock: Off /// Off = 0, /// /// The control AE lock: On /// On, } /// /// The metadata for the control AWB mode. /// public enum MetadataControlAWBMode { /// /// The control AWB mode: Off /// Off = 0, /// /// The control AWB mode: Auto /// Auto, /// /// The control AWB mode: Incandescent /// Incandescent, /// /// The control AWB mode: Fluorescent /// Fluorescent, /// /// The control AWB mode: Warm Fluorescent /// WarmFluorescent, /// /// The control AWB mode: Daylight /// Daylight, /// /// The control AWB mode: Cloudy Day Light /// CloudyDaylight, /// /// The control AWB mode: Twilight /// Twilight, /// /// The control AWB mode: Shade /// Shade, } /// /// The metadata for the control AWB lock. /// public enum MetadataControlAWBLock { /// /// The control AWB lock: Off /// Off = 0, /// /// The control AWB lock: On /// On, } /// /// The metadata for the color correction mode. /// public enum MetadataColorCorrectionMode { /// /// The color correction mode: Transform Matrix /// TransformMatrix = 0, /// /// The color correction mode: Fast /// Fast, /// /// The color correction mode: High Quality /// HighQuality, } /// /// The metadata for the control AE anti banding mode. /// public enum MetadataControlAEAntibandingMode { /// /// The control AE anti banding mode: Off /// Off = 0, /// /// The control AE anti banding mode: 50hz /// FiftyHz, /// /// The control AE anti banding mode: 60hz /// SixtyHz, /// /// The control AE anti banding mode: Auto /// Auto, } /// /// The metadata for scaler available formats. /// public enum MetadataScalerAvailableFormats { /// /// RAW16 Format /// RAW16 = 0x20, /// /// RAW OPAQUE Format /// RAW_OPAQUE = 0x24, /// /// YV12 Format /// YV12 = 0x32315659, /// /// YCrCb 420 SP Format /// YCrCb_420_SP = 0x11, /// /// Implementation Defined /// IMPLEMENTATION_DEFINED = 0x22, /// /// YCbCr 420 888 Format /// YCbCr_420_888 = 0x23, /// /// BLOB Format /// BLOB = 0x21, } /// /// The metadata for scaler available stream configurations. /// public enum MetadataScalerAvailableStreamConfigurations { /// /// The scaler available stream configuration: Output /// OUTPUT = 0, /// /// The scaler available stream configuration: Input /// INPUT, } /// /// The metadata for the control AE state. /// public enum MetadataControlAEState { /// /// The control AE state: Inactive /// Inactive = 0, /// /// The control AE state: Searching /// Searching, /// /// The control AE state: Converged /// Converged, /// /// The control AE state: Locked /// Locked, /// /// The control AE state: Flash Required /// FlashRequired, /// /// The control AE state: Pre-capture /// PreCapture, } /// /// The metadata for the control AWB state. /// public enum MetadataControlAWBState { /// /// The control AWB state: Inactive /// Inactive = 0, /// /// The control AWB state: Searching /// Searching, /// /// The control AWB state: Converged /// Converged, /// /// The control AWB state: Locked /// Locked, } /// /// MR Video Quality enumeration /// public enum MRQuality { /// /// Specifies 648 x 720 resolution. /// Aspect ratio: 9x10. /// _648x720 = 1, /// /// Specifies 972 x 1080 resolution. /// Aspect ratio: 9x10. /// _972x1080 = 2, /// /// Specifies 1944 x 2160 resolution. /// Aspect ratio: 9x10. /// CaptureFrameRate._60FPS is not supported for this quality mode. /// _1944x2160 = 3, /// /// Specifies 960 x 720 resolution. /// Aspect ratio: 4x3. /// _960x720 = 4, /// /// Specifies 1440 x 1080 resolution. /// Aspect ratio: 4x3. /// _1440x1080 = 5, /// /// Specifies 2880 x 2160 resolution. /// Aspect ratio: 4x3. /// CaptureFrameRate._60FPS is not supported for this quality mode. /// _2880x2160 = 6, }; /// /// Capture Frame Rate /// Call MLCameraPrepareCapture to configure frame rate /// use FrameRate_None when configuring only Image capture /// FrameRate_60fps only supported when resolution of captures <= 1080P. /// public enum CaptureFrameRate { /// /// None Still Capture /// None, /// /// Specified 15FPS /// _15FPS, /// /// Specified 30FPS /// _30FPS, /// /// Specified 60FPS /// _60FPS, }; /// /// Camera Disconnect Reason. /// public enum DisconnectReason { /// /// Device Lost. /// DeviceLost, /// /// Priority Lost. /// PriorityLost, }; /// /// Logical Camera identifiers available for access. /// public enum Identifier { /// /// x86 logical camera /// Main = 0, /// /// CV logical camera /// CV, }; /// /// Flags to describe various modules in camera pipeline. /// public enum ConnectFlag { /// /// Camera only frame capture /// CamOnly, /// /// virtual only capture /// VirtualOnly, /// /// Mixed Reality capture /// MR, }; /// /// Comment Needed! /// public enum MRBlendType { /// /// Additive Blend Type. It simply adds pixel values of real world and virtual layer. /// Additive = 1 }; } }