MultiMedia_CameraKit
Overview
Defines the CameraKit class for using camera functionalities.
Since:
1.0
Version:
1.0
Summary
Files
Data Structures
Provides functions in the CameraKit class. |
Functions
A destructor used to delete the CameraKit instance. |
|
static CameraKit Obtains a single instance of the CameraKit. |
|
OHOS::Media::CameraKit::GetCameraAbility (std::string cameraId) |
const CameraAbility Obtains the camera capability, including the resolutions and frame rates. |
OHOS::Media::CameraKit::RegisterCameraDeviceCallback (CameraDeviceCallback &callback, EventHandler &handler) |
Registers a camera callback for camera status changes and an event callback to respond to a triggered event. |
OHOS::Media::CameraKit::UnregisterCameraDeviceCallback (CameraDeviceCallback &callback) |
|
OHOS::Media::CameraKit::CreateCamera (const std::string &cameraId, CameraStateCallback &callback, EventHandler &handler) |
Details
Function Documentation
CreateCamera()
void OHOS::Media::CameraKit::CreateCamera (const std::string & cameraId, [CameraStateCallback]($api-api-SmartVision-Devices-OHOS-Media-CameraStateCallback.md) & callback, EventHandler & handler )
Description:
Creates a camera object.
Parameters:
cameraId | Indicates the camera ID. |
callback | Indicates the camera callback. |
handler | Indicates the event callback to register. |
GetCameraAbility()
const [CameraAbility]($api-api-SmartVision-Devices-OHOS-Media-CameraAbility.md)* OHOS::Media::CameraKit::GetCameraAbility (std::string cameraId)
Description:
Obtains the camera capability, including the resolutions and frame rates.
Parameters:
cameraId | Indicates the camera ID. |
Returns:
Returns the CameraAbility object.
GetCameraIds()
std::list<std::string> OHOS::Media::CameraKit::GetCameraIds ()
Description:
Obtains IDs of cameras that are currently available.
Returns:
Returns the camera IDs if obtained; returns NULL otherwise.
GetInstance()
static [CameraKit]($api-api-SmartVision-Devices-OHOS-Media-CameraKit.md)* OHOS::Media::CameraKit::GetInstance ()
Description:
Obtains a single instance of the CameraKit.
Returns:
Returns the CameraKit instance if obtained; returns NULL otherwise.
RegisterCameraDeviceCallback()
void OHOS::Media::CameraKit::RegisterCameraDeviceCallback ([CameraDeviceCallback]($api-api-SmartVision-Devices-OHOS-Media-CameraDeviceCallback.md) & callback, EventHandler & handler )
Description:
Registers a camera callback for camera status changes and an event callback to respond to a triggered event.
Parameters:
callback | Indicates the camera callback to register. |
handler | Indicates the event callback to register. |
UnregisterCameraDeviceCallback()
void OHOS::Media::CameraKit::UnregisterCameraDeviceCallback ([CameraDeviceCallback]($api-api-SmartVision-Devices-OHOS-Media-CameraDeviceCallback.md) & callback)
Description:
Unregisters a camera callback.
Parameters:
callback | Indicates the camera callback to unregister. |
~CameraKit()
OHOS::Media::CameraKit::~CameraKit ()
Description:
A destructor used to delete the CameraKit instance.