[ACR-1768] Add new APIs for focus level 54/293954/4 accepted/tizen/unified/20230718.162218
authorJeongmo Yang <jm80.yang@samsung.com>
Thu, 8 Jun 2023 02:33:46 +0000 (11:33 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Mon, 17 Jul 2023 07:32:52 +0000 (16:32 +0900)
[Version] 0.4.111
[Issue Type] New feature

Change-Id: I09fd6119f081389d0706782c97e63d1d94b0f777
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
include/camera.h
include/camera_internal.h
packaging/capi-media-camera.spec
src/camera.c
src/camera_internal.c

index b8e5b79..77c0dd5 100644 (file)
@@ -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);
+
+/**
  * @}
  */
 
index 556d46e..a7ad9e9 100644 (file)
@@ -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
index e4a8e42..1ec8a93 100644 (file)
@@ -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
index f061b94..c5494f5 100644 (file)
@@ -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;
index 8222451..9e624d3 100644 (file)
@@ -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;