diff --git a/multimedia/camera_framework/camera.h b/multimedia/camera_framework/camera.h index 86a86f9c1d0fc7f11b2e2627ee7b80489b397244..b83918af342ecc0808a2f6ccc1bc61d9c8e0276d 100644 --- a/multimedia/camera_framework/camera.h +++ b/multimedia/camera_framework/camera.h @@ -113,6 +113,12 @@ typedef enum Camera_ErrorCode { */ CAMERA_DEVICE_PREEMPTED = 7400109, + /** + * Unresolved conflicts with current configurations. + * @since 12 + */ + CAMERA_UNRESOLVED_CONFLICTS_WITH_CURRENT_CONFIGURATIONS = 7400110, + /** * Camera service fatal error. */ @@ -154,9 +160,18 @@ typedef enum Camera_Status { * @version 1.0 */ typedef enum Camera_SceneMode { + /** + * Normal photo mode. + */ + NORMAL_PHOTO = 1, + + /** + * Normal video mode. + */ + NORMAL_VIDEO = 2, + /** * Secure photo mode. - * @since 12 */ SECURE_PHOTO = 12 } Camera_SceneMode; @@ -260,7 +275,19 @@ typedef enum Camera_Format { /** * JPEG Format. */ - CAMERA_FORMAT_JPEG = 2000 + CAMERA_FORMAT_JPEG = 2000, + + /** + * YCBCR P010 Format. + * @since 12 + */ + CAMERA_FORMAT_YCBCR_P010 = 2001, + + /** + * YCRCB P010 Format. + * @since 12 + */ + CAMERA_FORMAT_YCRCB_P010 = 2002 } Camera_Format; /** @@ -462,6 +489,94 @@ typedef enum Camera_MetadataObjectType { FACE_DETECTION = 0 } Camera_MetadataObjectType; +/** + * @brief Enum for torch mode. + * + * @since 12 + * @version 1.0 + */ +typedef enum Camera_TorchMode { + /** + * The device torch is always off. + */ + OFF = 0, + + /** + * The device torch is always on. + */ + ON = 1, + + /** + * The device continuously monitors light levels and + * uses the torch when necessary. + */ + AUTO = 2 +} Camera_TorchMode; + +/** + * @brief Enum for smooth zoom mode. + * + * @since 12 + * @version 1.0 + */ +typedef enum Camera_SmoothZoomMode { + /** + * Normal zoom mode. + */ + NORMAL = 0 +} Camera_SmoothZoomMode; + +/** + * @brief Enum for preconfig type. + * + * @since 12 + * @version 1.0 + */ +typedef enum Camera_PreconfigType { + /** + * The preconfig type is 720P. + */ + PRECONFIG_720P = 0, + + /** + * The preconfig type is 1080P. + */ + PRECONFIG_1080P = 1, + + /** + * The preconfig type is 4K. + */ + PRECONFIG_4K = 2, + + /** + * The preconfig type is high quality. + */ + PRECONFIG_HIGH_QUALITY = 3 +} Camera_PreconfigType; + +/** + * @brief Enum for preconfig ratio. + * + * @since 12 + * @version 1.0 + */ +typedef enum Camera_PreconfigRatio { + /** + * The preconfig ratio is 1:1. + */ + PRECONFIG_RATIO_1_1 = 0, + + /** + * The preconfig ratio 4:3. + */ + PRECONFIG_RATIO_4_3 = 1, + + /** + * The preconfig ratio 16:9. + */ + PRECONFIG_RATIO_16_9 = 2 +} Camera_PreconfigRatio; + /** * @brief Size parameter. * @@ -789,6 +904,73 @@ typedef struct Camera_MetadataObject { Camera_Rect* boundingBox; } Camera_MetadataObject; +/** + * @brief Torch Status Info. + * + * @since 12 + * @version 1.0 + */ +typedef struct Camera_TorchStatusInfo { + /** + * is torch available. + */ + bool isTorchAvailable; + + /** + * is torch active. + */ + bool isTorchActive; + + /** + * the current torch brightness level. + */ + int32_t torchLevel; +} Camera_TorchStatusInfo; + +/** + * @brief SmoothZoomInfo object. + * + * @since 12 + * @version 1.0 + */ +typedef struct Camera_SmoothZoomInfo { + /** + * The duration of smooth zoom. + */ + int32_t duration; +} Camera_SmoothZoomInfo; + +/** + * @brief Capture start info. + * + * @since 12 + * @version 1.0 + */ +typedef struct Camera_CaptureStartInfo { + /** + * Capture id. + */ + int32_t captureId; + + /** + * Time(in milliseconds) is the shutter time for the photo. + */ + int64_t time; +} Camera_CaptureStartInfo; + +/** + * @brief Frame shutter end callback info. + * + * @since 12 + * @version 1.0 + */ +typedef struct Camera_FrameShutterEndInfo { + /** + * Capture id. + */ + int32_t captureId; +} Camera_FrameShutterEndInfo; + /** * @brief Creates a CameraManager instance. * diff --git a/multimedia/camera_framework/camera.ndk.json b/multimedia/camera_framework/camera.ndk.json index 50c0bd1ccfe176b67cc97282ab25bf7bacd09ee0..e9080df441be80ae614f5718bf533f1d0b979faa 100644 --- a/multimedia/camera_framework/camera.ndk.json +++ b/multimedia/camera_framework/camera.ndk.json @@ -43,6 +43,10 @@ "first_introduced": "11", "name": "OH_CameraManager_GetSupportedCameraOutputCapability" }, + { + "first_introduced": "12", + "name": "OH_CameraManager_GetSupportedCameraOutputCapabilityWithSceneMode" + }, { "first_introduced": "11", "name": "OH_CameraManager_DeleteSupportedCameraOutputCapability" @@ -67,18 +71,38 @@ "first_introduced": "11", "name": "OH_CameraManager_CreatePreviewOutput" }, + { + "first_introduced": "12", + "name": "OH_CameraManager_CreatePreviewOutputUsedInPreconfig" + }, { "first_introduced": "11", "name": "OH_CameraManager_CreatePhotoOutput" }, + { + "first_introduced": "12", + "name": "OH_CameraManager_CreatePhotoOutputUsedInPreconfig" + }, { "first_introduced": "11", "name": "OH_CameraManager_CreateVideoOutput" }, + { + "first_introduced": "12", + "name": "OH_CameraManager_CreateVideoOutputUsedInPreconfig" + }, { "first_introduced": "11", "name": "OH_CameraManager_CreateMetadataOutput" }, + { + "first_introduced": "12", + "name": "OH_CameraManager_GetSupportedSceneModes" + }, + { + "first_introduced": "12", + "name": "OH_CameraManager_DeleteSupportedSceneModes" + }, { "first_introduced": "11", "name": "OH_Camera_GetCameraManager" @@ -255,6 +279,38 @@ "first_introduced": "11", "name": "OH_CaptureSession_SetVideoStabilizationMode" }, + { + "first_introduced": "12", + "name": "OH_CaptureSession_CanAddInput" + }, + { + "first_introduced": "12", + "name": "OH_CaptureSession_CanAddPreviewOutput" + }, + { + "first_introduced": "12", + "name": "OH_CaptureSession_CanAddPhotoOutput" + }, + { + "first_introduced": "12", + "name": "OH_CaptureSession_CanAddVideoOutput" + }, + { + "first_introduced": "12", + "name": "OH_CaptureSession_CanPreconfig" + }, + { + "first_introduced": "12", + "name": "OH_CaptureSession_CanPreconfigWithRatio" + }, + { + "first_introduced": "12", + "name": "OH_CaptureSession_Preconfig" + }, + { + "first_introduced": "12", + "name": "OH_CaptureSession_PreconfigWithRatio" + }, { "first_introduced": "11", "name": "OH_MetadataOutput_RegisterCallback" @@ -342,5 +398,29 @@ { "first_introduced": "12", "name": "OH_CameraDevice_GetCameraOrientation" + }, + { + "first_introduced": "12", + "name": "OH_PhotoOutput_GetActiveProfile" + }, + { + "first_introduced": "12", + "name": "OH_PreviewOutput_GetActiveProfile" + }, + { + "first_introduced": "12", + "name": "OH_VideoOutput_GetActiveProfile" + }, + { + "first_introduced": "12", + "name": "OH_PhotoOutput_DeleteProfile" + }, + { + "first_introduced": "12", + "name": "OH_PreviewOutput_DeleteProfile" + }, + { + "first_introduced": "12", + "name": "OH_VideoOutput_DeleteProfile" } ] diff --git a/multimedia/camera_framework/camera_input.h b/multimedia/camera_framework/camera_input.h index 874fd8a74e642ab2968dcbd9dd53cde91f25035a..c5abb760427881f30fce064a80769d0628ec038f 100644 --- a/multimedia/camera_framework/camera_input.h +++ b/multimedia/camera_framework/camera_input.h @@ -120,12 +120,11 @@ Camera_ErrorCode OH_CameraInput_UnregisterCallback(Camera_Input* cameraInput, Ca */ Camera_ErrorCode OH_CameraInput_Open(Camera_Input* cameraInput); - /** * @brief Open camera. * * @param cameraInput the {@link Camera_Input} instance to be opened. - * @param secureSeqId which indicates SequenceId that secure camera is on. + * @param secureSeqId which indicates SequenceId that secure camera is on. * @return {@link #CAMERA_OK} if the method call succeeds. * {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect. * {@link #CAMERA_CONFLICT_CAMERA} if can not use camera cause of conflict. diff --git a/multimedia/camera_framework/camera_manager.h b/multimedia/camera_framework/camera_manager.h index dbed87a0f21d3399eab5ac30a1d19e338d9f286c..71b3508e77807e17c6654220539df45dc027ace3 100644 --- a/multimedia/camera_framework/camera_manager.h +++ b/multimedia/camera_framework/camera_manager.h @@ -139,6 +139,22 @@ Camera_ErrorCode OH_CameraManager_DeleteSupportedCameras(Camera_Manager* cameraM Camera_ErrorCode OH_CameraManager_GetSupportedCameraOutputCapability(Camera_Manager* cameraManager, const Camera_Device* camera, Camera_OutputCapability** cameraOutputCapability); +/** + * @brief Gets supported output capability for specific camera and specific sceneMode. + * + * @param cameraManager the {@link Camera_Manager} instance. + * @param camera the {@link Camera_Device} to be queryed. + * @param sceneMode the {@link Camera_SceneMode} to be queryed. + * @param cameraOutputCapability the supported {@link Camera_OutputCapability} will be filled + * if the method call succeeds. + * @return {@link #CAMERA_OK} if the method call succeeds. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * {@link #CAMERA_SERVICE_FATAL_ERROR} if camera service fatal error. + * @since 12 + */ +Camera_ErrorCode OH_CameraManager_GetSupportedCameraOutputCapabilityWithSceneMode(Camera_Manager* cameraManager, + const Camera_Device* camera, Camera_SceneMode sceneMode, Camera_OutputCapability** cameraOutputCapability); + /** * @brief Delete the supported output capability. * @@ -222,6 +238,20 @@ Camera_ErrorCode OH_CameraManager_CreateCameraInput_WithPositionAndType(Camera_M Camera_ErrorCode OH_CameraManager_CreatePreviewOutput(Camera_Manager* cameraManager, const Camera_Profile* profile, const char* surfaceId, Camera_PreviewOutput** previewOutput); +/** + * @brief Create a preview output instance used in preconfig. + * + * @param cameraManager the {@link Camera_Manager} instance. + * @param surfaceId the which use to create {@link Camera_PreviewOutput}. + * @param previewOutput the {@link Camera_PreviewOutput} will be created if the method call succeeds. + * @return {@link #CAMERA_OK} if the method call succeeds. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * {@link #CAMERA_SERVICE_FATAL_ERROR} if camera service fatal error. + * @since 12 + */ +Camera_ErrorCode OH_CameraManager_CreatePreviewOutputUsedInPreconfig(Camera_Manager* cameraManager, + const char* surfaceId, Camera_PreviewOutput** previewOutput); + /** * @brief Create a photo output instance. * @@ -237,6 +267,20 @@ Camera_ErrorCode OH_CameraManager_CreatePreviewOutput(Camera_Manager* cameraMana Camera_ErrorCode OH_CameraManager_CreatePhotoOutput(Camera_Manager* cameraManager, const Camera_Profile* profile, const char* surfaceId, Camera_PhotoOutput** photoOutput); +/** + * @brief Create a photo output instance used in preconfig. + * + * @param cameraManager the {@link Camera_Manager} instance. + * @param surfaceId the which use to create {@link Camera_PhotoOutput}. + * @param photoOutput the {@link Camera_PhotoOutput} will be created if the method call succeeds. + * @return {@link #CAMERA_OK} if the method call succeeds. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * {@link #CAMERA_SERVICE_FATAL_ERROR} if camera service fatal error. + * @since 12 + */ +Camera_ErrorCode OH_CameraManager_CreatePhotoOutputUsedInPreconfig(Camera_Manager* cameraManager, + const char* surfaceId, Camera_PhotoOutput** photoOutput); + /** * @brief Create a video output instance. * @@ -252,6 +296,20 @@ Camera_ErrorCode OH_CameraManager_CreatePhotoOutput(Camera_Manager* cameraManage Camera_ErrorCode OH_CameraManager_CreateVideoOutput(Camera_Manager* cameraManager, const Camera_VideoProfile* profile, const char* surfaceId, Camera_VideoOutput** videoOutput); +/** + * @brief Create a video output instance used in preconfig. + * + * @param cameraManager the {@link Camera_Manager} instance. + * @param surfaceId the which use to create {@link Camera_VideoOutput}. + * @param videoOutput the {@link Camera_VideoOutput} will be created if the method call succeeds. + * @return {@link #CAMERA_OK} if the method call succeeds. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * {@link #CAMERA_SERVICE_FATAL_ERROR} if camera service fatal error. + * @since 12 + */ +Camera_ErrorCode OH_CameraManager_CreateVideoOutputUsedInPreconfig(Camera_Manager* cameraManager, + const char* surfaceId, Camera_VideoOutput** videoOutput); + /** * @brief Create a metadata output instance. * @@ -266,6 +324,32 @@ Camera_ErrorCode OH_CameraManager_CreateVideoOutput(Camera_Manager* cameraManage Camera_ErrorCode OH_CameraManager_CreateMetadataOutput(Camera_Manager* cameraManager, const Camera_MetadataObjectType* profile, Camera_MetadataOutput** metadataOutput); +/** + * @brief Gets supported scene mode for specific camera. + * + * @param camera the {@link Camera_Device} to be queryed. + * @param sceneModes the supported {@link Camera_SceneMode} will be filled if the method call succeeds. + * @param size the size of supported {@link Camera_SceneMode} list will be filled if the method call succeeds. + * @return {@link #CAMERA_OK} if the method call succeeds. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * {@link #CAMERA_SERVICE_FATAL_ERROR} if camera service fatal error. + * @since 12 + */ +Camera_ErrorCode OH_CameraManager_GetSupportedSceneModes(Camera_Device* camera, + Camera_SceneMode** sceneModes, uint32_t* size); + +/** + * @brief Delete the supported scene mode. + * + * @param cameraManager the {@link Camera_Manager} instance. + * @param sceneModes the {@link Camera_SceneMode} to be deleted. + * @return {@link #CAMERA_OK} if the method call succeeds. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * @since 12 + */ +Camera_ErrorCode OH_CameraManager_DeleteSupportedSceneModes(Camera_Manager* cameraManager, + Camera_SceneMode* sceneModes); + #ifdef __cplusplus } #endif diff --git a/multimedia/camera_framework/capture_session.h b/multimedia/camera_framework/capture_session.h index b6f2cc0aa724f2457d8d3d890cc4139e204435c6..be76c0f22556c4e6bce09efed60c450739e8e986 100644 --- a/multimedia/camera_framework/capture_session.h +++ b/multimedia/camera_framework/capture_session.h @@ -131,21 +131,21 @@ Camera_ErrorCode OH_CaptureSession_UnregisterCallback(Camera_CaptureSession* ses * @param session the {@link Camera_CaptureSession} instance. * @param sceneMode the {@link CaptureSession_SceneMode} instance. * @return {@link #CAMERA_OK} if the method call succeeds. - * {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect. - * {@link #OPERATION_NOT_ALLOWED} if operation not allowed. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * {@link #CAMERA_OPERATION_NOT_ALLOWED} if operation not allowed. * {@link #CAMERA_SESSION_CONFIG_LOCKED} if session config locked. * @since 12 */ Camera_ErrorCode OH_CaptureSession_SetSessionMode(Camera_CaptureSession* session, Camera_SceneMode sceneMode); - + /** - * @brief Specifies the specific mode. The default mode is the photomode. + * @brief Add Secure output for camera. * * @param session the {@link Camera_CaptureSession} instance. * @param previewOutput the target {@link Camera_PreviewOutput} to Set as a secure flow. * @return {@link #CAMERA_OK} if the method call succeeds. - * {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect. - * {@link #OPERATION_NOT_ALLOWED} if operation not allowed. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * {@link #CAMERA_OPERATION_NOT_ALLOWED} if operation not allowed. * {@link #CAMERA_SESSION_CONFIG_LOCKED} if session config locked. * @since 12 */ @@ -622,6 +622,113 @@ Camera_ErrorCode OH_CaptureSession_GetVideoStabilizationMode(Camera_CaptureSessi Camera_ErrorCode OH_CaptureSession_SetVideoStabilizationMode(Camera_CaptureSession* session, Camera_VideoStabilizationMode mode); +/** + * @brief Determines whether the camera input can be added into the session. + * + * @param session the {@link Camera_CaptureSession} instance. + * @param cameraInput the target {@link Camera_Input} to set. + * @param isSuccess the result of whether the camera input can be added into the session. + * @return {@link #CAMERA_OK} if the method call succeeds. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * @since 12 + */ +Camera_ErrorCode OH_CaptureSession_CanAddInput(Camera_CaptureSession* session, + Camera_Input* cameraInput, bool* isSuccess); + +/** + * @brief Determines whether the camera preview output can be added into the session. + * + * @param session the {@link Camera_CaptureSession} instance. + * @param cameraOutput the target {@link Camera_PreviewOutput} to set. + * @param isSuccess the result of whether the camera preview output can be added into the session. + * @return {@link #CAMERA_OK} if the method call succeeds. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * @since 12 + */ +Camera_ErrorCode OH_CaptureSession_CanAddPreviewOutput(Camera_CaptureSession* session, + Camera_PreviewOutput* cameraOutput, bool* isSuccess); + +/** + * @brief Determines whether the camera photo output can be added into the session. + * + * @param session the {@link Camera_CaptureSession} instance. + * @param cameraOutput the target {@link Camera_PhotoOutput} to set. + * @param isSuccess the result of whether the camera photo output can be added into the session. + * @return {@link #CAMERA_OK} if the method call succeeds. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * @since 12 + */ +Camera_ErrorCode OH_CaptureSession_CanAddPhotoOutput(Camera_CaptureSession* session, + Camera_PhotoOutput* cameraOutput, bool* isSuccess); + +/** + * @brief Determines whether the camera video output can be added into the session. + * + * @param session the {@link Camera_CaptureSession} instance. + * @param cameraOutput the target {@link Camera_VideoOutput} to set. + * @param isSuccess the result of whether the camera video output can be added into the session. + * @return {@link #CAMERA_OK} if the method call succeeds. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * @since 12 + */ +Camera_ErrorCode OH_CaptureSession_CanAddVideoOutput(Camera_CaptureSession* session, + Camera_VideoOutput* cameraOutput, bool* isSuccess); + +/** + * @brief Check the preconfig type is supported or not. + * + * @param session the {@link Camera_CaptureSession} instance. + * @param preconfigType the target {@link Camera_PreconfigType} to set. + * @param canPreconfig the result of whether the preconfig type is supported. + * @return {@link #CAMERA_OK} if the method call succeeds. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * @since 12 + */ +Camera_ErrorCode OH_CaptureSession_CanPreconfig(Camera_CaptureSession* session, + Camera_PreconfigType preconfigType, bool* canPreconfig); + +/** + * @brief Check the preconfig type with ratio is supported or not. + * + * @param session the {@link Camera_CaptureSession} instance. + * @param preconfigType the target {@link Camera_PreconfigType} to set. + * @param preconfigRatio the target {@link Camera_PreconfigRatio} to set. + * @param canPreconfig the result of whether the preconfig type with ratio is supported. + * @return {@link #CAMERA_OK} if the method call succeeds. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * @since 12 + */ +Camera_ErrorCode OH_CaptureSession_CanPreconfigWithRatio(Camera_CaptureSession* session, + Camera_PreconfigType preconfigType, Camera_PreconfigRatio preconfigRatio, + bool* canPreconfig); + +/** + * @brief Set the preconfig type. + * + * @param session the {@link Camera_CaptureSession} instance. + * @param preconfigType the target {@link Camera_PreconfigType} to set. + * @return {@link #CAMERA_OK} if the method call succeeds. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config. + * @since 12 + */ +Camera_ErrorCode OH_CaptureSession_Preconfig(Camera_CaptureSession* session, + Camera_PreconfigType preconfigType); + +/** + * @brief Set the preconfig type with ratio. + * + * @param session the {@link Camera_CaptureSession} instance. + * @param preconfigType the target {@link Camera_PreconfigType} to set. + * @param preconfigRatio the target {@link Camera_PreconfigRatio} to set. + * @return {@link #CAMERA_OK} if the method call succeeds. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config. + * @since 12 + */ +Camera_ErrorCode OH_CaptureSession_PreconfigWithRatio(Camera_CaptureSession* session, + Camera_PreconfigType preconfigType, Camera_PreconfigRatio preconfigRatio); + #ifdef __cplusplus } #endif diff --git a/multimedia/camera_framework/photo_output.h b/multimedia/camera_framework/photo_output.h index 3c32b972a652975053cac55ec7694387b947980b..273455d17202cd0c2242828f11bf141aa3a79319 100644 --- a/multimedia/camera_framework/photo_output.h +++ b/multimedia/camera_framework/photo_output.h @@ -194,6 +194,27 @@ Camera_ErrorCode OH_PhotoOutput_Release(Camera_PhotoOutput* photoOutput); */ Camera_ErrorCode OH_PhotoOutput_IsMirrorSupported(Camera_PhotoOutput* photoOutput, bool* isSupported); +/** + * @brief Get active profiles. + * + * @param photoOutput the {@link Camera_PhotoOutput} instance which used to get active profiles. + * @param profile the active {@link Camera_Profile} will be filled if the method call succeeds. + * @return {@link #CAMERA_OK} if the method call succeeds. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * @since 12 + */ +Camera_ErrorCode OH_PhotoOutput_GetActiveProfile(Camera_PhotoOutput* photoOutput, Camera_Profile** profile); + +/** + * @brief Delete photo profile instance. + * + * @param profile the {@link Camera_Profile} instance to deleted. + * @return {@link #CAMERA_OK} if the method call succeeds. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * @since 12 + */ +Camera_ErrorCode OH_PhotoOutput_DeleteProfile(Camera_Profile* profile); + #ifdef __cplusplus } #endif diff --git a/multimedia/camera_framework/preview_output.h b/multimedia/camera_framework/preview_output.h index 96b267f9c3ecc529963d1c32a4927411e92f7b6e..3fa3dcced265e82dd548de20d8c5611f957a248f 100644 --- a/multimedia/camera_framework/preview_output.h +++ b/multimedia/camera_framework/preview_output.h @@ -167,6 +167,27 @@ Camera_ErrorCode OH_PreviewOutput_Stop(Camera_PreviewOutput* previewOutput); */ Camera_ErrorCode OH_PreviewOutput_Release(Camera_PreviewOutput* previewOutput); +/** + * @brief Get active profiles. + * + * @param previewOutput the {@link Camera_PreviewOutput} instance which used to get active profiles. + * @param profile the active {@link Camera_Profile} will be filled if the method call succeeds. + * @return {@link #CAMERA_OK} if the method call succeeds. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * @since 12 + */ +Camera_ErrorCode OH_PreviewOutput_GetActiveProfile(Camera_PreviewOutput* previewOutput, Camera_Profile** profile); + +/** + * @brief Delete preview profile instance. + * + * @param profile the {@link Camera_Profile} instance to deleted. + * @return {@link #CAMERA_OK} if the method call succeeds. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * @since 12 + */ +Camera_ErrorCode OH_PreviewOutput_DeleteProfile(Camera_Profile* profile); + #ifdef __cplusplus } #endif diff --git a/multimedia/camera_framework/video_output.h b/multimedia/camera_framework/video_output.h index 8b50c44bc9a88f7af03eccdb1d160b3ff2510798..07bee9ceb14ba648e78f3dcaae3d56be7cd4877e 100644 --- a/multimedia/camera_framework/video_output.h +++ b/multimedia/camera_framework/video_output.h @@ -165,6 +165,27 @@ Camera_ErrorCode OH_VideoOutput_Stop(Camera_VideoOutput* videoOutput); */ Camera_ErrorCode OH_VideoOutput_Release(Camera_VideoOutput* videoOutput); +/** + * @brief Get active profiles. + * + * @param videoOutput the {@link Camera_VideoOutput} instance which used to get active profiles. + * @param profile the active {@link Camera_VideoProfile} will be filled if the method call succeeds. + * @return {@link #CAMERA_OK} if the method call succeeds. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * @since 12 + */ +Camera_ErrorCode OH_VideoOutput_GetActiveProfile(Camera_VideoOutput* videoOutput, Camera_VideoProfile** profile); + +/** + * @brief Delete video profile instance. + * + * @param profile the {@link Camera_VideoProfile} instance to deleted. + * @return {@link #CAMERA_OK} if the method call succeeds. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * @since 12 + */ +Camera_ErrorCode OH_VideoOutput_DeleteProfile(Camera_VideoProfile* profile); + #ifdef __cplusplus } #endif