harmony 鸿蒙camera_manager.h

  • 2025-06-12
  • 浏览 (3)

camera_manager.h

Overview

The camera_manager.h file declares the camera manager concepts.

Library: libohcamera.so

File to include: <ohcamera/camera_manager.h>

System capability: SystemCapability.Multimedia.Camera.Core

Since: 11

Related module: OH_Camera

Summary

Structs

Name Description
struct CameraManager_Callbacks Describes the callbacks used to listen for camera status changes.

Types

Name Description
typedef void(* OH_CameraManager_StatusCallback) (Camera_Manager *cameraManager, Camera_StatusInfo *status) Defines the callback defined in the CameraManager_Callbacks struct and used to report the camera manager status.
typedef void(* OH_CameraManager_TorchStatusCallback) (Camera_Manager *cameraManager, Camera_TorchStatusInfo *status) Defines the callback invoked when the flashlight status changes.
typedef struct CameraManager_Callbacks CameraManager_Callbacks Defines a struct for the callbacks used to listen for camera status changes.

Functions

Name Description
Camera_ErrorCode OH_CameraManager_RegisterCallback (Camera_Manager *cameraManager, CameraManager_Callbacks *callback) Registers a callback to listen for camera status changes.
Camera_ErrorCode OH_CameraManager_UnregisterCallback (Camera_Manager *cameraManager, CameraManager_Callbacks *callback) Unregisters the callback used to listen for camera status changes.
Camera_ErrorCode OH_CameraManager_RegisterTorchStatusCallback (Camera_Manager *cameraManager, OH_CameraManager_TorchStatusCallback torchStatusCallback) Registers a callback to listen for flashlight status changes.
Camera_ErrorCode OH_CameraManager_UnregisterTorchStatusCallback (Camera_Manager *cameraManager, OH_CameraManager_TorchStatusCallback torchStatusCallback) Unregisters the callback used to listen for flashlight status changes.
Camera_ErrorCode OH_CameraManager_GetSupportedCameras (Camera_Manager *cameraManager, Camera_Device **cameras, uint32_t *size) Obtains the supported cameras.
Camera_ErrorCode OH_CameraManager_DeleteSupportedCameras (Camera_Manager *cameraManager, Camera_Device *cameras, uint32_t size) Deletes supported cameras.
Camera_ErrorCode OH_CameraManager_GetSupportedCameraOutputCapability (Camera_Manager *cameraManager, const Camera_Device *camera, Camera_OutputCapability **cameraOutputCapability) Obtains the output capability supported by a camera.
Camera_ErrorCode OH_CameraManager_GetSupportedCameraOutputCapabilityWithSceneMode (Camera_Manager *cameraManager, const Camera_Device *camera, Camera_SceneMode sceneMode, Camera_OutputCapability **cameraOutputCapability) Obtains the output capability supported by a camera in a given scene mode.
Camera_ErrorCode OH_CameraManager_DeleteSupportedCameraOutputCapability (Camera_Manager *cameraManager, Camera_OutputCapability *cameraOutputCapability) Deletes the output capability supported by a camera.
Camera_ErrorCode OH_CameraManager_IsCameraMuted (Camera_Manager *cameraManager, bool *isCameraMuted) Checks whether a camera is muted.
Camera_ErrorCode OH_CameraManager_CreateCaptureSession (Camera_Manager *cameraManager, Camera_CaptureSession **captureSession) Creates a CaptureSession instance.
Camera_ErrorCode OH_CameraManager_CreateCameraInput (Camera_Manager *cameraManager, const Camera_Device *camera, Camera_Input **cameraInput) Creates a CameraInput instance.
Camera_ErrorCode OH_CameraManager_CreateCameraInput_WithPositionAndType (Camera_Manager *cameraManager, Camera_Position position, Camera_Type type, Camera_Input **cameraInput) Creates a CameraInput instance with the specified location and type.
Camera_ErrorCode OH_CameraManager_CreatePreviewOutput (Camera_Manager *cameraManager, const Camera_Profile *profile, const char *surfaceId, Camera_PreviewOutput **previewOutput) Creates a PreviewOutput instance.
Camera_ErrorCode OH_CameraManager_CreatePreviewOutputUsedInPreconfig (Camera_Manager *cameraManager, const char *surfaceId, Camera_PreviewOutput **previewOutput) Creates a PreviewOutput instance to be used in a preconfiguration stream.
Camera_ErrorCode OH_CameraManager_CreatePhotoOutput (Camera_Manager *cameraManager, const Camera_Profile *profile, const char *surfaceId, Camera_PhotoOutput **photoOutput) Creates a PhotoOutput instance.
Camera_ErrorCode OH_CameraManager_CreatePhotoOutputUsedInPreconfig (Camera_Manager *cameraManager, const char *surfaceId, Camera_PhotoOutput **photoOutput) Creates a PhotoOutput instance to be used in a preconfiguration stream.
Camera_ErrorCode OH_CameraManager_CreatePhotoOutputWithoutSurface (Camera_Manager *cameraManager, const Camera_Profile *profile, Camera_PhotoOutput **photoOutput) Creates a PhotoOutput instance. surfaceId is not required in this function.
Camera_ErrorCode OH_CameraManager_CreateVideoOutput (Camera_Manager *cameraManager, const Camera_VideoProfile *profile, const char *surfaceId, Camera_VideoOutput **videoOutput) Creates a VideoOutput instance.
Camera_ErrorCode OH_CameraManager_CreateVideoOutputUsedInPreconfig (Camera_Manager *cameraManager, const char *surfaceId, Camera_VideoOutput **videoOutput) Creates a VideoOutput instance to be used in a preconfiguration stream.
Camera_ErrorCode OH_CameraManager_CreateMetadataOutput (Camera_Manager *cameraManager, const Camera_MetadataObjectType *profile, Camera_MetadataOutput **metadataOutput) Creates a MetadataOutput instance.
Camera_ErrorCode OH_CameraManager_GetSupportedSceneModes (Camera_Device *camera, Camera_SceneMode **sceneModes, uint32_t *size) Obtains the scene modes supported by a camera.
Camera_ErrorCode OH_CameraManager_DeleteSceneModes (Camera_Manager *cameraManager, Camera_SceneMode *sceneModes) Deletes scene modes.
Camera_ErrorCode OH_CameraManager_IsTorchSupported (Camera_Manager *cameraManager, bool *isTorchSupported) Checks whether the device supports the flashlight.
Camera_ErrorCode OH_CameraManager_IsTorchSupportedByTorchMode (Camera_Manager *cameraManager, Camera_TorchMode torchMode, bool *isTorchSupported) Checks whether the device supports the specified flashlight mode.
Camera_ErrorCode OH_CameraManager_SetTorchMode (Camera_Manager *cameraManager, Camera_TorchMode torchMode) Sets a flashlight mode.
Camera_ErrorCode OH_CameraManager_GetCameraDevice (Camera_Manager *cameraManager, Camera_Position position, Camera_Type type, Camera_Device *camera) Obtains the specified camera based on the camera position and type.
Camera_ErrorCode OH_CameraManager_GetCameraConcurrentInfos (Camera_Manager *cameraManager, const Camera_Device *camera, uint32_t deviceSize, Camera_ConcurrentInfo **cameraConcurrentInfo, uint32_t *infoSize) Obtains the concurrency information of the specified cameras. If the return value is empty, concurrency is not supported.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Camera Kit

harmony 鸿蒙Camera_CaptureEndInfo

harmony 鸿蒙Camera_CaptureStartInfo

harmony 鸿蒙Camera_ConcurrentInfo

harmony 鸿蒙Camera_Device

harmony 鸿蒙Camera_FrameRateRange

harmony 鸿蒙Camera_FrameShutterEndInfo

harmony 鸿蒙Camera_FrameShutterInfo

harmony 鸿蒙Camera_Location

harmony 鸿蒙Camera_MetadataObject

0  赞