* @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
*
* @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);
}
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;