photo_output.h
Overview
The file declares the photo output concepts.
File to include: <ohcamera/photo_output.h>
Library: libohcamera.so
System capability: SystemCapability.Multimedia.Camera.Core
Since: 11
Related module: OH_Camera
Summary
Structs
| Name | typedef Keyword | Description |
|---|---|---|
| PhotoOutput_Callbacks | PhotoOutput_Callbacks | Describes the callbacks related to photo output. |
| Camera_PhotoOutput | Camera_PhotoOutput | Describes the photo output object. You can use OH_CameraManager_CreatePhotoOutput to create such an object. |
Functions
Function Description
OH_PhotoOutput_OnFrameStart()
typedef void (*OH_PhotoOutput_OnFrameStart)(Camera_PhotoOutput* photoOutput)
Description
Defines the callback defined in the PhotoOutput_Callbacks struct and used to report photo output frame start events.
Since: 11
Parameters
| Name | Description |
|---|---|
| Camera_PhotoOutput* photoOutput | Pointer to the PhotoOutput instance that transfers the callback. |
OH_PhotoOutput_OnFrameShutter()
typedef void (*OH_PhotoOutput_OnFrameShutter)(Camera_PhotoOutput* photoOutput, Camera_FrameShutterInfo* info)
Description
Defines the callback defined in the PhotoOutput_Callbacks struct and used to report frame shutter events.
Since: 11
Parameters
| Name | Description |
|---|---|
| Camera_PhotoOutput* photoOutput | Pointer to the PhotoOutput instance that transfers the callback. |
| Camera_FrameShutterInfo* info | Pointer to the frame shutter information. |
OH_PhotoOutput_OnFrameEnd()
typedef void (*OH_PhotoOutput_OnFrameEnd)(Camera_PhotoOutput* photoOutput, int32_t frameCount)
Description
Defines the callback defined in the PhotoOutput_Callbacks struct and used to report photo output frame end events.
Since: 11
Parameters
| Name | Description |
|---|---|
| Camera_PhotoOutput* photoOutput | Pointer to the PhotoOutput instance that transfers the callback. |
| int32_t frameCount | Number of frames to be included in the callback. |
OH_PhotoOutput_OnError()
typedef void (*OH_PhotoOutput_OnError)(Camera_PhotoOutput* photoOutput, Camera_ErrorCode errorCode)
Description
Defines the callback defined in the PhotoOutput_Callbacks struct and used to report photo output errors.
Since: 11
Parameters
| Name | Description |
|---|---|
| Camera_PhotoOutput* photoOutput | Pointer to the PhotoOutput instance that transfers the callback. |
| Camera_ErrorCode errorCode | Error code reported during photo output. |
See also
OH_PhotoOutput_CaptureEnd()
typedef void (*OH_PhotoOutput_CaptureEnd)(Camera_PhotoOutput* photoOutput, int32_t frameCount)
Description
Defines the callback invoked when the capture ends.
Since: 12
Parameters
| Name | Description |
|---|---|
| Camera_PhotoOutput* photoOutput | Pointer to the PhotoOutput instance that transfers the callback. |
| int32_t frameCount | Number of frames to be included in the callback. |
OH_PhotoOutput_CaptureStartWithInfo()
typedef void (*OH_PhotoOutput_CaptureStartWithInfo)(Camera_PhotoOutput* photoOutput, Camera_CaptureStartInfo* Info)
Description
Defines the callback invoked when the capture starts.
Since: 12
Parameters
| Name | Description |
|---|---|
| Camera_PhotoOutput* photoOutput | Pointer to the PhotoOutput instance that transfers the callback. |
| Camera_CaptureStartInfo* Info | Pointer to the capture start information passed by the callback. |
OH_PhotoOutput_OnFrameShutterEnd()
typedef void (*OH_PhotoOutput_OnFrameShutterEnd)(Camera_PhotoOutput* photoOutput, Camera_FrameShutterInfo* Info)
Description
Defines the callback invoked when frame shutter ends.
Since: 12
Parameters
| Name | Description |
|---|---|
| Camera_PhotoOutput* photoOutput | Pointer to the PhotoOutput instance that transfers the callback. |
| Camera_FrameShutterInfo* Info | Pointer to the frame shutter information. |
OH_PhotoOutput_CaptureReady()
typedef void (*OH_PhotoOutput_CaptureReady)(Camera_PhotoOutput* photoOutput)
Description
Defines the callback invoked when the camera is ready to take photos. When the callback is received, the next capture can be performed.
Since: 12
Parameters
| Name | Description |
|---|---|
| Camera_PhotoOutput* photoOutput | Pointer to the PhotoOutput instance that transfers the callback. |
OH_PhotoOutput_EstimatedCaptureDuration()
typedef void (*OH_PhotoOutput_EstimatedCaptureDuration)(Camera_PhotoOutput* photoOutput, int64_t duration)
Description
Defines the callback for the estimated capture duration.
Since: 12
Parameters
| Name | Description |
|---|---|
| Camera_PhotoOutput* photoOutput | Pointer to the PhotoOutput instance that transfers the callback. |
| int64_t duration | Estimated capture duration passed by the callback, measured in milliseconds. |
OH_PhotoOutput_PhotoAvailable()
typedef void (*OH_PhotoOutput_PhotoAvailable)(Camera_PhotoOutput* photoOutput, OH_PhotoNative* photo)
Description
Defines the callback invoked when a high-resolution photo is available.
Since: 12
Parameters
| Name | Description |
|---|---|
| Camera_PhotoOutput* photoOutput | Pointer to the PhotoOutput instance that transfers the callback. |
| OH_PhotoNative* photo | Pointer to OH_PhotoNative passed by the callback. |
OH_PhotoOutput_PhotoAssetAvailable()
typedef void (*OH_PhotoOutput_PhotoAssetAvailable)(Camera_PhotoOutput* photoOutput, OH_MediaAsset* photoAsset)
Description
Defines the callback invoked when a photo asset is available.
Since: 12
Parameters
| Name | Description |
|---|---|
| Camera_PhotoOutput* photoOutput | Pointer to the PhotoOutput instance that transfers the callback. |
| OH_MediaAsset* photoAsset | Pointer to the media asset passed by the callback. |
OH_PhotoOutput_RegisterCallback()
Camera_ErrorCode OH_PhotoOutput_RegisterCallback(Camera_PhotoOutput* photoOutput, PhotoOutput_Callbacks* callback)
Description
Registers a callback to listen for photo output events.
Since: 11
Parameters
| Name | Description |
|---|---|
| Camera_PhotoOutput* photoOutput | Pointer to the target PhotoOutput instance. |
| PhotoOutput_Callbacks* callback | Pointer to the target callback. |
Returns
| Type | Description |
|---|---|
| Camera_ErrorCode | CAMERA_OK: The operation is successful. CAMERA_INVALID_ARGUMENT: A parameter is missing or the parameter type is incorrect. |
OH_PhotoOutput_UnregisterCallback()
Camera_ErrorCode OH_PhotoOutput_UnregisterCallback(Camera_PhotoOutput* photoOutput, PhotoOutput_Callbacks* callback)
Description
Unregisters the callback used to listen for photo output events.
Since: 11
Parameters
| Name | Description |
|---|---|
| Camera_PhotoOutput* photoOutput | Pointer to the target PhotoOutput instance. |
| PhotoOutput_Callbacks* callback | Pointer to the target callback. |
Returns
| Type | Description |
|---|---|
| Camera_ErrorCode | CAMERA_OK: The operation is successful. CAMERA_INVALID_ARGUMENT: A parameter is missing or the parameter type is incorrect. |
OH_PhotoOutput_RegisterCaptureStartWithInfoCallback()
Camera_ErrorCode OH_PhotoOutput_RegisterCaptureStartWithInfoCallback(Camera_PhotoOutput* photoOutput, OH_PhotoOutput_CaptureStartWithInfo callback)
Description
Registers a callback to listen for capture start events.
Since: 12
Parameters
| Name | Description |
|---|---|
| Camera_PhotoOutput* photoOutput | Pointer to the target PhotoOutput instance. |
| OH_PhotoOutput_CaptureStartWithInfo callback | Target callback. |
Returns
| Type | Description |
|---|---|
| Camera_ErrorCode | CAMERA_OK: The operation is successful. CAMERA_INVALID_ARGUMENT: A parameter is missing or the parameter type is incorrect. |
OH_PhotoOutput_GetPhotoRotation()
Camera_ErrorCode OH_PhotoOutput_GetPhotoRotation(Camera_PhotoOutput* photoOutput, int deviceDegree, Camera_ImageRotation* imageRotation)
Description
Obtains the photo rotation angle.
Since: 12
Parameters
| Name | Description |
|---|---|
| Camera_PhotoOutput* photoOutput | Pointer to the target PhotoOutput instance. |
| int deviceDegree | Rotation angle of the device. |
| Camera_ImageRotation* imageRotation | Pointer to the rotation angle of the photo. |
Returns
| Type | Description |
|---|---|
| Camera_ErrorCode | CAMERA_OK: The operation is successful. CAMERA_INVALID_ARGUMENT: A parameter is missing or the parameter type is incorrect. CAMERA_SERVICE_FATAL_ERROR: The camera service is abnormal. |
OH_PhotoOutput_GetPhotoRotationWithoutDeviceDegree()
Camera_ErrorCode OH_PhotoOutput_GetPhotoRotationWithoutDeviceDegree(Camera_PhotoOutput* photoOutput, Camera_ImageRotation* imageRotation)
Description
Obtains the photo rotation angle.
Since: 23
Parameters
| Name | Description |
|---|---|
| Camera_PhotoOutput* photoOutput | Pointer to the target PhotoOutput instance. |
| Camera_ImageRotation* imageRotation | Pointer to the rotation angle of the photo. |
Returns
| Type | Description |
|---|---|
| Camera_ErrorCode | CAMERA_OK: The operation is successful. CAMERA_INVALID_ARGUMENT: A parameter is missing or the parameter type is incorrect. CAMERA_SERVICE_FATAL_ERROR: The camera service is abnormal. |
OH_PhotoOutput_UnregisterCaptureStartWithInfoCallback()
Camera_ErrorCode OH_PhotoOutput_UnregisterCaptureStartWithInfoCallback(Camera_PhotoOutput* photoOutput, OH_PhotoOutput_CaptureStartWithInfo callback)
Description
Unregisters the callback used to listen for capture start events.
Since: 12
Parameters
| Name | Description |
|---|---|
| Camera_PhotoOutput* photoOutput | Pointer to the target PhotoOutput instance. |
| OH_PhotoOutput_CaptureStartWithInfo callback | Target callback. |
Returns
| Type | Description |
|---|---|
| Camera_ErrorCode | CAMERA_OK: The operation is successful. CAMERA_INVALID_ARGUMENT: A parameter is missing or the parameter type is incorrect. |
OH_PhotoOutput_RegisterCaptureEndCallback()
Camera_ErrorCode OH_PhotoOutput_RegisterCaptureEndCallback(Camera_PhotoOutput* photoOutput, OH_PhotoOutput_CaptureEnd callback)
Description
Registers a callback to listen for capture end events.
Since: 12
Parameters
| Name | Description |
|---|---|
| Camera_PhotoOutput* photoOutput | Pointer to the target PhotoOutput instance. |
| OH_PhotoOutput_CaptureEnd callback | Target callback. |
Returns
| Type | Description |
|---|---|
| Camera_ErrorCode | CAMERA_OK: The operation is successful. CAMERA_INVALID_ARGUMENT: A parameter is missing or the parameter type is incorrect. |
OH_PhotoOutput_UnregisterCaptureEndCallback()
Camera_ErrorCode OH_PhotoOutput_UnregisterCaptureEndCallback(Camera_PhotoOutput* photoOutput, OH_PhotoOutput_CaptureEnd callback)
Description
Unregisters the callback used to listen for capture end events.
Since: 12
Parameters
| Name | Description |
|---|---|
| Camera_PhotoOutput* photoOutput | Pointer to the target PhotoOutput instance. |
| OH_PhotoOutput_CaptureEnd callback | Target callback. |
Returns
| Type | Description |
|---|---|
| Camera_ErrorCode | CAMERA_OK: The operation is successful. CAMERA_INVALID_ARGUMENT: A parameter is missing or the parameter type is incorrect. |
OH_PhotoOutput_RegisterFrameShutterEndCallback()
Camera_ErrorCode OH_PhotoOutput_RegisterFrameShutterEndCallback(Camera_PhotoOutput* photoOutput, OH_PhotoOutput_OnFrameShutterEnd callback)
Description
Registers a callback to listen for frame shutter end events.
Since: 12
Parameters
| Name | Description |
|---|---|
| Camera_PhotoOutput* photoOutput | Pointer to the target PhotoOutput instance. |
| OH_PhotoOutput_OnFrameShutterEnd callback | Target callback. |
Returns
| Type | Description |
|---|---|
| Camera_ErrorCode | CAMERA_OK: The operation is successful. CAMERA_INVALID_ARGUMENT: A parameter is missing or the parameter type is incorrect. |
OH_PhotoOutput_UnregisterFrameShutterEndCallback()
Camera_ErrorCode OH_PhotoOutput_UnregisterFrameShutterEndCallback(Camera_PhotoOutput* photoOutput, OH_PhotoOutput_OnFrameShutterEnd callback)
Description
Unregisters the callback used to listen for frame shutter end events.
Since: 12
Parameters
| Name | Description |
|---|---|
| Camera_PhotoOutput* photoOutput | Pointer to the target PhotoOutput instance. |
| OH_PhotoOutput_OnFrameShutterEnd callback | Target callback. |
Returns
| Type | Description |
|---|---|
| Camera_ErrorCode | CAMERA_OK: The operation is successful. CAMERA_INVALID_ARGUMENT: A parameter is missing or the parameter type is incorrect. |
OH_PhotoOutput_RegisterCaptureReadyCallback()
Camera_ErrorCode OH_PhotoOutput_RegisterCaptureReadyCallback(Camera_PhotoOutput* photoOutput, OH_PhotoOutput_CaptureReady callback)
Description
Registers a callback to listen for camera ready events. When the callback is received, the next capture can be performed.
Since: 12
Parameters
| Name | Description |
|---|---|
| Camera_PhotoOutput* photoOutput | Pointer to the target PhotoOutput instance. |
| OH_PhotoOutput_CaptureReady callback | Target callback. |
Returns
| Type | Description |
|---|---|
| Camera_ErrorCode | CAMERA_OK: The operation is successful. CAMERA_INVALID_ARGUMENT: A parameter is missing or the parameter type is incorrect. |
OH_PhotoOutput_UnregisterCaptureReadyCallback()
Camera_ErrorCode OH_PhotoOutput_UnregisterCaptureReadyCallback(Camera_PhotoOutput* photoOutput, OH_PhotoOutput_CaptureReady callback)
Description
Unregisters the callback used to listen for camera ready events.
Since: 12
Parameters
| Name | Description |
|---|---|
| Camera_PhotoOutput* photoOutput | Pointer to the target PhotoOutput instance. |
| OH_PhotoOutput_CaptureReady callback | Target callback. |
Returns
| Type | Description |
|---|---|
| Camera_ErrorCode | CAMERA_OK: The operation is successful. CAMERA_INVALID_ARGUMENT: A parameter is missing or the parameter type is incorrect. |
OH_PhotoOutput_RegisterEstimatedCaptureDurationCallback()
Camera_ErrorCode OH_PhotoOutput_RegisterEstimatedCaptureDurationCallback(Camera_PhotoOutput* photoOutput, OH_PhotoOutput_EstimatedCaptureDuration callback)
Description
Registers a callback to listen for estimated capture duration events.
Since: 12
Parameters
| Name | Description |
|---|---|
| Camera_PhotoOutput* photoOutput | Pointer to the target PhotoOutput instance. |
| OH_PhotoOutput_EstimatedCaptureDuration callback | Target callback. |
Returns
| Type | Description |
|---|---|
| Camera_ErrorCode | CAMERA_OK: The operation is successful. CAMERA_INVALID_ARGUMENT: A parameter is missing or the parameter type is incorrect. |
OH_PhotoOutput_UnregisterEstimatedCaptureDurationCallback()
Camera_ErrorCode OH_PhotoOutput_UnregisterEstimatedCaptureDurationCallback(Camera_PhotoOutput* photoOutput, OH_PhotoOutput_EstimatedCaptureDuration callback)
Description
Unregisters the callback used to listen for estimated capture duration events.
Since: 12
Parameters
| Name | Description |
|---|---|
| Camera_PhotoOutput* photoOutput | Pointer to the target PhotoOutput instance. |
| OH_PhotoOutput_EstimatedCaptureDuration callback | Target callback. |
Returns
| Type | Description |
|---|---|
| Camera_ErrorCode | CAMERA_OK: The operation is successful. CAMERA_INVALID_ARGUMENT: A parameter is missing or the parameter type is incorrect. |
OH_PhotoOutput_RegisterPhotoAvailableCallback()
Camera_ErrorCode OH_PhotoOutput_RegisterPhotoAvailableCallback(Camera_PhotoOutput* photoOutput, OH_PhotoOutput_PhotoAvailable callback)
Description
Registers a callback to listen for photo availability events.
Since: 12
Parameters
| Name | Description |
|---|---|
| Camera_PhotoOutput* photoOutput | Pointer to the target PhotoOutput instance. |
| OH_PhotoOutput_PhotoAvailable callback | Target callback. |
Returns
| Type | Description |
|---|---|
| Camera_ErrorCode | CAMERA_OK: The operation is successful. CAMERA_INVALID_ARGUMENT: A parameter is missing or the parameter type is incorrect. CAMERA_SERVICE_FATAL_ERROR: The camera service is abnormal. |
OH_PhotoOutput_UnregisterPhotoAvailableCallback()
Camera_ErrorCode OH_PhotoOutput_UnregisterPhotoAvailableCallback(Camera_PhotoOutput* photoOutput, OH_PhotoOutput_PhotoAvailable callback)
Description
Unregisters the callback used to listen for photo availability events.
Since: 12
Parameters
| Name | Description |
|---|---|
| Camera_PhotoOutput* photoOutput | Pointer to the target PhotoOutput instance. |
| OH_PhotoOutput_PhotoAvailable callback | Target callback. |
Returns
| Type | Description |
|---|---|
| Camera_ErrorCode | CAMERA_OK: The operation is successful. CAMERA_INVALID_ARGUMENT: A parameter is missing or the parameter type is incorrect. CAMERA_SERVICE_FATAL_ERROR: The camera service is abnormal. |
OH_PhotoOutput_RegisterPhotoAssetAvailableCallback()
Camera_ErrorCode OH_PhotoOutput_RegisterPhotoAssetAvailableCallback(Camera_PhotoOutput* photoOutput, OH_PhotoOutput_PhotoAssetAvailable callback)
Description
Registers a callback to listen for photo asset availability events.
Since: 12
Parameters
| Name | Description |
|---|---|
| Camera_PhotoOutput* photoOutput | Pointer to the target PhotoOutput instance. |
| OH_PhotoOutput_PhotoAssetAvailable callback | Target callback. |
Returns
| Type | Description |
|---|---|
| Camera_ErrorCode | CAMERA_OK: The operation is successful. CAMERA_INVALID_ARGUMENT: A parameter is missing or the parameter type is incorrect. |
OH_PhotoOutput_UnregisterPhotoAssetAvailableCallback()
Camera_ErrorCode OH_PhotoOutput_UnregisterPhotoAssetAvailableCallback(Camera_PhotoOutput* photoOutput, OH_PhotoOutput_PhotoAssetAvailable callback)
Description
Unregisters the callback used to listen for photo asset availability events.
Since: 12
Parameters
| Name | Description |
|---|---|
| Camera_PhotoOutput* photoOutput | Pointer to the target PhotoOutput instance. |
| OH_PhotoOutput_PhotoAssetAvailable callback | Target callback. |
Returns
| Type | Description |
|---|---|
| Camera_ErrorCode | CAMERA_OK: The operation is successful. CAMERA_INVALID_ARGUMENT: A parameter is missing or the parameter type is incorrect. |
OH_PhotoOutput_Capture()
Camera_ErrorCode OH_PhotoOutput_Capture(Camera_PhotoOutput* photoOutput)
Description
Captures a photo.
This function must be called in prior to OH_PreviewOutput_Release. Otherwise, photo capture fails.
Since: 11
Parameters
| Name | Description |
|---|---|
| Camera_PhotoOutput* photoOutput | Pointer to the target PhotoOutput instance. |
Returns
| Type | Description |
|---|---|
| Camera_ErrorCode | CAMERA_OK: The operation is successful. CAMERA_INVALID_ARGUMENT: A parameter is missing or the parameter type is incorrect. CAMERA_SESSION_NOT_RUNNING: The capture session is not running. CAMERA_SERVICE_FATAL_ERROR: The camera service is abnormal. |
OH_PhotoOutput_Capture_WithCaptureSetting()
Camera_ErrorCode OH_PhotoOutput_Capture_WithCaptureSetting(Camera_PhotoOutput* photoOutput, Camera_PhotoCaptureSetting setting)
Description
Captures a photo with photographing parameters.
Since: 11
Parameters
| Name | Description |
|---|---|
| Camera_PhotoOutput* photoOutput | Pointer to the target PhotoOutput instance. |
| Camera_PhotoCaptureSetting setting | Photographing parameters, which are defined in the Camera_PhotoCaptureSetting struct. |
Returns
| Type | Description |
|---|---|
| Camera_ErrorCode | CAMERA_OK: The operation is successful. CAMERA_INVALID_ARGUMENT: A parameter is missing or the parameter type is incorrect. CAMERA_SESSION_NOT_RUNNING: The capture session is not running. CAMERA_SERVICE_FATAL_ERROR: The camera service is abnormal. |
OH_PhotoOutput_Release()
Camera_ErrorCode OH_PhotoOutput_Release(Camera_PhotoOutput* photoOutput)
Description
Releases a PhotoOutput instance.
Since: 11
Parameters
| Name | Description |
|---|---|
| Camera_PhotoOutput* photoOutput | Pointer to the target PhotoOutput instance. |
Returns
| Type | Description |
|---|---|
| Camera_ErrorCode | CAMERA_OK: The operation is successful. CAMERA_INVALID_ARGUMENT: A parameter is missing or the parameter type is incorrect. CAMERA_SERVICE_FATAL_ERROR: The camera service is abnormal. |
OH_PhotoOutput_IsMirrorSupported()
Camera_ErrorCode OH_PhotoOutput_IsMirrorSupported(Camera_PhotoOutput* photoOutput, bool* isSupported)
Description
Checks whether mirroring is supported.
Since: 11
Parameters
| Name | Description |
|---|---|
| Camera_PhotoOutput* photoOutput | Pointer to the target PhotoOutput instance. |
| bool* isSupported | Pointer to the check result for the support of mirroring. true if supported, false otherwise. |
Returns
| Type | Description |
|---|---|
| Camera_ErrorCode | CAMERA_OK: The operation is successful. CAMERA_INVALID_ARGUMENT: A parameter is missing or the parameter type is incorrect. CAMERA_SERVICE_FATAL_ERROR: The camera service is abnormal. |
OH_PhotoOutput_EnableMirror()
Camera_ErrorCode OH_PhotoOutput_EnableMirror(Camera_PhotoOutput* photoOutput, bool enabled)
Description
Enables dynamic photo capture.
Since: 13
Parameters
| Name | Description |
|---|---|
| Camera_PhotoOutput* photoOutput | Pointer to the target PhotoOutput instance. |
| bool enabled | Whether to enable or disable dynamic photo capture. true to enable, false otherwise. |
Returns
| Type | Description |
|---|---|
| Camera_ErrorCode | CAMERA_OK: The operation is successful. CAMERA_INVALID_ARGUMENT: A parameter is missing or the parameter type is incorrect. CAMERA_SERVICE_FATAL_ERROR: The camera service is abnormal. |
OH_PhotoOutput_GetActiveProfile()
Camera_ErrorCode OH_PhotoOutput_GetActiveProfile(Camera_PhotoOutput* photoOutput, Camera_Profile** profile)
Description
Obtains the profile of a PhotoOutput instance.
Since: 12
Parameters
| Name | Description |
|---|---|
| Camera_PhotoOutput* photoOutput | Pointer to the target PhotoOutput instance. |
| Camera_Profile** profile | Double pointer to the photo output profile obtained. |
Returns
| Type | Description |
|---|---|
| Camera_ErrorCode | CAMERA_OK: The operation is successful. CAMERA_INVALID_ARGUMENT: A parameter is missing or the parameter type is incorrect. CAMERA_SERVICE_FATAL_ERROR: The camera service is abnormal. |
OH_PhotoOutput_DeleteProfile()
Camera_ErrorCode OH_PhotoOutput_DeleteProfile(Camera_Profile* profile)
Description
Deletes the profile of a PhotoOutput instance.
Since: 12
Parameters
| Name | Description |
|---|---|
| Camera_Profile* profile | Pointer to the target PhotoOutput instance. |
Returns
| Type | Description |
|---|---|
| Camera_ErrorCode | CAMERA_OK: The operation is successful. CAMERA_INVALID_ARGUMENT: A parameter is missing or the parameter type is incorrect. |
OH_PhotoOutput_IsMovingPhotoSupported()
Camera_ErrorCode OH_PhotoOutput_IsMovingPhotoSupported(Camera_PhotoOutput* photoOutput, bool* isSupported)
Description
Checks whether moving photos are supported.
Since: 12
Parameters
| Name | Description |
|---|---|
| Camera_PhotoOutput* photoOutput | Pointer to the target PhotoOutput instance. |
| bool* isSupported | Pointer to the check result for the support of moving photos. true if supported, false otherwise. |
Returns
| Type | Description |
|---|---|
| Camera_ErrorCode | CAMERA_OK: The operation is successful. CAMERA_INVALID_ARGUMENT: A parameter is missing or the parameter type is incorrect. CAMERA_SERVICE_FATAL_ERROR: The camera service is abnormal. |
OH_PhotoOutput_EnableMovingPhoto()
Camera_ErrorCode OH_PhotoOutput_EnableMovingPhoto(Camera_PhotoOutput* photoOutput, bool enabled)
Description
Enables or disables moving photos.
Since: 12
Parameters
| Name | Description |
|---|---|
| Camera_PhotoOutput* photoOutput | Pointer to the target PhotoOutput instance. |
| bool enabled | Whether to enable moving photos. true to enable, false otherwise. |
Returns
| Type | Description |
|---|---|
| Camera_ErrorCode | CAMERA_OK: The operation is successful. CAMERA_INVALID_ARGUMENT: A parameter is missing or the parameter type is incorrect. CAMERA_SERVICE_FATAL_ERROR: The camera service is abnormal. |
OH_PhotoOutput_IsPhotoQualityPrioritizationSupported()
Camera_ErrorCode OH_PhotoOutput_IsPhotoQualityPrioritizationSupported(Camera_PhotoOutput* photoOutput, Camera_PhotoQualityPrioritization qualityPrioritization, bool* isSupported)
Description
Checks whether the specified photo quality prioritization strategy is supported.
Since: 21
Parameters
| Name | Description |
|---|---|
| Camera_PhotoOutput* photoOutput | Pointer to the target PhotoOutput instance. |
| Camera_PhotoQualityPrioritization qualityPrioritization | Photo quality prioritization strategy. |
| bool* isSupported | Pointer to the check result for the support of the specified photo quality prioritization strategy. true if supported, false otherwise. |
Returns
| Type | Description |
|---|---|
| Camera_ErrorCode | CAMERA_OK: The operation is successful. CAMERA_INVALID_ARGUMENT: A parameter is missing or the parameter type is incorrect. CAMERA_SERVICE_FATAL_ERROR: The camera service is abnormal. |
OH_PhotoOutput_SetPhotoQualityPrioritization()
Camera_ErrorCode OH_PhotoOutput_SetPhotoQualityPrioritization(Camera_PhotoOutput* photoOutput, Camera_PhotoQualityPrioritization qualityPrioritization)
Description
Sets the photo quality prioritization strategy.
Since: 21
Parameters
| Name | Description |
|---|---|
| Camera_PhotoOutput* photoOutput | Pointer to the target PhotoOutput instance. |
| Camera_PhotoQualityPrioritization qualityPrioritization | Photo quality prioritization strategy. |
Returns
| Type | Description |
|---|---|
| Camera_ErrorCode | CAMERA_OK: The operation is successful. CAMERA_INVALID_ARGUMENT: A parameter is missing or the parameter type is incorrect. CAMERA_OPERATION_NOT_ALLOWED: The operation is not allowed. CAMERA_SERVICE_FATAL_ERROR: The camera service is abnormal. |
你可能感兴趣的鸿蒙文章
openharmony 鸿蒙 capi-oh-camera-capturesession-callbacks
openharmony 鸿蒙 arkts-apis-camera-OIS
openharmony 鸿蒙 capi-oh-camera-camera-devicequeryinfo
openharmony 鸿蒙 capi-oh-camera-camera-frameraterange
openharmony 鸿蒙 capi-oh-camera-camera-outputcapability
openharmony 鸿蒙 arkts-apis-camera-Photo
openharmony 鸿蒙 capi-oh-camera-camera-profile
openharmony 鸿蒙 capi-oh-camera-camera-manager