camera.h

Overview

The camera.h file declares the basic concepts of the camera.

Library: libohcamera.so

System capability: SystemCapability.Multimedia.Camera.Core

Since: 11

Related module: OH_Camera

Summary

Structs

Name Description
Camera_Size Defines the parameters that describe the size.
Camera_Profile Defines the profile of the camera stream.
Camera_FrameRateRange Defines the frame rate range.
Camera_VideoProfile Defines the video profile.
Camera_OutputCapability Defines the camera output capability.
Camera_Device Defines the camera device.
Camera_StatusInfo Defines the camera status information.
Camera_Point Defines the parameters that describe a point.
Camera_Location Defines the location where the photo is taken.
Camera_PhotoCaptureSetting Defines the photographing parameters.
Camera_FrameShutterInfo Defines the frame shutter callback.
Camera_CaptureEndInfo Defines the capture end information.
Camera_Rect Defines the rectangle.
Camera_MetadataObject Defines the camera metadata.

Types

Name Description
Camera_Manager Defines the camera manager.
Camera_ErrorCode Defines an enum that enumerates the camera error codes.
Camera_Status Defines an enum that enumerates the camera statuses.
Camera_Position Defines an enum that enumerates the camera positions.
Camera_Type Defines an enum that enumerates the camera types.
Camera_Connection Defines an enum that enumerates the camera connection types.
Camera_Format Defines an enum that enumerates the camera output formats.
Camera_FlashMode Defines an enum that enumerates the flash modes.
Camera_ExposureMode Defines an enum that enumerates the exposure modes.
Camera_FocusMode Defines an enum that enumerates the focus modes.
Camera_FocusState Defines an enum that enumerates the focus states.
Camera_VideoStabilizationMode Defines an enum that enumerates the video stabilization modes.
Camera_ImageRotation Defines an enum that enumerates the image rotation angles.
Camera_QualityLevel Defines an enum that enumerates the image quality levels.
Camera_MetadataObjectType Defines an enum that enumerates the metadata object types.
Camera_Size Defines the parameters that describe the size.
Camera_Profile Defines the profile of the camera stream.
Camera_FrameRateRange Defines the frame rate range.
Camera_VideoProfile Defines the video profile.
Camera_OutputCapability Defines the camera output capability.
Camera_Device Defines the camera device.
Camera_StatusInfo Defines the camera status information.
Camera_Point Defines the parameters that describe a point.
Camera_Location Defines the location where the photo is taken.
Camera_PhotoCaptureSetting Defines the photographing parameters.
Camera_FrameShutterInfo Defines the frame shutter callback.
Camera_CaptureEndInfo Defines the capture end information.
Camera_Rect Defines the rectangle.
Camera_MetadataObject Defines the camera metadata.

Enums

Name Description
Camera_ErrorCode {
CAMERA_OK = 0, CAMERA_INVALID_ARGUMENT = 7400101, CAMERA_OPERATION_NOT_ALLOWED = 7400102, CAMERA_SESSION_NOT_CONFIG = 7400103,
CAMERA_SESSION_NOT_RUNNING = 7400104, CAMERA_SESSION_CONFIG_LOCKED = 7400105, CAMERA_DEVICE_SETTING_LOCKED = 7400106, CAMERA_CONFLICT_CAMERA = 7400107,
CAMERA_DEVICE_DISABLED = 7400108, CAMERA_DEVICE_PREEMPTED = 7400109, CAMERA_SERVICE_FATAL_ERROR = 7400201
}
Enumerates the camera error codes.
Camera_Status { CAMERA_STATUS_APPEAR = 0, CAMERA_STATUS_DISAPPEAR = 1, CAMERA_STATUS_AVAILABLE = 2, CAMERA_STATUS_UNAVAILABLE = 3 } Enumerates the camera statuses.
Camera_Position { CAMERA_POSITION_UNSPECIFIED = 0, CAMERA_POSITION_BACK = 1, CAMERA_POSITION_FRONT = 2 } Enumerates the camera positions.
Camera_Type {
CAMERA_TYPE_DEFAULT = 0, CAMERA_TYPE_WIDE_ANGLE = 1, CAMERA_TYPE_ULTRA_WIDE = 2, CAMERA_TYPE_TELEPHOTO = 3,
CAMERA_TYPE_TRUE_DEPTH = 4
}
Enumerates the camera types.
Camera_Connection { CAMERA_CONNECTION_BUILT_IN = 0, CAMERA_CONNECTION_USB_PLUGIN = 1, CAMERA_CONNECTION_REMOTE = 2 } Enumerates the camera connection types.
Camera_Format { CAMERA_FORMAT_RGBA_8888 = 3, CAMERA_FORMAT_YUV_420_SP = 1003, CAMERA_FORMAT_JPEG = 2000 } Enumerates the camera output formats.
Camera_FlashMode { FLASH_MODE_CLOSE = 0, FLASH_MODE_OPEN = 1, FLASH_MODE_AUTO = 2, FLASH_MODE_ALWAYS_OPEN = 3 } Enumerates the flash modes.
Camera_ExposureMode { EXPOSURE_MODE_LOCKED = 0, EXPOSURE_MODE_AUTO = 1, EXPOSURE_MODE_CONTINUOUS_AUTO = 2 } Enumerates the exposure modes.
Camera_FocusMode { FOCUS_MODE_MANUAL = 0, FOCUS_MODE_CONTINUOUS_AUTO = 1, FOCUS_MODE_AUTO = 2, FOCUS_MODE_LOCKED = 3 } Enumerates the focus modes.
Camera_FocusState { FOCUS_STATE_SCAN = 0, FOCUS_STATE_FOCUSED = 1, FOCUS_STATE_UNFOCUSED = 2 } Enumerates the focus states.
Camera_VideoStabilizationMode {
STABILIZATION_MODE_OFF = 0, STABILIZATION_MODE_LOW = 1, STABILIZATION_MODE_MIDDLE = 2, STABILIZATION_MODE_HIGH = 3,
STABILIZATION_MODE_AUTO = 4
}
Enumerates the video stabilization modes.
Camera_ImageRotation { IAMGE_ROTATION_0 = 0, IAMGE_ROTATION_90 = 90, IAMGE_ROTATION_180 = 180, IAMGE_ROTATION_270 = 270 } Enumerates the image rotation angles.
Camera_QualityLevel { QUALITY_LEVEL_HIGH = 0, QUALITY_LEVEL_MEDIUM = 1, QUALITY_LEVEL_LOW = 2 } Enumerates the image quality levels.
Camera_MetadataObjectType { FACE_DETECTION = 0 } Enumerates the metadata object types.

Functions

Name Description
OH_Camera_GetCameraManager (Camera_Manager **cameraManager) Obtains a CameraManager instance.
OH_Camera_DeleteCameraManager (Camera_Manager *cameraManager) Deletes a CameraManager instance.