diff --git a/camera/metadata/include/camera_device_ability_items.h b/camera/metadata/include/camera_device_ability_items.h index 6793ed0e261c87e2e4729d0a802156d6dac81fa7..b851d91052d1f1cd375d82e4105c0c20267bc475 100644 --- a/camera/metadata/include/camera_device_ability_items.h +++ b/camera/metadata/include/camera_device_ability_items.h @@ -1156,6 +1156,20 @@ typedef enum camera_device_metadata_tag { * (i.e. uint8: 0-false/1-true ...) */ OHOS_CONTROL_SYSTEM_CAPTURE, + /** + * ohos.ability.photoQualityPrioritization [static, int32_t[], public] + * + * camera device property, report current camera support photo quality prioritization + * (i.e. int32_t[] ...) + */ + OHOS_ABILITY_PHOTO_QUALITY_PRIORITIZATION, + /** + * ohos.control.photoQualityPrioritization [static, byte, public] + * + * camera device property, set current camera photo quality prioritization + * (i.e. byte ...) + */ + OHOS_CONTROL_PHOTO_QUALITY_PRIORITIZATION, /** * ohos.device.controlEnd * @@ -3102,4 +3116,10 @@ enum SketchStreamInfoStatus { OHOS_CAMERA_SKETCH_STREAM_SUPPORT }; +// OHOS_ABILITY_PHOTO_QUALITY_PRIORITIZATION +// OHOS_CONTROL_PHOTO_QUALITY_PRIORITIZATION +typedef enum camera_photo_quality_prioritization { + OHOS_CAMERA_PHOTO_QUALITY_PRIORITIZATION_HIGH_QUALITY = 0, + OHOS_CAMERA_PHOTO_QUALITY_PRIORITIZATION_SPEED, +} camera_photo_quality_prioritization_t; #endif diff --git a/camera/metadata/include/camera_metadata_item_info.h b/camera/metadata/include/camera_metadata_item_info.h index 3a08cb40bb762fc1337510e08c07954c88cf1300..b47560a2a0568a05050804a2b17b2cd48117efd4 100644 --- a/camera/metadata/include/camera_metadata_item_info.h +++ b/camera/metadata/include/camera_metadata_item_info.h @@ -301,6 +301,10 @@ static item_info_t g_ohosCameraControl[OHOS_DEVICE_CONTROL_END - OHOS_DEVICE_CON OHOS_DEVICE_CONTROL_START] = {"qualityPrioritization", META_TYPE_BYTE, 1}, [OHOS_CONTROL_SYSTEM_CAPTURE - OHOS_DEVICE_CONTROL_START] = {"cameraControlSystemCapture", META_TYPE_BYTE, 1}, + [OHOS_ABILITY_PHOTO_QUALITY_PRIORITIZATION - + OHOS_DEVICE_CONTROL_START] = {"supportedPhotoQualityPrioritizationValues", META_TYPE_INT32, -1}, + [OHOS_CONTROL_PHOTO_QUALITY_PRIORITIZATION - + OHOS_DEVICE_CONTROL_START] = {"photoQualityPrioritization", META_TYPE_BYTE, 1}, }; static item_info_t g_ohosDeviceExposure[OHOS_DEVICE_EXPOSURE_END - OHOS_DEVICE_EXPOSURE_START] = { diff --git a/camera/metadata/src/camera_metadata_info.cpp b/camera/metadata/src/camera_metadata_info.cpp index ee8c3b583e844aeedc538b34da4d78c2d31f99dc..558d789bd4097fb93e9811b67436e22f8fc8769d 100644 --- a/camera/metadata/src/camera_metadata_info.cpp +++ b/camera/metadata/src/camera_metadata_info.cpp @@ -184,6 +184,8 @@ const std::vector g_metadataTags = { OHOS_CONTROL_SYSTEM_CAPTURE, OHOS_CONTROL_AUTO_VIDEO_FRAME_RATE, OHOS_ABILITY_AUTO_VIDEO_FRAME_RATE, + OHOS_ABILITY_PHOTO_QUALITY_PRIORITIZATION, + OHOS_CONTROL_PHOTO_QUALITY_PRIORITIZATION, // Camera device image acquisition related OHOS_ABILITY_DEVICE_AVAILABLE_EXPOSUREMODES,