int camera_stop_evas_rendering(camera_h camera, bool keep_screen);
/**
+ * @brief Sets the ecore wayland video display.
+ * @since_tizen 6.0
+ * @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.
+ * @param[in] camera The handle to the camera
+ * @param[in] ecore_wl_window The ecore wayland window handle
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #CAMERA_ERROR_NONE Successful
+ * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
+ * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
+ * @pre The camera state must be set to #CAMERA_STATE_CREATED.
+ * @see camera_start_preview()
+ * @see ecore_thread_main_loop_begin()
+ * @see ecore_thread_main_loop_end()
+ */
+int camera_set_ecore_wl_display(camera_h camera, void *ecore_wl_window);
+
+/**
* @}
*/
#ifdef __cplusplus
return ret;
}
-int camera_set_display(camera_h camera, camera_display_type_e type, camera_display_h display)
+
+int _camera_set_display(camera_h camera, mm_display_type_e type, void *display)
{
int mm_ret = MM_ERROR_NONE;
int ret = CAMERA_ERROR_NONE;
return CAMERA_ERROR_INVALID_PARAMETER;
}
- if (type < CAMERA_DISPLAY_TYPE_OVERLAY || type > CAMERA_DISPLAY_TYPE_NONE) {
+ if (type > MM_DISPLAY_TYPE_OVERLAY_EXT) {
LOGE("invalid type %d", type);
return CAMERA_ERROR_INVALID_PARAMETER;
}
- if (type != CAMERA_DISPLAY_TYPE_NONE && display == NULL) {
+ if (type != MM_DISPLAY_TYPE_NONE && display == NULL) {
LOGE("display type[%d] is not NONE, but display handle is NULL", type);
return CAMERA_ERROR_INVALID_PARAMETER;
}
LOGD("Enter - type : %d, display : %p", type, display);
- if (type != CAMERA_DISPLAY_TYPE_NONE) {
+ if (type != MM_DISPLAY_TYPE_NONE) {
/* check display interface handle */
if (!cb_info->dp_interface) {
LOGE("display interface not supported");
return CAMERA_ERROR_INVALID_OPERATION;
}
- if (type == CAMERA_DISPLAY_TYPE_OVERLAY) {
+ if (type == MM_DISPLAY_TYPE_OVERLAY) {
mm_ret = mm_display_interface_get_window_rect(cb_info->dp_interface, &dp_info->window_rect);
LOGD("ret 0x%x, parent_id %d, window rect %d,%d,%dx%d",
ret, dp_info->parent_id, dp_info->window_rect.x, dp_info->window_rect.y,
dp_info->window_rect.width, dp_info->window_rect.height);
- } else if (type == CAMERA_DISPLAY_TYPE_EVAS) {
+ } else if (type == MM_DISPLAY_TYPE_EVAS) {
//LCOV_EXCL_START
camera_flip_e flip = CAMERA_FLIP_NONE;
camera_display_mode_e mode = CAMERA_DISPLAY_MODE_LETTER_BOX;
_camera_msg_send_param1(api, cb_info, &ret, ¶m, CAMERA_CB_TIMEOUT);
if (ret == CAMERA_ERROR_NONE) {
- if (type == CAMERA_DISPLAY_TYPE_EVAS)
+ if (type == MM_DISPLAY_TYPE_EVAS)
SET_PREVIEW_CB_TYPE(cb_info, PREVIEW_CB_TYPE_EVAS);
}
}
+int camera_set_display(camera_h camera, camera_display_type_e type, camera_display_h display)
+{
+ LOGD("type %d, display %p", type, display);
+ return _camera_set_display(camera, (mm_display_type_e)type, display);
+}
+
+
int camera_set_preview_resolution(camera_h camera, int width, int height)
{
int ret = CAMERA_ERROR_NONE;