MultiMedia_CameraStateCallback

Overview

Provides callbacks for camera states to configure responses to the states.

Since:

1.0

Version:

1.0

Summary

Files

File Name

Description

camera_state_callback.h

Declares functions in the CameraStateCallback class.

Data Structures

Data Structure Name

Description

OHOS::Media::CameraStateCallback

Provides functions to response to camera states.

Functions

Function Name

Description

OHOS::Media::CameraStateCallback::CameraStateCallback ()=default

 

A constructor used to create a CameraStateCallback instance.

OHOS::Media::CameraStateCallback::~CameraStateCallback ()

virtual 

A destructor used to delete the CameraStateCallback instance.

OHOS::Media::CameraStateCallback::OnCreated (Camera &c)

virtual void 

Called when the camera is successfully created.

OHOS::Media::CameraStateCallback::OnCreateFailed (const std::string cameraId, int32_t errorCode)

virtual void 

Called when the camera fails to be created.

OHOS::Media::CameraStateCallback::OnReleased (Camera &c)

virtual void 

Called when the camera is released.

OHOS::Media::CameraStateCallback::OnConfigured (Camera &c)

virtual void 

Called when the camera is configured.

OHOS::Media::CameraStateCallback::OnConfigureFailed (const std::string cameraId, int32_t errorCode)

virtual void 

Called when the camera fails to be configured.

Details

Function Documentation

CameraStateCallback()

  1. OHOS::Media::CameraStateCallback::CameraStateCallback ()

Description:

A constructor used to create a CameraStateCallback instance.

OnConfigured()

  1. virtual void OHOS::Media::CameraStateCallback::OnConfigured ([Camera]($api-api-SmartVision-Devices-OHOS-Media-Camera.md) & c)

Description:

Called when the camera is configured.

Parameters:

Name

Description

c camera Indicates the Camera object.

OnConfigureFailed()

  1. virtual void OHOS::Media::CameraStateCallback::OnConfigureFailed (const std::string cameraId, int32_t errorCode )

Description:

Called when the camera fails to be configured.

Parameters:

Name

Description

c Indicates the Camera object.
errorCode Indicates the error code.

OnCreated()

  1. virtual void OHOS::Media::CameraStateCallback::OnCreated ([Camera]($api-api-SmartVision-Devices-OHOS-Media-Camera.md) & c)

Description:

Called when the camera is successfully created.

Parameters:

Name

Description

c Indicates the Camera object.

OnCreateFailed()

  1. virtual void OHOS::Media::CameraStateCallback::OnCreateFailed (const std::string cameraId, int32_t errorCode )

Description:

Called when the camera fails to be created.

Parameters:

Name

Description

cameraId Indicates the camera ID.
errorCode Indicates the error code.

OnReleased()

  1. virtual void OHOS::Media::CameraStateCallback::OnReleased ([Camera]($api-api-SmartVision-Devices-OHOS-Media-Camera.md) & c)

Description:

Called when the camera is released.

Parameters:

Name

Description

c Indicates the Camera object.

~CameraStateCallback()

  1. virtual OHOS::Media::CameraStateCallback::~CameraStateCallback ()

Description:

A destructor used to delete the CameraStateCallback instance.