MultiMedia_Camera

    Since:

    1.0

    Version:

    1.0

    Summary

    Files

    Data Structures

    Data Structure Name

    Description

    Provides functions in the Camera class to implement camera operations. operations.

    Functions

    Function Documentation

    Camera()

    Description:

    A constructor used to create a instance.

    Configure()

    Description:

    Configures the camera using the object.

    Parameters:

    Name

    Description

    config Indicates the pointer to the object.

    GetCameraConfig()

    1. virtual const [CameraConfig]($api-api-SmartVision-Devices-OHOS-Media-CameraConfig.md)* OHOS::Media::Camera::GetCameraConfig () const

    Description:

    Obtains the camera configuration. You can use the obtained object to configure the camera.

    Returns:

    Returns the pointer to the CameraConfig object if obtained; returns NULL otherwise.

    Description:

    Obtains the camera ID.

    Returns:

    Returns the camera ID if obtained; returns the “Error” string if the camera fails to be created.

    GetFrameConfig()

    Obtains the frame configuration.

    Parameters:

    Returns:

    Returns the pointer to the object if obtained; returns NULL otherwise.

    Release()

    1. virtual void OHOS::Media::Camera::Release ()

    Description:

    Releases the object and associated resources.

    StopLoopingCapture()

    Description:

    Stops looping-frame capture.

    Returns:

    Returns true if the looping-frame capture is successfully stopped; returns false otherwise.

    TriggerLoopingCapture()

    Description:

    Triggers looping-frame capture.

    Parameters:

    Name

    Description

    fc Indicates the frame configuration.

    Returns:

    Returns true if the looping-frame capture is successfully started; returns false otherwise.

    1. virtual int32_t OHOS::Media::Camera::TriggerSingleCapture ([FrameConfig]($api-api-SmartVision-Devices-OHOS-Media-FrameConfig.md) & frameConfig)

    Description:

    Starts single-frame capture. The frame parameters are set through the object, and the captured image data is stored in the surface of the FrameConfig object.

    Parameters:

    Returns:

    Returns true if the single-frame capture is successfully started and the data is stored; returns false otherwise.

    ~Camera()

    Description:

    A destructor used to delete the instance.