summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeongmo Yang <jm80.yang@samsung.com>2018-05-31 15:53:32 +0900
committerJeongmo Yang <jm80.yang@samsung.com>2018-06-11 14:33:07 +0900
commita689f52729841552e12e9efc11fee631ba529270 (patch)
tree3ada5bd66b42a790f90a728cb183db0cfa75671a
parente1e66f6c33a0d32f43acb3500e47bdde87a308b8 (diff)
downloadcamera-a689f52729841552e12e9efc11fee631ba529270.tar.gz
camera-a689f52729841552e12e9efc11fee631ba529270.tar.bz2
camera-a689f52729841552e12e9efc11fee631ba529270.zip
[ACR-1231] New restriction is added to camera_set_displaysubmit/tizen/20180615.051115accepted/tizen/unified/20180619.110337
[Version] 0.4.8 [Profile] Common [Issue Type] Update [Dependency module] N/A Change-Id: Id511ffc082be9db2a525a0584c8c2abbaa18871b Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
-rw-r--r--include/camera.h7
-rw-r--r--packaging/capi-media-camera.spec2
-rw-r--r--src/camera.c7
3 files changed, 14 insertions, 2 deletions
diff --git a/include/camera.h b/include/camera.h
index e795032..da87370 100644
--- a/include/camera.h
+++ b/include/camera.h
@@ -1057,6 +1057,11 @@ int camera_cancel_focusing(camera_h camera);
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @remarks This function must be called before previewing (see camera_start_preview()).
* In Custom ROI display mode, camera_attr_set_display_roi_area() function must be called before calling this function.
+ * @remarks This function must be called in main thread of the application.
+ * Otherwise, it will return #CAMERA_ERROR_INVALID_OPERATION by internal restriction.
+ * To avoid #CAMERA_ERROR_INVALID_OPERATION in sub thread, ecore_thread_main_loop_begin() and
+ * ecore_thread_main_loop_end() can be used, but deadlock can occur if the main thread is busy.
+ * So, it's not recommended to use them. (Since 5.0)
* @param[in] camera The handle to the camera
* @param[in] type The display type
* @param[in] display The display handle from #GET_DISPLAY
@@ -1072,6 +1077,8 @@ int camera_cancel_focusing(camera_h camera);
*
* @see camera_start_preview()
* @see #GET_DISPLAY
+ * @see ecore_thread_main_loop_begin()
+ * @see ecore_thread_main_loop_end()
*/
int camera_set_display(camera_h camera, camera_display_type_e type, camera_display_h display);
diff --git a/packaging/capi-media-camera.spec b/packaging/capi-media-camera.spec
index b903548..030fe49 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.7
+Version: 0.4.8
Release: 0
Group: Multimedia/API
License: Apache-2.0
diff --git a/src/camera.c b/src/camera.c
index f2e5df9..488f841 100644
--- a/src/camera.c
+++ b/src/camera.c
@@ -2994,7 +2994,12 @@ int camera_set_display(camera_h camera, camera_display_type_e type, camera_displ
}
ret = mm_display_interface_set_display(cb_info->dp_interface, type, display, &cb_info->parent_id);
- if (ret == MM_ERROR_NONE && type == CAMERA_DISPLAY_TYPE_EVAS) {
+ if (ret != MM_ERROR_NONE) {
+ LOGE("[INVALID_OPERATION] set display failed[0x%x]", ret);
+ return CAMERA_ERROR_INVALID_OPERATION;
+ }
+
+ if (type == CAMERA_DISPLAY_TYPE_EVAS) {
camera_flip_e flip = CAMERA_FLIP_NONE;
camera_display_mode_e mode = CAMERA_DISPLAY_MODE_LETTER_BOX;
camera_rotation_e rotation = CAMERA_ROTATION_NONE;