harmony 鸿蒙photo_output.h

  • 2025-06-12
  • 浏览 (6)

photo_output.h

概述

声明拍照输出概念。

库: libohcamera.so

引用文件:<ohcamera/photo_output.h>

系统能力: SystemCapability.Multimedia.Camera.Core

起始版本: 11

相关模块:OH_Camera

汇总

结构体

名称 描述
struct PhotoOutput_Callbacks 拍照输出的回调。

类型定义

名称 描述
typedef struct Camera_PhotoOutput Camera_PhotoOutput 拍照输出对象。
typedef void(* OH_PhotoOutput_OnFrameStart) (Camera_PhotoOutput *photoOutput) PhotoOutput_Callbacks中被调用的拍照输出帧启动回调。
typedef void(* OH_PhotoOutput_OnFrameShutter) (Camera_PhotoOutput *photoOutput, Camera_FrameShutterInfo *info) PhotoOutput_Callbacks中被调用的拍照输出帧快门回调。
typedef void(* OH_PhotoOutput_OnFrameEnd) (Camera_PhotoOutput *photoOutput, int32_t frameCount) PhotoOutput_Callbacks中被调用的拍照输出帧结束回调。
typedef void(* OH_PhotoOutput_OnError) (Camera_PhotoOutput *photoOutput, Camera_ErrorCode errorCode) PhotoOutput_Callbacks中被调用的拍照输出错误回调。
typedef void(* OH_PhotoOutput_CaptureEnd) (Camera_PhotoOutput *photoOutput, int32_t frameCount) 拍照结束回调。
typedef void(* OH_PhotoOutput_CaptureStartWithInfo) (Camera_PhotoOutput *photoOutput, Camera_CaptureStartInfo *Info) 拍照开始回调。
typedef void(* OH_PhotoOutput_OnFrameShutterEnd) (Camera_PhotoOutput *photoOutput, Camera_FrameShutterInfo *Info) 拍照曝光结束回调。
typedef void(* OH_PhotoOutput_CaptureReady) (Camera_PhotoOutput *photoOutput) 拍照准备就绪回调。收到回调后,可以继续进行下一次拍照。
typedef void(* OH_PhotoOutput_EstimatedCaptureDuration) (Camera_PhotoOutput *photoOutput, int64_t duration) 预计拍照时间回调。
typedef void(* OH_PhotoOutput_PhotoAvailable) (Camera_PhotoOutput *photoOutput, OH_PhotoNative *photo) 照片输出可用高分辨率图像回调。
typedef void(* OH_PhotoOutput_PhotoAssetAvailable) (Camera_PhotoOutput *photoOutput, OH_MediaAsset *photoAsset) 输出照片资源可用回调。
typedef struct PhotoOutput_Callbacks PhotoOutput_Callbacks 拍照输出的回调。

函数

名称 描述
Camera_ErrorCode OH_PhotoOutput_RegisterCallback (Camera_PhotoOutput *photoOutput, PhotoOutput_Callbacks *callback) 注册拍照输出更改事件回调。
Camera_ErrorCode OH_PhotoOutput_UnregisterCallback (Camera_PhotoOutput *photoOutput, PhotoOutput_Callbacks *callback) 注销拍照输出更改事件回调。
Camera_ErrorCode OH_PhotoOutput_RegisterCaptureStartWithInfoCallback (Camera_PhotoOutput *photoOutput, OH_PhotoOutput_CaptureStartWithInfo callback) 注册拍照开始事件回调。
Camera_ErrorCode OH_PhotoOutput_UnregisterCaptureStartWithInfoCallback (Camera_PhotoOutput *photoOutput, OH_PhotoOutput_CaptureStartWithInfo callback) 注销拍照开始事件回调。
Camera_ErrorCode OH_PhotoOutput_RegisterCaptureEndCallback (Camera_PhotoOutput *photoOutput, OH_PhotoOutput_CaptureEnd callback) 注册拍照结束事件回调。
Camera_ErrorCode OH_PhotoOutput_UnregisterCaptureEndCallback (Camera_PhotoOutput *photoOutput, OH_PhotoOutput_CaptureEnd callback) 注销拍照结束事件回调。
Camera_ErrorCode OH_PhotoOutput_RegisterFrameShutterEndCallback (Camera_PhotoOutput *photoOutput, OH_PhotoOutput_OnFrameShutterEnd callback) 注册拍照曝光结束事件回调。
Camera_ErrorCode OH_PhotoOutput_UnregisterFrameShutterEndCallback (Camera_PhotoOutput *photoOutput, OH_PhotoOutput_OnFrameShutterEnd callback) 注销拍照曝光结束事件回调。
Camera_ErrorCode OH_PhotoOutput_RegisterCaptureReadyCallback (Camera_PhotoOutput *photoOutput, OH_PhotoOutput_CaptureReady callback) 注册拍照就绪事件回调。收到回调后,可以继续进行下一次拍照。
Camera_ErrorCode OH_PhotoOutput_UnregisterCaptureReadyCallback (Camera_PhotoOutput *photoOutput, OH_PhotoOutput_CaptureReady callback) 注销拍照就绪事件回调。
Camera_ErrorCode OH_PhotoOutput_RegisterEstimatedCaptureDurationCallback (Camera_PhotoOutput *photoOutput, OH_PhotoOutput_EstimatedCaptureDuration callback) 注册预计拍照时间事件回调。
Camera_ErrorCode OH_PhotoOutput_UnregisterEstimatedCaptureDurationCallback (Camera_PhotoOutput *photoOutput, OH_PhotoOutput_EstimatedCaptureDuration callback) 注销预计拍照时间事件回调。
Camera_ErrorCode OH_PhotoOutput_RegisterPhotoAvailableCallback (Camera_PhotoOutput *photoOutput, OH_PhotoOutput_PhotoAvailable callback) 注册输出照片可用回调。
Camera_ErrorCode OH_PhotoOutput_UnregisterPhotoAvailableCallback (Camera_PhotoOutput *photoOutput, OH_PhotoOutput_PhotoAvailable callback) 注销输出照片可用回调。
Camera_ErrorCode OH_PhotoOutput_RegisterPhotoAssetAvailableCallback (Camera_PhotoOutput *photoOutput, OH_PhotoOutput_PhotoAssetAvailable callback) 注册输出照片资源可用回调。
Camera_ErrorCode OH_PhotoOutput_UnregisterPhotoAssetAvailableCallback (Camera_PhotoOutput *photoOutput, OH_PhotoOutput_PhotoAssetAvailable callback) 注销输出照片资源可用回调。
Camera_ErrorCode OH_PhotoOutput_Capture (Camera_PhotoOutput *photoOutput) 拍摄照片。
Camera_ErrorCode OH_PhotoOutput_Capture_WithCaptureSetting (Camera_PhotoOutput *photoOutput, Camera_PhotoCaptureSetting setting) 使用捕获设置捕获拍照。
Camera_ErrorCode OH_PhotoOutput_Release (Camera_PhotoOutput *photoOutput) 释放拍照输出。
Camera_ErrorCode OH_PhotoOutput_IsMirrorSupported (Camera_PhotoOutput *photoOutput, bool *isSupported) 检查是否支持镜像拍照。
Camera_ErrorCode OH_PhotoOutput_EnableMirror (Camera_PhotoOutput *photoOutput, bool enabled) 是否启用动态照片镜像拍照。
Camera_ErrorCode OH_PhotoOutput_GetActiveProfile (Camera_PhotoOutput *photoOutput, Camera_Profile **profile) 获取当前照片输出配置文件。
Camera_ErrorCode OH_PhotoOutput_DeleteProfile (Camera_Profile *profile) 删除照片配置文件实例。
Camera_ErrorCode OH_PhotoOutput_IsMovingPhotoSupported (Camera_PhotoOutput *photoOutput, bool *isSupported) 检查是否支持动态照片。
Camera_ErrorCode OH_PhotoOutput_EnableMovingPhoto (Camera_PhotoOutput *photoOutput, bool enabled) 是否启用动态照片。
Camera_ErrorCode OH_PhotoOutput_GetPhotoRotation (Camera_PhotoOutput *photoOutput, int devicedegree, Camera_ImageRotation *imageRotation) 获得相机照片旋转角度。

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Camera Kit(相机服务)

harmony 鸿蒙Camera_CaptureEndInfo

harmony 鸿蒙Camera_CaptureStartInfo

harmony 鸿蒙Camera_ConcurrentInfo

harmony 鸿蒙Camera_Device

harmony 鸿蒙Camera_FrameRateRange

harmony 鸿蒙Camera_FrameShutterEndInfo

harmony 鸿蒙Camera_FrameShutterInfo

harmony 鸿蒙Camera_Location

harmony 鸿蒙Camera_MetadataObject

0  赞