1# Enums 2<!--Kit: Camera Kit--> 3<!--Subsystem: Multimedia--> 4<!--Owner: @qano--> 5<!--SE: @leo_ysl--> 6<!--TSE: @xchaosioda--> 7 8> **NOTE** 9> 10> The initial APIs of this module are supported since API version 10. Newly added APIs will be marked with a superscript to indicate their earliest API version. 11 12## CameraPosition 13 14Enumerates the camera positions. 15 16**Atomic service API**: This API can be used in atomic services since API version 12. 17 18**System capability**: SystemCapability.Multimedia.Camera.Core 19 20| Name | Value | Description | 21| --------------------------- | ---- |-----------------------------------------------------------------| 22| CAMERA_POSITION_UNSPECIFIED | 0 | A camera that does not have a fixed orientation relative to the device screen. | 23| CAMERA_POSITION_BACK | 1 | Rear camera. | 24| CAMERA_POSITION_FRONT | 2 | Front camera. | 25| CAMERA_POSITION_FOLD_INNER<sup>(deprecated)</sup> | 3 | Folded camera.<br>This API is supported since API version 11 and deprecated since API version 12.| 26 27## CameraType 28 29Enumerates the camera types. 30 31**Atomic service API**: This API can be used in atomic services since API version 19. 32 33**System capability**: SystemCapability.Multimedia.Camera.Core 34 35| Name | Value | Description | 36| ----------------------- | ---- | -------------- | 37| CAMERA_TYPE_DEFAULT | 0 | Unspecified camera type. | 38| CAMERA_TYPE_WIDE_ANGLE | 1 | Wide camera. | 39| CAMERA_TYPE_ULTRA_WIDE | 2 | Ultra wide camera. | 40| CAMERA_TYPE_TELEPHOTO | 3 | Telephoto camera. | 41| CAMERA_TYPE_TRUE_DEPTH | 4 | Camera with depth of field information.| 42 43## ConnectionType 44 45Enumerates the camera connection types. 46 47**Atomic service API**: This API can be used in atomic services since API version 19. 48 49**System capability**: SystemCapability.Multimedia.Camera.Core 50 51| Name | Value | Description | 52| ---------------------------- | ---- | ------------- | 53| CAMERA_CONNECTION_BUILT_IN | 0 | Built-in camera. | 54| CAMERA_CONNECTION_USB_PLUGIN | 1 | Camera connected using USB.| 55| CAMERA_CONNECTION_REMOTE | 2 | Remote camera.| 56 57## HostDeviceType<sup>15+</sup> 58 59Enumerates the remote camera types. 60 61**Atomic service API**: This API can be used in atomic services since API version 19. 62 63**System capability**: SystemCapability.Multimedia.Camera.Core 64 65| Name | Value | Description | 66| ---------------------------- | ---- |---------| 67| UNKNOWN_TYPE | 0 | Unknown type.| 68| PHONE | 0x0E | Mobile phone. | 69| TABLET | 0x11 | Tablet. | 70 71## CameraStatus 72 73Enumerates the camera statuses. 74 75**Atomic service API**: This API can be used in atomic services since API version 19. 76 77**System capability**: SystemCapability.Multimedia.Camera.Core 78 79| Name | Value | Description | 80| ------------------------- | ---- | ------------ | 81| CAMERA_STATUS_APPEAR | 0 | A camera appears. | 82| CAMERA_STATUS_DISAPPEAR | 1 | The camera disappears. | 83| CAMERA_STATUS_AVAILABLE | 2 | The camera is available. | 84| CAMERA_STATUS_UNAVAILABLE | 3 | The camera is unavailable. | 85 86## FoldStatus<sup>12+</sup> 87 88Enumerates the fold states available for a fordable device. 89 90**Atomic service API**: This API can be used in atomic services since API version 19. 91 92**System capability**: SystemCapability.Multimedia.Camera.Core 93 94| Name | Value | Description | 95| ------------------------- | ---- | ------------ | 96| NON_FOLDABLE | 0 | The device is not foldable. | 97| EXPANDED | 1 | The device is fully unfolded.| 98| FOLDED | 2 | The device is folded. | 99 100## SceneMode<sup>11+</sup> 101 102Enumerates the camera scene modes. 103 104**Atomic service API**: This API can be used in atomic services since API version 19. 105 106**System capability**: SystemCapability.Multimedia.Camera.Core 107 108| Name | Value | Description | 109|----------------------------|---------|---------------------------------------------| 110| NORMAL_PHOTO | 1 | Normal photo mode. For details, see [PhotoSession](arkts-apis-camera-PhotoSession.md). | 111| NORMAL_VIDEO | 2 | Normal record mode. For details, see [VideoSession](arkts-apis-camera-VideoSession.md). | 112| SECURE_PHOTO<sup>12+</sup> | 12 | Secure mode. For details, see [SecureSession](arkts-apis-camera-SecureSession.md).| 113 114## CameraErrorCode 115 116Enumerates the camera error codes, 117 118which are returned when an API call is incorrect or the **on()** API is used to listen for the error status. 119 120**Atomic service API**: This API can be used in atomic services since API version 19. 121 122**System capability**: SystemCapability.Multimedia.Camera.Core 123 124| Name | Value | Description | 125| ------------------------- | ---- | ------------ | 126| INVALID_ARGUMENT | 7400101 | A parameter is missing or the parameter type is incorrect. | 127| OPERATION_NOT_ALLOWED | 7400102 | The operation is not allowed. | 128| SESSION_NOT_CONFIG | 7400103 | The session is not configured. | 129| SESSION_NOT_RUNNING | 7400104 | The session is not running. | 130| SESSION_CONFIG_LOCKED | 7400105 | The session configuration is locked. | 131| DEVICE_SETTING_LOCKED | 7400106 | The device setting is locked. | 132| CONFLICT_CAMERA | 7400107 | The device is already started. | 133| DEVICE_DISABLED | 7400108 | The camera is disabled for security reasons. | 134| DEVICE_PREEMPTED | 7400109 | The camera is preempted. | 135| UNRESOLVED_CONFLICTS_WITH_CURRENT_CONFIGURATIONS<sup>12+</sup> | 7400110 | The configuration conflicts with the current configuration. | 136| SERVICE_FATAL_ERROR | 7400201 | An error occurs in the camera service. | 137 138## TorchMode<sup>11+</sup> 139 140Enumerates the flashlight modes. 141 142**Atomic service API**: This API can be used in atomic services since API version 19. 143 144**System capability**: SystemCapability.Multimedia.Camera.Core 145 146| Name | Value | Description | 147| ---------------------------- | ---- | ------------- | 148| OFF | 0 | The flashlight is off. | 149| ON | 1 | The flashlight is on.| 150| AUTO | 2 | The system automatically adjusts the flashlight brightness according to the environment.| 151 152## CameraFormat 153 154Enumerates the camera output formats. 155 156**Atomic service API**: This API can be used in atomic services since API version 19. 157 158**System capability**: SystemCapability.Multimedia.Camera.Core 159 160| Name | Value | Description | 161| ----------------------- | --------- | ------------ | 162| CAMERA_FORMAT_RGBA_8888 | 3 | RGBA_8888 image. | 163| CAMERA_FORMAT_YUV_420_SP| 1003 | YUV_420_SP image. | 164| CAMERA_FORMAT_JPEG | 2000 | JPEG image. | 165| CAMERA_FORMAT_YCBCR_P010<sup>11+</sup> | 2001 | YCBCR_P010 image. | 166| CAMERA_FORMAT_YCRCB_P010<sup>11+</sup> | 2002 | YCRCB_P010 image. | 167| CAMERA_FORMAT_HEIC<sup>13+</sup> | 2003 | HEIF image. | 168 169## VideoCodecType<sup>13+</sup> 170 171Enumerates the video codec types. 172 173**Atomic service API**: This API can be used in atomic services since API version 19. 174 175**System capability**: SystemCapability.Multimedia.Camera.Core 176 177| Name | Value | Description | 178|------|------|-------------| 179| AVC | 0 | AVC.| 180| HEVC | 1 | HEVC.| 181 182## CameraConcurrentType<sup>18+</sup> 183 184Enumerates the camera concurrency types. 185 186**Atomic service API**: This API can be used in atomic services since API version 19. 187 188**System capability**: SystemCapability.Multimedia.Camera.Core 189 190| Name | Value | Description | 191|------|------|-------------| 192| CAMERA_LIMITED_CAPABILITY | 0 | Limited camera concurrency. | 193| CAMERA_FULL_CAPABILITY | 1 | Full camera concurrency.| 194 195## ImageRotation 196 197Enumerates the image rotation angles. 198 199**Atomic service API**: This API can be used in atomic services since API version 19. 200 201**System capability**: SystemCapability.Multimedia.Camera.Core 202 203| Name | Value | Description | 204| ------------ | ---- | ------------- | 205| ROTATION_0 | 0 | The image rotates 0 degrees. | 206| ROTATION_90 | 90 | The image rotates 90 degrees. | 207| ROTATION_180 | 180 | The image rotates 180 degrees.| 208| ROTATION_270 | 270 | The image rotates 270 degrees.| 209 210## QualityLevel 211 212Enumerates the image quality levels. 213 214**Atomic service API**: This API can be used in atomic services since API version 19. 215 216**System capability**: SystemCapability.Multimedia.Camera.Core 217 218| Name | Value | Description | 219| -------------------- | ---- | ------------ | 220| QUALITY_LEVEL_HIGH | 0 | High image quality. | 221| QUALITY_LEVEL_MEDIUM | 1 | Medium image quality.| 222| QUALITY_LEVEL_LOW | 2 | Low image quality. | 223 224## MetadataObjectType 225 226Enumerates the metadata object types. 227 228**Atomic service API**: This API can be used in atomic services since API version 19. 229 230**System capability**: SystemCapability.Multimedia.Camera.Core 231 232| Name | Value | Description | 233| ------------------------- | ---- | ----------------- | 234| FACE_DETECTION | 0 | Metadata object used for face detection.<br>The detection point must be in the coordinate system (0-1), where the upper left corner is (0, 0) and the lower right corner is (1, 1).<br>The coordinate system is based on the horizontal device direction with the device's charging port on the right.<br>If the layout of a preview screen of an application is based on the vertical direction with the charging port on the lower side,<br>the layout width and height are (w, h) and the return point is (x, y), then the coordinate point after conversion is (1-y, x).| 235 236## FlashMode 237 238Enumerates the flash modes. 239 240**Atomic service API**: This API can be used in atomic services since API version 19. 241 242**System capability**: SystemCapability.Multimedia.Camera.Core 243 244| Name | Value | Description | 245| ---------------------- | ---- | ---------- | 246| FLASH_MODE_CLOSE | 0 | The flash is off.| 247| FLASH_MODE_OPEN | 1 | The flash is on.| 248| FLASH_MODE_AUTO | 2 | The flash mode is auto, indicating that the flash fires automatically depending on the photo capture conditions.| 249| FLASH_MODE_ALWAYS_OPEN | 3 | The flash is steady on.| 250 251## ExposureMode 252 253Enumerates the exposure modes. 254 255**Atomic service API**: This API can be used in atomic services since API version 19. 256 257**System capability**: SystemCapability.Multimedia.Camera.Core 258 259| Name | Value | Description | 260| ----------------------------- | ---- | ----------- | 261| EXPOSURE_MODE_LOCKED | 0 | Exposure locked. The metering point cannot be set.| 262| EXPOSURE_MODE_AUTO | 1 | Auto exposure. The metering point can be set by calling [AutoExposure.setMeteringPoint](arkts-apis-camera-AutoExposure.md#setmeteringpoint11).| 263| EXPOSURE_MODE_CONTINUOUS_AUTO | 2 | Continuous auto exposure. The metering point cannot be set.| 264 265## FocusMode 266 267Enumerates the focus modes. 268 269**Atomic service API**: This API can be used in atomic services since API version 19. 270 271**System capability**: SystemCapability.Multimedia.Camera.Core 272 273| Name | Value | Description | 274| -------------------------- | ---- | ------------ | 275| FOCUS_MODE_MANUAL | 0 | Manual focus. The focal length of the camera can be manually set to change the focus position. However, the focal point cannot be set. | 276| FOCUS_MODE_CONTINUOUS_AUTO | 1 | Continuous auto focus. The focal point cannot be set.| 277| FOCUS_MODE_AUTO | 2 | Auto focus. The focal point can be set by calling [Focus.setFocusPoint](arkts-apis-camera-Focus.md#setfocuspoint11), and auto focus is performed once based on the focal point. | 278| FOCUS_MODE_LOCKED | 3 | Focus locked. The focal point cannot be set. | 279 280## FocusState 281 282Enumerates the focus states. 283 284**Atomic service API**: This API can be used in atomic services since API version 19. 285 286**System capability**: SystemCapability.Multimedia.Camera.Core 287 288| Name | Value | Description | 289| --------------------- | ---- | --------- | 290| FOCUS_STATE_SCAN | 0 | Focusing. | 291| FOCUS_STATE_FOCUSED | 1 | Focused. | 292| FOCUS_STATE_UNFOCUSED | 2 | Unfocused.| 293 294## VideoStabilizationMode 295 296Enumerates the video stabilization modes. 297 298**Atomic service API**: This API can be used in atomic services since API version 19. 299 300**System capability**: SystemCapability.Multimedia.Camera.Core 301 302| Name | Value | Description | 303| --------- | ---- | ------------ | 304| OFF | 0 | Video stabilization is disabled. | 305| LOW | 1 | The basic video stabilization algorithm is used. | 306| MIDDLE | 2 | A video stabilization algorithm with a stabilization effect better than that of the **LOW** type is used. | 307| HIGH | 3 | A video stabilization algorithm with a stabilization effect better than that of the **MIDDLE** type is used. | 308| AUTO | 4 | The system automatically selects a video stabilization algorithm. | 309 310## SmoothZoomMode<sup>11+</sup> 311 312Enumerates the smooth zoom modes. 313 314**Atomic service API**: This API can be used in atomic services since API version 19. 315 316**System capability**: SystemCapability.Multimedia.Camera.Core 317 318| Name | Value | Description | 319| ------------ | ---- | -------------- | 320| NORMAL | 0 | Bessel curve mode. | 321 322## PreconfigType<sup>12+</sup> 323 324Enumerates the preconfigured resolution types. 325 326**Atomic service API**: This API can be used in atomic services since API version 19. 327 328**System capability**: SystemCapability.Multimedia.Camera.Core 329 330| Name | Value| Description | 331|-------------------------|---|------------| 332| PRECONFIG_720P | 0 | 720p resolution. | 333| PRECONFIG_1080P | 1 | 1080p resolution. | 334| PRECONFIG_4K | 2 | 4K resolution. | 335| PRECONFIG_HIGH_QUALITY | 3 | High-quality resolution. | 336 337## PreconfigRatio<sup>12+</sup> 338 339Enumerates the preconfigured aspect ratios. 340 341**Atomic service API**: This API can be used in atomic services since API version 19. 342 343**System capability**: SystemCapability.Multimedia.Camera.Core 344 345| Name | Value| Description | 346|--------------------------|---|---------| 347| PRECONFIG_RATIO_1_1 | 0 | 1:1 aspect ratio. | 348| PRECONFIG_RATIO_4_3 | 1 | 4:3 aspect ratio. | 349| PRECONFIG_RATIO_16_9 | 2 | 16:9 aspect ratio.| 350 351## QualityPrioritization<sup>14+</sup> 352 353Enumerates the priority levels for video recording quality. 354 355**Atomic service API**: This API can be used in atomic services since API version 19. 356 357**System capability**: SystemCapability.Multimedia.Camera.Core 358 359| Name | Value | Description | 360| ------------- | --- | ---------- | 361| HIGH_QUALITY | 0 | Prioritizes high-quality video recording. | 362| POWER_BALANCE | 1 | Prioritizes video recording quality while balancing power consumption.| 363 364## WhiteBalanceMode<sup>20+</sup> 365 366Enumerates the white balance modes. 367 368**Atomic service API**: This API can be used in atomic services since API version 20. 369 370**System capability**: SystemCapability.Multimedia.Camera.Core 371 372| Name | Value| Description | 373|----------------|---| ----------- | 374| AUTO | 0 | Automatic.| 375| CLOUDY | 1 | Cloudy.| 376| INCANDESCENT | 2 | Incandescent light.| 377| FLUORESCENT | 3 | Fluorescence light.| 378| DAYLIGHT | 4 | Daylight.| 379| MANUAL | 5 | Manual.| 380| LOCKED | 6 | Locked. | 381 382## SystemPressureLevel<sup>20+</sup> 383 384Enumerates the system pressure levels. 385 386**Atomic service API**: This API can be used in atomic services since API version 20. 387 388**System capability**: SystemCapability.Multimedia.Camera.Core 389 390| Name | Value| Description | 391|--------------------------|---|------------| 392| SYSTEM_PRESSURE_NORMAL | 0 | The system pressure is normal.| 393| SYSTEM_PRESSURE_MILD | 1 | The system pressure is elevated but not actively managed by the system.| 394| SYSTEM_PRESSURE_SEVERE | 2 | The system pressure may affect the overall image quality and performance.| 395| SYSTEM_PRESSURE_CRITICAL | 3 | The system pressure has a significant impact on the image quality and performance.| 396| SYSTEM_PRESSURE_SHUTDOWN | 4 | The system pressure is too high, causing the system to shut down.| 397 398## ControlCenterEffectType<sup>20+</sup> 399 400Enumerates the effect types supported by the camera controller. 401 402**Atomic service API**: This API can be used in atomic services since API version 20. 403 404**System capability**: SystemCapability.Multimedia.Camera.Core 405 406| Name | Value| Description | 407|-----------|---|---------| 408| BEAUTY | 0 | Beauty effect. | 409| PORTRAIT | 1 | Portrait blur effect.| 410