diff options
author | Jeongmo Yang <jm80.yang@samsung.com> | 2023-06-08 11:33:46 +0900 |
---|---|---|
committer | Jeongmo Yang <jm80.yang@samsung.com> | 2023-07-17 16:32:52 +0900 |
commit | 99ffbec3a9b4244302ecdc83fd1cdf16c651573c (patch) | |
tree | 031d6bc3e76a403699c387d99e8fffec5892071c | |
parent | 8dc12711305f7d58097003e1221abf9d64ecd473 (diff) | |
download | camera-99ffbec3a9b4244302ecdc83fd1cdf16c651573c.tar.gz camera-99ffbec3a9b4244302ecdc83fd1cdf16c651573c.tar.bz2 camera-99ffbec3a9b4244302ecdc83fd1cdf16c651573c.zip |
[ACR-1768] Add new APIs for focus levelaccepted/tizen/unified/20230718.162218
[Version] 0.4.111
[Issue Type] New feature
Change-Id: I09fd6119f081389d0706782c97e63d1d94b0f777
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
-rw-r--r-- | include/camera.h | 51 | ||||
-rw-r--r-- | include/camera_internal.h | 51 | ||||
-rw-r--r-- | packaging/capi-media-camera.spec | 2 | ||||
-rw-r--r-- | src/camera.c | 24 | ||||
-rw-r--r-- | src/camera_internal.c | 24 |
5 files changed, 76 insertions, 76 deletions
diff --git a/include/camera.h b/include/camera.h index b8e5b79..77c0dd5 100644 --- a/include/camera.h +++ b/include/camera.h @@ -3630,6 +3630,57 @@ int camera_attr_get_sharpness(camera_h camera, int *level); int camera_attr_get_sharpness_range(camera_h camera, int *min, int *max); /** + * @brief Sets the manual focus level. + * @since_tizen 8.0 + * @remarks The auto focusing will be stopped when camera_attr_set_focus_level() is called. + * @param[in] camera The handle to the camera + * @param[in] level The manual focus level + * @return @c 0 on success, otherwise a negative error value + * @retval #CAMERA_ERROR_NONE Successful + * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported + * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error + * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected + * @see camera_attr_get_focus_level() + * @see camera_attr_get_focus_level_range() + */ +int camera_attr_set_focus_level(camera_h camera, int level); + +/** + * @brief Gets the manual focus level. + * @since_tizen 8.0 + * @param[in] camera The handle to the camera + * @param[out] level The manual focus level + * @return @c 0 on success, otherwise a negative error value + * @retval #CAMERA_ERROR_NONE Successful + * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported + * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error + * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected + * @see camera_attr_set_focus_level() + * @see camera_attr_get_focus_level_range() + */ +int camera_attr_get_focus_level(camera_h camera, int *level); + +/** + * @brief Gets lower limit and upper limit for manual focus level. + * @since_tizen 8.0 + * @remarks If the min value is greater than the max value, it means that this feature is not supported. + * @param[in] camera The handle to the camera + * @param[out] min The lower limit for manual focus level + * @param[out] max The upper limit for manual focus level + * @return @c 0 on success, otherwise a negative error value + * @retval #CAMERA_ERROR_NONE Successful + * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported + * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error + * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected + * @see camera_attr_set_focus_level() + * @see camera_attr_get_focus_level() + */ +int camera_attr_get_focus_level_range(camera_h camera, int *min, int *max); + +/** * @} */ diff --git a/include/camera_internal.h b/include/camera_internal.h index 556d46e..a7ad9e9 100644 --- a/include/camera_internal.h +++ b/include/camera_internal.h @@ -182,57 +182,6 @@ int camera_attr_get_flash_brightness_range(camera_h camera, int *min, int *max); /** * @internal - * @brief Sets the manual focus level. - * @since_tizen 6.5 - * @remarks The auto focusing will be stopped when camera_attr_set_focus_level() is called. - * @param[in] camera The handle to the camera - * @param[in] level The manual focus level - * @return @c 0 on success, otherwise a negative error value - * @retval #CAMERA_ERROR_NONE Successful - * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error - * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - * @see camera_attr_get_focus_level() - * @see camera_attr_get_focus_level_range() - */ -int camera_attr_set_focus_level(camera_h camera, int level); - -/** - * @internal - * @brief Gets the manual focus level. - * @since_tizen 6.5 - * @param[in] camera The handle to the camera - * @param[out] level The manual focus level - * @return @c 0 on success, otherwise a negative error value - * @retval #CAMERA_ERROR_NONE Successful - * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error - * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - * @see camera_attr_set_focus_level() - * @see camera_attr_get_focus_level_range() - */ -int camera_attr_get_focus_level(camera_h camera, int *level); - -/** - * @internal - * @brief Gets lower limit and upper limit for manual focus level. - * @since_tizen 6.5 - * @remarks If the min value is greater than the max value, it means that this feature is not supported. - * @param[in] camera The handle to the camera - * @param[out] min The lower limit for manual focus level - * @param[out] max The upper limit for manual focus level - * @return @c 0 on success, otherwise a negative error value - * @retval #CAMERA_ERROR_NONE Successful - * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error - * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - * @see camera_attr_set_focus_level() - * @see camera_attr_get_focus_level() - */ -int camera_attr_get_focus_level_range(camera_h camera, int *min, int *max); - -/** - * @internal * @brief Sets device for the extra preview stream. * @since_tizen 7.0 * @param[in] camera The handle to the camera diff --git a/packaging/capi-media-camera.spec b/packaging/capi-media-camera.spec index e4a8e42..1ec8a93 100644 --- a/packaging/capi-media-camera.spec +++ b/packaging/capi-media-camera.spec @@ -1,6 +1,6 @@ Name: capi-media-camera Summary: A Camera API -Version: 0.4.110 +Version: 0.4.111 Release: 0 Group: Multimedia/API License: Apache-2.0 diff --git a/src/camera.c b/src/camera.c index f061b94..c5494f5 100644 --- a/src/camera.c +++ b/src/camera.c @@ -6842,6 +6842,30 @@ int camera_attr_get_preview_frame_rotation(camera_h camera, camera_rotation_e *r } +int camera_attr_set_focus_level(camera_h camera, int level) +{ + return _camera_attr_set_level(camera, MUSE_CAMERA_API_ATTR_SET_FOCUS_LEVEL, level); +} + + +int camera_attr_get_focus_level(camera_h camera, int *level) +{ + return _camera_attr_get_level(camera, + MUSE_CAMERA_API_ATTR_GET_FOCUS_LEVEL, + MUSE_CAMERA_GET_INT_FOCUS_LEVEL, + level); +} + + +int camera_attr_get_focus_level_range(camera_h camera, int *min, int *max) +{ + return _camera_attr_get_range(camera, + MUSE_CAMERA_API_ATTR_GET_FOCUS_LEVEL_RANGE, + MUSE_CAMERA_GET_INT_PAIR_FOCUS_LEVEL_RANGE, + min, max); +} + + int _camera_get_log_level(void) { return g_camera_log_level; diff --git a/src/camera_internal.c b/src/camera_internal.c index 8222451..9e624d3 100644 --- a/src/camera_internal.c +++ b/src/camera_internal.c @@ -248,30 +248,6 @@ int camera_attr_get_flash_brightness_range(camera_h camera, int *min, int *max) } -int camera_attr_set_focus_level(camera_h camera, int level) -{ - return _camera_attr_set_level(camera, MUSE_CAMERA_API_ATTR_SET_FOCUS_LEVEL, level); -} - - -int camera_attr_get_focus_level(camera_h camera, int *level) -{ - return _camera_attr_get_level(camera, - MUSE_CAMERA_API_ATTR_GET_FOCUS_LEVEL, - MUSE_CAMERA_GET_INT_FOCUS_LEVEL, - level); -} - - -int camera_attr_get_focus_level_range(camera_h camera, int *min, int *max) -{ - return _camera_attr_get_range(camera, - MUSE_CAMERA_API_ATTR_GET_FOCUS_LEVEL_RANGE, - MUSE_CAMERA_GET_INT_PAIR_FOCUS_LEVEL_RANGE, - min, max); -} - - int camera_set_extra_preview_device(camera_h camera, int stream_id, camera_device_e device) { int ret = CAMERA_ERROR_NONE; |