capture_session.h
Overview
The capture_session.h file declares the session capture concepts.
Library: libohcamera.so
System capability: SystemCapability.Multimedia.Camera.Core
Since: 11
Related module: OH_Camera
Summary
Structs
Name | Description |
---|---|
CaptureSession_Callbacks | Defines the callbacks used for session capture. |
Types
Name | Description |
---|---|
Camera_CaptureSession | Defines the session capture object. |
(*OH_CaptureSession_OnFocusStateChange) (Camera_CaptureSession *session, Camera_FocusState focusState) | Defines the pointer to the callback defined in the CaptureSession_Callbacks struct and used to report session capture focus status changes. |
(*OH_CaptureSession_OnError) (Camera_CaptureSession *session, Camera_ErrorCode errorCode) | Defines the pointer to the callback defined in the CaptureSession_Callbacks struct and used to report capture session errors. |
CaptureSession_Callbacks | Defines the callbacks used for session capture. |
Functions
Name | Description |
---|---|
OH_CaptureSession_RegisterCallback (Camera_CaptureSession *session, CaptureSession_Callbacks *callback) | Registers a callback to listen for session capture events. |
OH_CaptureSession_UnregisterCallback (Camera_CaptureSession *session, CaptureSession_Callbacks *callback) | Unregisters the callback used to listen for session capture events. |
OH_CaptureSession_BeginConfig (Camera_CaptureSession *session) | Starts the configuration for session capture. |
OH_CaptureSession_CommitConfig (Camera_CaptureSession *session) | Commits the configuration for session capture. |
OH_CaptureSession_AddInput (Camera_CaptureSession *session, Camera_Input *cameraInput) | Adds a CameraInput instance to a session. |
OH_CaptureSession_RemoveInput (Camera_CaptureSession *session, Camera_Input *cameraInput) | Removes a CameraInput instance from a session. |
OH_CaptureSession_AddPreviewOutput (Camera_CaptureSession *session, Camera_PreviewOutput *previewOutput) | Adds a PreviewOutput instance to a session. |
OH_CaptureSession_RemovePreviewOutput (Camera_CaptureSession *session, Camera_PreviewOutput *previewOutput) | Removes a PreviewOutput instance from a session. |
OH_CaptureSession_AddPhotoOutput (Camera_CaptureSession *session, Camera_PhotoOutput *photoOutput) | Adds a PhotoOutput instance to a session. |
OH_CaptureSession_RemovePhotoOutput (Camera_CaptureSession *session, Camera_PhotoOutput *photoOutput) | Removes a PhotoOutput instance from a session. |
OH_CaptureSession_AddVideoOutput (Camera_CaptureSession *session, Camera_VideoOutput *videoOutput) | Adds a VideoOutput instance to a session. |
OH_CaptureSession_RemoveVideoOutput (Camera_CaptureSession *session, Camera_VideoOutput *videoOutput) | Removes a VideoOutput instance from a session. |
OH_CaptureSession_AddMetadataOutput (Camera_CaptureSession *session, Camera_MetadataOutput *metadataOutput) | Adds a MetadataOutput instance to a session. |
OH_CaptureSession_RemoveMetadataOutput (Camera_CaptureSession *session, Camera_MetadataOutput *metadataOutput) | Removes a MetadataOutput instance from a session. |
OH_CaptureSession_Start (Camera_CaptureSession *session) | Starts session capture. |
OH_CaptureSession_Stop (Camera_CaptureSession *session) | Stops session capture. |
OH_CaptureSession_Release (Camera_CaptureSession *session) | Releases a CaptureSession instance. |
OH_CaptureSession_HasFlash (Camera_CaptureSession *session, bool *hasFlash) | Checks whether the device has flash. |
OH_CaptureSession_IsFlashModeSupported (Camera_CaptureSession *session, Camera_FlashMode flashMode, bool *isSupported) | Checks whether a flash mode is supported. |
OH_CaptureSession_GetFlashMode (Camera_CaptureSession *session, Camera_FlashMode *flashMode) | Obtains the flash mode in use. |
OH_CaptureSession_SetFlashMode (Camera_CaptureSession *session, Camera_FlashMode flashMode) | Sets a flash mode for the device. |
OH_CaptureSession_IsExposureModeSupported (Camera_CaptureSession *session, Camera_ExposureMode exposureMode, bool *isSupported) | Checks whether an exposure mode is supported. |
OH_CaptureSession_GetExposureMode (Camera_CaptureSession *session, Camera_ExposureMode *exposureMode) | Obtains the exposure mode in use. |
OH_CaptureSession_SetExposureMode (Camera_CaptureSession *session, Camera_ExposureMode exposureMode) | Sets an exposure mode for the device. |
OH_CaptureSession_GetMeteringPoint (Camera_CaptureSession *session, Camera_Point *point) | Obtains the metering point in use. |
OH_CaptureSession_SetMeteringPoint (Camera_CaptureSession *session, Camera_Point point) | Sets the metering point, which is the center point of the metering rectangle. |
OH_CaptureSession_GetExposureBiasRange (Camera_CaptureSession *session, float *minExposureBias, float *maxExposureBias, float *step) | Obtains the exposure compensation values of the device. |
OH_CaptureSession_SetExposureBias (Camera_CaptureSession *session, float exposureBias) | Sets an exposure compensation value for the device. |
OH_CaptureSession_GetExposureBias (Camera_CaptureSession *session, float *exposureBias) | Obtains the exposure compensation value in use. |
OH_CaptureSession_IsFocusModeSupported (Camera_CaptureSession *session, Camera_FocusMode focusMode, bool *isSupported) | Checks whether a focus mode is supported. |
OH_CaptureSession_GetFocusMode (Camera_CaptureSession *session, Camera_FocusMode *focusMode) | Obtains the focus mode in use. |
OH_CaptureSession_SetFocusMode (Camera_CaptureSession *session, Camera_FocusMode focusMode) | Sets a focus mode for the device. |
OH_CaptureSession_GetFocusPoint (Camera_CaptureSession *session, Camera_Point *focusPoint) | Obtains the focal point in use. |
OH_CaptureSession_SetFocusPoint (Camera_CaptureSession *session, Camera_Point focusPoint) | Sets a focal point for the device. |
OH_CaptureSession_GetZoomRatioRange (Camera_CaptureSession *session, float *minZoom, float *maxZoom) | Obtains the supported zoom ratio range. |
OH_CaptureSession_GetZoomRatio (Camera_CaptureSession *session, float *zoom) | Obtains the zoom ratio in use. |
OH_CaptureSession_SetZoomRatio (Camera_CaptureSession *session, float zoom) | Sets a zoom ratio for the device. |
OH_CaptureSession_IsVideoStabilizationModeSupported (Camera_CaptureSession *session, Camera_VideoStabilizationMode mode, bool *isSupported) | Checks whether a video stabilization mode is supported. |
OH_CaptureSession_GetVideoStabilizationMode (Camera_CaptureSession *session, Camera_VideoStabilizationMode *mode) | Obtains the video stabilization mode in use. |
OH_CaptureSession_SetVideoStabilizationMode (Camera_CaptureSession *session, Camera_VideoStabilizationMode mode) | Sets a video stabilization mode for the device. |