Get attribute to get focus level instead of function call 96/294096/1 accepted/tizen/unified/20230616.172418
authorJeongmo Yang <jm80.yang@samsung.com>
Tue, 13 Jun 2023 05:22:07 +0000 (14:22 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Tue, 13 Jun 2023 05:27:03 +0000 (14:27 +0900)
- mm_camcorder_get_focus_level() will be removed soon,
  because it returns error if pipeline is not created yet
  and the attribute value is enough to get focus level.

[Version] 0.3.62
[Issue Type] Bug fix

Change-Id: I4a988976362aaf012c88bf7dc402d9c135ec60a8
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
legacy/src/legacy_camera.c
packaging/mmsvc-camera.spec

index 0906dea..f840faf 100644 (file)
@@ -4641,10 +4641,11 @@ int legacy_camera_attr_get_focus_level(camera_h camera, int *level)
        int ret = MM_ERROR_NONE;
        camera_s *handle = (camera_s *)camera;
 
-       camera_return_val_if_fail(handle, CAMERA_ERROR_INVALID_PARAMETER);
-       camera_return_val_if_fail(level, CAMERA_ERROR_INVALID_PARAMETER);
+       camera_return_val_if_fail(handle && level, CAMERA_ERROR_INVALID_PARAMETER);
 
-       ret = mm_camcorder_get_focus_level(handle->mm_handle, level);
+       ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
+               MMCAM_CAMERA_FOCUS_LEVEL, level,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
index 492e53c..168a847 100644 (file)
@@ -1,6 +1,6 @@
 Name:       mmsvc-camera
 Summary:    A Camera module for muse server
-Version:    0.3.61
+Version:    0.3.62
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0