同步操作将从 OpenHarmony/docs 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
Defines the Camera class for camera-related operations.
Since:
1.0
Version:
1.0
Declares functions in the Camera class to implement camera operations. |
Provides functions in the Camera class to implement camera operations. operations. |
OHOS::Media::Camera::~Camera ()=default |
A destructor used to delete the Camera instance. |
OHOS::Media::Camera::GetCameraConfig () const |
virtual const CameraConfig * Obtains the camera configuration. You can use the obtained CameraConfig object to configure the camera. |
OHOS::Media::Camera::GetFrameConfig (int32_t type) |
virtual FrameConfig * |
OHOS::Media::Camera::Configure (CameraConfig &config) |
Configures the camera using the CameraConfig object. |
OHOS::Media::Camera::TriggerLoopingCapture (FrameConfig &frameConfig) |
|
OHOS::Media::Camera::TriggerSingleCapture (FrameConfig &frameConfig) |
Starts single-frame capture. The frame parameters are set through the FrameConfig object, and the captured image data is stored in the surface of the FrameConfig object. |
Releases the Camera object and associated resources. |
|
OHOS::Media::Camera::Camera ()=default |
A constructor used to create a Camera instance. |
OHOS::Media::Camera::Camera ()
Description:
A constructor used to create a Camera instance.
virtual void OHOS::Media::Camera::Configure ([CameraConfig](OHOS-Media-CameraConfig.md) & config)
Description:
Configures the camera using the CameraConfig object.
Parameters:
config | Indicates the pointer to the CameraConfig object. |
virtual const [CameraConfig](OHOS-Media-CameraConfig.md)* OHOS::Media::Camera::GetCameraConfig () const
Description:
Obtains the camera configuration. You can use the obtained CameraConfig object to configure the camera.
Returns:
Returns the pointer to the CameraConfig object if obtained; returns NULL otherwise.
virtual std::string OHOS::Media::Camera::GetCameraId ()
Description:
Obtains the camera ID.
Returns:
Returns the camera ID if obtained; returns the "Error" string if the camera fails to be created.
virtual [FrameConfig](OHOS-Media-FrameConfig.md)* OHOS::Media::Camera::GetFrameConfig (int32_t type)
Description:
Obtains the frame configuration.
Parameters:
type | Indicates the type of the frame configuration. |
Returns:
Returns the pointer to the FrameConfig object if obtained; returns NULL otherwise.
virtual void OHOS::Media::Camera::Release ()
Description:
Releases the Camera object and associated resources.
virtual void OHOS::Media::Camera::StopLoopingCapture ()
Description:
Stops looping-frame capture.
Returns:
Returns true if the looping-frame capture is successfully stopped; returns false otherwise.
virtual int32_t OHOS::Media::Camera::TriggerLoopingCapture ([FrameConfig](OHOS-Media-FrameConfig.md) & frameConfig)
Description:
Triggers looping-frame capture.
Parameters:
fc | Indicates the frame configuration. |
Returns:
Returns true if the looping-frame capture is successfully started; returns false otherwise.
virtual int32_t OHOS::Media::Camera::TriggerSingleCapture ([FrameConfig](OHOS-Media-FrameConfig.md) & frameConfig)
Description:
Starts single-frame capture. The frame parameters are set through the FrameConfig object, and the captured image data is stored in the surface of the FrameConfig object.
Parameters:
fc | Indicates the frame configuration. |
Returns:
Returns true if the single-frame capture is successfully started and the data is stored; returns false otherwise.
virtual OHOS::Media::Camera::~Camera ()
Description:
A destructor used to delete the Camera instance.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。