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

Types

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