#include <muse_core.h>
#include <muse_client.h>
#include <dlog.h>
-#include <Elementary.h>
#include <tbm_surface_internal.h>
-#include <Evas.h>
-#include <Ecore_Wayland.h>
-#include <wayland-client.h>
-#include <tizen-extension-client-protocol.h>
-#ifdef TIZEN_FEATURE_EVAS_RENDERER
-#include <mm_evas_renderer.h>
-#endif /* TIZEN_FEATURE_EVAS_RENDERER */
#include <gio/gio.h>
#ifdef LOG_TAG
static void _camera_media_packet_data_release(camera_media_packet_data *mp_data, camera_cb_info_s *cb_info);
-static void __global(void *data, struct wl_registry *registry,
- uint32_t name, const char *interface, uint32_t version)
-{
- struct tizen_surface **tz_surface = NULL;
-
- if (!data) {
- LOGE("NULL data");
- return;
- }
-
- tz_surface = (struct tizen_surface **)data;
-
- if (!interface) {
- LOGW("NULL interface");
- return;
- }
-
- /*LOGI("interface %s", interface);*/
-
- if (strcmp(interface, "tizen_surface") == 0) {
- LOGD("binding tizen surface for wayland");
-
- *tz_surface = wl_registry_bind(registry, name, &tizen_surface_interface, version);
- if (*tz_surface == NULL)
- LOGE("failed to bind");
-
- LOGD("done");
- }
-
- return;
-}
-
-static void __global_remove(void *data, struct wl_registry *wl_registry, uint32_t name)
-{
- LOGD("enter");
- return;
-}
-
-static const struct wl_registry_listener _camera_wl_registry_listener = {
- __global,
- __global_remove
-};
-
-void __parent_id_getter(void *data, struct tizen_resource *tizen_resource, uint32_t id)
-{
- if (!data) {
- LOGE("NULL data");
- return;
- }
-
- *((unsigned int *)data) = id;
-
- LOGD("[CLIENT] got parent_id [%u] from server", id);
-
- return;
-}
-
-static const struct tizen_resource_listener _camera_tz_resource_listener = {
- __parent_id_getter
-};
-
-int _camera_get_wl_info(Evas_Object *obj, camera_wl_info_s *wl_info)
-{
- int ret = CAMERA_ERROR_NONE;
- Ecore_Wl_Window *window = NULL;
- struct wl_display *display = NULL;
- struct wl_display *display_wrapper = NULL;
- struct wl_surface *surface = NULL;
- struct wl_registry *registry = NULL;
- struct wl_event_queue *queue = NULL;
- struct tizen_surface *tz_surface = NULL;
- struct tizen_resource *tz_resource = NULL;
-
- if (!obj || !wl_info) {
- LOGE("NULL parameter %p %p", obj, wl_info);
- return CAMERA_ERROR_INVALID_OPERATION;
- }
-
- window = elm_win_wl_window_get(obj);
- if (!window) {
- LOGE("failed to get wayland window");
- ret = CAMERA_ERROR_INVALID_OPERATION;
- goto _DONE;
- }
-
- ecore_wl_window_video_has(window, EINA_TRUE);
-
- surface = (struct wl_surface *)ecore_wl_window_surface_get(window);
- if (!surface) {
- LOGE("failed to get wayland surface");
- ret = CAMERA_ERROR_INVALID_OPERATION;
- goto _DONE;
- }
-
- display = (struct wl_display *)ecore_wl_display_get();
- if (!display) {
- LOGE("failed to get wayland display");
- ret = CAMERA_ERROR_INVALID_OPERATION;
- goto _DONE;
- }
-
- display_wrapper = wl_proxy_create_wrapper(display);
- if (!display_wrapper) {
- LOGE("failed to create wl display wrapper");
- ret = CAMERA_ERROR_INVALID_OPERATION;
- goto _DONE;
- }
-
- queue = wl_display_create_queue(display);
- if (!queue) {
- LOGE("failed to create wl display queue");
- ret = CAMERA_ERROR_INVALID_OPERATION;
- goto _DONE;
- }
-
- wl_proxy_set_queue((struct wl_proxy *)display_wrapper, queue);
-
- registry = wl_display_get_registry(display_wrapper);
- if (!registry) {
- LOGE("failed to get wayland registry");
- ret = CAMERA_ERROR_INVALID_OPERATION;
- goto _DONE;
- }
-
- wl_registry_add_listener(registry, &_camera_wl_registry_listener, &tz_surface);
-
- wl_display_dispatch_queue(display, queue);
- wl_display_roundtrip_queue(display, queue);
-
- if (!tz_surface) {
- LOGE("failed to get tizen surface");
- ret = CAMERA_ERROR_INVALID_OPERATION;
- goto _DONE;
- }
-
- /* Get parent_id which is unique in a entire systemw. */
- tz_resource = tizen_surface_get_tizen_resource(tz_surface, surface);
- if (!tz_resource) {
- LOGE("failed to get tizen resurce");
- ret = CAMERA_ERROR_INVALID_OPERATION;
- goto _DONE;
- }
-
- wl_info->parent_id = 0;
-
- tizen_resource_add_listener(tz_resource, &_camera_tz_resource_listener, &wl_info->parent_id);
-
- wl_display_roundtrip_queue(display, queue);
-
- if (wl_info->parent_id > 0) {
- int rotation = 0;
- Ecore_Evas *ecore_evas = NULL;
- ret = CAMERA_ERROR_NONE;
-
- evas_object_geometry_get(obj, &wl_info->window_x, &wl_info->window_y,
- &wl_info->window_width, &wl_info->window_height);
-
- ecore_evas = ecore_evas_ecore_evas_get(evas_object_evas_get(obj));
- if (ecore_evas) {
- rotation = ecore_evas_rotation_get(ecore_evas);
- if (rotation == 90 || rotation == 270) {
- int temp = wl_info->window_width;
-
- LOGD("swap width and height %d, %d", wl_info->window_width, wl_info->window_height);
-
- wl_info->window_width = wl_info->window_height;
- wl_info->window_height = temp;
- }
- } else {
- LOGW("failed to get ecore_evas.. skip rotation check");
- }
-
- LOGD("evas object : %p, rotation : %d, parent id : %u, window : %d,%d,%dx%d",
- obj, rotation, wl_info->parent_id,
- wl_info->window_x, wl_info->window_y,
- wl_info->window_width, wl_info->window_height);
- } else {
- ret = CAMERA_ERROR_INVALID_OPERATION;
- LOGE("failed to get parent id");
- }
-
-_DONE:
- if (tz_surface) {
- tizen_surface_destroy(tz_surface);
- tz_surface = NULL;
- }
-
- if (tz_resource) {
- tizen_resource_destroy(tz_resource);
- tz_resource = NULL;
- }
-
- if (registry) {
- wl_registry_destroy(registry);
- registry = NULL;
- }
-
- if (queue) {
- wl_event_queue_destroy(queue);
- queue = NULL;
- }
-
- if (display_wrapper) {
- wl_proxy_wrapper_destroy(display_wrapper);
- display_wrapper = NULL;
- }
-
- return ret;
-}
-
-
static void __camera_update_api_waiting(camera_cb_info_s *cb_info, int api, int value)
{
if (!cb_info ||
camera_stream_data_s *stream = NULL;
camera_media_packet_data *mp_data = NULL;
media_packet_h pkt = NULL;
-#ifdef TIZEN_FEATURE_EVAS_RENDERER
media_packet_h pkt_evas = NULL;
-#endif /* TIZEN_FEATURE_EVAS_RENDERER */
if (!cb_info || !recv_msg) {
LOGE("invalid param %p %p", cb_info, recv_msg);
}
if (CHECK_PREVIEW_CB(cb_info, PREVIEW_CB_TYPE_EVAS)) {
-#ifdef TIZEN_FEATURE_EVAS_RENDERER
ret = _camera_media_packet_data_create(tbm_key, num_buffer_key, bo, buffer_bo, data_bo, &mp_data);
if (ret == CAMERA_ERROR_NONE) {
mp_data = NULL;
}
}
-#else /* TIZEN_FEATURE_EVAS_RENDERER */
- LOGW("evas renderer is not supported");
-#endif /* TIZEN_FEATURE_EVAS_RENDERER */
}
/* call media packet callback */
}
}
-#ifdef TIZEN_FEATURE_EVAS_RENDERER
/* call evas renderer */
if (pkt_evas) {
- g_mutex_lock(&cb_info->evas_mutex);
if (cb_info->run_evas_render) {
- mm_evas_renderer_write(pkt_evas, cb_info->evas_info);
+ mm_display_interface_evas_render(cb_info->dp_interface, pkt_evas);
} else {
LOGW("evas renderer is stopped, skip this buffer...");
media_packet_destroy(pkt_evas);
}
pkt_evas = NULL;
- g_mutex_unlock(&cb_info->evas_mutex);
}
-#endif /* TIZEN_FEATURE_EVAS_RENDERER */
/* send message for preview callback return */
if (!CHECK_PREVIEW_CB(cb_info, PREVIEW_CB_TYPE_EVAS))
goto ErrorExit;
}
+ /* display interface handle */
+ if (mm_display_interface_init(&cb_info->dp_interface) != MM_ERROR_NONE) {
+ LOGE("display interface init failed");
+ goto ErrorExit;
+ }
+
cb_info->api_waiting[MUSE_CAMERA_API_CREATE] = 1;
for (i = 0 ; i < MUSE_CAMERA_API_MAX ; i++) {
g_mutex_init(&cb_info->idle_event_mutex);
g_cond_init(&cb_info->idle_event_cond);
g_mutex_init(&cb_info->mp_data_mutex);
-#ifdef TIZEN_FEATURE_EVAS_RENDERER
- g_mutex_init(&cb_info->evas_mutex);
-#endif /* TIZEN_FEATURE_EVAS_RENDERER */
for (i = 0 ; i < MUSE_CAMERA_EVENT_TYPE_NUM ; i++)
g_mutex_init(&cb_info->user_cb_mutex[i]);
cb_info->fd = sockfd;
cb_info->preview_cb_flag = 0;
-#ifdef TIZEN_FEATURE_EVAS_RENDERER
- cb_info->evas_info = NULL;
-#endif /* TIZEN_FEATURE_EVAS_RENDERER */
/* message receive thread */
g_atomic_int_set(&cb_info->msg_recv_running, 1);
g_mutex_clear(&cb_info->idle_event_mutex);
g_cond_clear(&cb_info->idle_event_cond);
g_mutex_clear(&cb_info->mp_data_mutex);
-#ifdef TIZEN_FEATURE_EVAS_RENDERER
- g_mutex_clear(&cb_info->evas_mutex);
-#endif /* TIZEN_FEATURE_EVAS_RENDERER */
for (i = 0 ; i < MUSE_CAMERA_API_MAX ; i++) {
g_mutex_clear(&cb_info->api_mutex[i]);
g_cond_clear(&cb_info->api_cond[i]);
}
+ if (cb_info->dp_interface) {
+ mm_display_interface_deinit(cb_info->dp_interface);
+ cb_info->dp_interface = NULL;
+ }
+
g_free(cb_info);
cb_info = NULL;
}
g_mutex_clear(&cb_info->idle_event_mutex);
g_cond_clear(&cb_info->idle_event_cond);
g_mutex_clear(&cb_info->mp_data_mutex);
-#ifdef TIZEN_FEATURE_EVAS_RENDERER
- g_mutex_clear(&cb_info->evas_mutex);
-#endif /* TIZEN_FEATURE_EVAS_RENDERER */
for (i = 0 ; i < MUSE_CAMERA_API_MAX ; i++) {
g_mutex_clear(&cb_info->api_mutex[i]);
cb_info->pkt_fmt = NULL;
}
-#ifdef TIZEN_FEATURE_EVAS_RENDERER
- if (cb_info->evas_info)
- mm_evas_renderer_destroy(&cb_info->evas_info);
-#endif /* TIZEN_FEATURE_EVAS_RENDERER */
+ if (cb_info->dp_interface) {
+ mm_display_interface_deinit(cb_info->dp_interface);
+ cb_info->dp_interface = NULL;
+ }
cb_info->preview_cb_flag = 0;
int _camera_start_evas_rendering(camera_h camera)
{
- int ret = CAMERA_ERROR_NONE;
camera_cli_s *pc = (camera_cli_s *)camera;
if (!pc || !pc->cb_info) {
return CAMERA_ERROR_NONE;
}
-#ifdef TIZEN_FEATURE_EVAS_RENDERER
- g_mutex_lock(&pc->cb_info->evas_mutex);
-
/* set evas render flag as RUN */
pc->cb_info->run_evas_render = true;
- ret = CAMERA_ERROR_NONE;
-
- g_mutex_unlock(&pc->cb_info->evas_mutex);
-#else /* TIZEN_FEATURE_EVAS_RENDERER */
- LOGW("evas renderer is not supported");
- ret = CAMERA_ERROR_NOT_SUPPORTED;
-#endif /* TIZEN_FEATURE_EVAS_RENDERER */
- return ret;
+ return CAMERA_ERROR_NONE;
}
return CAMERA_ERROR_NONE;
}
-#ifdef TIZEN_FEATURE_EVAS_RENDERER
- g_mutex_lock(&pc->cb_info->evas_mutex);
-
/* set evas render flag as STOP and release buffers */
pc->cb_info->run_evas_render = false;
- ret = mm_evas_renderer_retrieve_all_packets(pc->cb_info->evas_info, keep_screen);
- if (ret != MM_ERROR_NONE) {
+ ret = mm_display_interface_evas_flush(pc->cb_info->dp_interface, keep_screen);
+ if (ret == MM_ERROR_NONE) {
+ ret = CAMERA_ERROR_NONE;
+ } else {
LOGE("mm_evas_renderer_retrieve_all_packets failed 0x%x", ret);
ret = CAMERA_ERROR_INVALID_OPERATION;
}
- g_mutex_unlock(&pc->cb_info->evas_mutex);
-#else /* TIZEN_FEATURE_EVAS_RENDERER */
- LOGW("evas renderer is not supported");
- ret = CAMERA_ERROR_NOT_SUPPORTED;
-#endif /* TIZEN_FEATURE_EVAS_RENDERER */
-
return ret;
}
int camera_set_display(camera_h camera, camera_display_type_e type, camera_display_h display)
{
int ret = CAMERA_ERROR_NONE;
- void *set_display_handle = NULL;
- Evas_Object *obj = NULL;
- const char *object_type = NULL;
camera_cli_s *pc = (camera_cli_s *)camera;
camera_cb_info_s *cb_info = NULL;
muse_camera_api_e api = MUSE_CAMERA_API_SET_DISPLAY;
LOGD("Enter - display : %p", display);
if (type == CAMERA_DISPLAY_TYPE_NONE) {
- set_display_handle = 0;
LOGD("display type NONE");
} else {
- obj = (Evas_Object *)display;
- object_type = evas_object_type_get(obj);
- if (object_type) {
- if (type == CAMERA_DISPLAY_TYPE_OVERLAY && !strcmp(object_type, "elm_win")) {
- /* get wayland parent id */
- if (_camera_get_wl_info(obj, &pc->wl_info) != CAMERA_ERROR_NONE) {
- LOGE("failed to get wayland info");
- return CAMERA_ERROR_INVALID_OPERATION;
- }
-
- set_display_handle = (void *)&pc->wl_info;
- LOGD("display type OVERLAY : handle %p", set_display_handle);
- } else if (type == CAMERA_DISPLAY_TYPE_EVAS && !strcmp(object_type, "image")) {
- /* evas object surface */
- set_display_handle = (void *)display;
- LOGD("display type EVAS : handle %p", set_display_handle);
-
-#ifdef TIZEN_FEATURE_EVAS_RENDERER
- g_mutex_lock(&cb_info->evas_mutex);
-
- if (cb_info->evas_info) {
- LOGW("destroy existed evas renderer %p", cb_info->evas_info);
- ret = mm_evas_renderer_destroy(&cb_info->evas_info);
- if (ret != MM_ERROR_NONE) {
- LOGE("failed to destroy evas renderer %p", cb_info->evas_info);
- g_mutex_unlock(&cb_info->evas_mutex);
- return CAMERA_ERROR_INVALID_OPERATION;
- }
- }
-
- /* create evas renderer */
- ret = mm_evas_renderer_create(&cb_info->evas_info, (Evas_Object *)set_display_handle);
- if (ret == MM_ERROR_NONE) {
- camera_flip_e flip = CAMERA_FLIP_NONE;
- camera_display_mode_e mode = CAMERA_DISPLAY_MODE_LETTER_BOX;
- camera_rotation_e rotation = CAMERA_ROTATION_NONE;
- bool visible = 0;
- int x = 0;
- int y = 0;
- int width = 0;
- int height = 0;
-
- camera_get_display_flip(camera, &flip);
- camera_get_display_mode(camera, &mode);
- camera_get_display_rotation(camera, &rotation);
- camera_is_display_visible(camera, &visible);
- camera_attr_get_display_roi_area(camera, &x, &y, &width, &height);
-
- LOGD("current setting : flip %d, mode %d, rotation %d, visible %d, roi %d,%d,%dx%d",
- flip, mode, rotation, visible, x, y, width, height);
-
- ret = mm_evas_renderer_set_flip(cb_info->evas_info, flip);
- ret |= mm_evas_renderer_set_geometry(cb_info->evas_info, mode);
- ret |= mm_evas_renderer_set_rotation(cb_info->evas_info, rotation);
- ret |= mm_evas_renderer_set_visible(cb_info->evas_info, visible);
-
- if (mode == CAMERA_DISPLAY_MODE_CUSTOM_ROI)
- ret |= mm_evas_renderer_set_roi_area(cb_info->evas_info, x, y, width, height);
- }
-
- g_mutex_unlock(&cb_info->evas_mutex);
-
- if (ret != MM_ERROR_NONE) {
- LOGE("mm_evas_renderer error 0x%x", ret);
- return CAMERA_ERROR_INVALID_OPERATION;
- }
-#else /* TIZEN_FEATURE_EVAS_RENDERER */
- LOGE("EVAS surface is not supported");
- return CAMERA_ERROR_NOT_SUPPORTED;
-#endif /* TIZEN_FEATURE_EVAS_RENDERER */
- } else {
- LOGE("unknown evas object [%p,%s] or type [%d] mismatch", obj, object_type, type);
- return CAMERA_ERROR_INVALID_PARAMETER;
- }
- } else {
- LOGE("failed to get evas object type from %p", obj);
- return CAMERA_ERROR_INVALID_PARAMETER;
+ 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) {
+ camera_flip_e flip = CAMERA_FLIP_NONE;
+ camera_display_mode_e mode = CAMERA_DISPLAY_MODE_LETTER_BOX;
+ camera_rotation_e rotation = CAMERA_ROTATION_NONE;
+ bool visible = 0;
+ int x = 0;
+ int y = 0;
+ int width = 0;
+ int height = 0;
+
+ camera_get_display_flip(camera, &flip);
+ camera_get_display_mode(camera, &mode);
+ camera_get_display_rotation(camera, &rotation);
+ camera_is_display_visible(camera, &visible);
+ camera_attr_get_display_roi_area(camera, &x, &y, &width, &height);
+
+ LOGD("current setting : flip %d, mode %d, rotation %d, visible %d, roi %d,%d,%dx%d",
+ flip, mode, rotation, visible, x, y, width, height);
+
+ ret = mm_display_interface_evas_set_flip(cb_info->dp_interface, flip);
+ ret |= mm_display_interface_evas_set_mode(cb_info->dp_interface, mode);
+ ret |= mm_display_interface_evas_set_rotation(cb_info->dp_interface, rotation);
+ ret |= mm_display_interface_evas_set_visible(cb_info->dp_interface, visible);
+
+ if (mode == CAMERA_DISPLAY_MODE_CUSTOM_ROI)
+ ret |= mm_display_interface_evas_set_roi_area(cb_info->dp_interface, x, y, width, height);
}
}
- pc->display_handle = (intptr_t)set_display_handle;
-
if (type == CAMERA_DISPLAY_TYPE_OVERLAY) {
int send_ret = 0;
msg = muse_core_msg_new(api,
MUSE_TYPE_INT, "type", type,
- MUSE_TYPE_ARRAY, "wl_info", length, (int *)&pc->wl_info,
+ MUSE_TYPE_INT, "parent_id", cb_info->parent_id,
NULL);
if (!msg) {
LOGE("msg creation failed: api %d", api);
__camera_update_api_waiting(pc->cb_info, api, -1);
muse_core_msg_free(msg);
-
- LOGD("wayland parent id : %d, window %d,%d,%dx%d",
- pc->wl_info.parent_id, pc->wl_info.window_x, pc->wl_info.window_y,
- pc->wl_info.window_width, pc->wl_info.window_height);
} else {
CAMERA_MSG_PARAM_SET(param, INT, type);
return CAMERA_ERROR_INVALID_PARAMETER;
}
-#ifdef TIZEN_FEATURE_EVAS_RENDERER
if (CHECK_PREVIEW_CB(pc->cb_info, PREVIEW_CB_TYPE_EVAS)) {
- g_mutex_lock(&pc->cb_info->evas_mutex);
-
- ret = mm_evas_renderer_set_rotation(pc->cb_info->evas_info, rotation);
-
- g_mutex_unlock(&pc->cb_info->evas_mutex);
-
+ ret = mm_display_interface_evas_set_rotation(pc->cb_info->dp_interface, rotation);
if (ret != MM_ERROR_NONE) {
LOGE("failed to set rotation for evas surface 0x%x", ret);
return CAMERA_ERROR_INVALID_OPERATION;
}
}
-#endif /* TIZEN_FEATURE_EVAS_RENDERER */
CAMERA_MSG_PARAM_SET(param, INT, set_rotation);
return CAMERA_ERROR_INVALID_PARAMETER;
}
-#ifdef TIZEN_FEATURE_EVAS_RENDERER
if (CHECK_PREVIEW_CB(pc->cb_info, PREVIEW_CB_TYPE_EVAS)) {
- g_mutex_lock(&pc->cb_info->evas_mutex);
-
- ret = mm_evas_renderer_set_flip(pc->cb_info->evas_info, flip);
-
- g_mutex_unlock(&pc->cb_info->evas_mutex);
-
+ ret = mm_display_interface_evas_set_flip(pc->cb_info->dp_interface, flip);
if (ret != MM_ERROR_NONE) {
LOGE("failed to set flip for evas surface 0x%x", ret);
return CAMERA_ERROR_INVALID_OPERATION;
}
}
-#endif /* TIZEN_FEATURE_EVAS_RENDERER */
CAMERA_MSG_PARAM_SET(param, INT, set_flip);
return CAMERA_ERROR_INVALID_PARAMETER;
}
-#ifdef TIZEN_FEATURE_EVAS_RENDERER
if (CHECK_PREVIEW_CB(pc->cb_info, PREVIEW_CB_TYPE_EVAS)) {
- g_mutex_lock(&pc->cb_info->evas_mutex);
-
- ret = mm_evas_renderer_set_visible(pc->cb_info->evas_info, visible);
-
- g_mutex_unlock(&pc->cb_info->evas_mutex);
-
+ ret = mm_display_interface_evas_set_visible(pc->cb_info->dp_interface, visible);
if (ret != MM_ERROR_NONE) {
LOGE("failed to set visible for evas surface 0x%x", ret);
return CAMERA_ERROR_INVALID_OPERATION;
}
}
-#endif /* TIZEN_FEATURE_EVAS_RENDERER */
CAMERA_MSG_PARAM_SET(param, INT, set_visible);
return CAMERA_ERROR_INVALID_PARAMETER;
}
-#ifdef TIZEN_FEATURE_EVAS_RENDERER
if (CHECK_PREVIEW_CB(pc->cb_info, PREVIEW_CB_TYPE_EVAS)) {
- g_mutex_lock(&pc->cb_info->evas_mutex);
-
- ret = mm_evas_renderer_set_geometry(pc->cb_info->evas_info, mode);
-
- g_mutex_unlock(&pc->cb_info->evas_mutex);
-
+ ret = mm_display_interface_evas_set_mode(pc->cb_info->dp_interface, mode);
if (ret != MM_ERROR_NONE) {
LOGE("failed to set geometry for evas surface 0x%x", ret);
return CAMERA_ERROR_INVALID_OPERATION;
}
}
-#endif /* TIZEN_FEATURE_EVAS_RENDERER */
CAMERA_MSG_PARAM_SET(param, INT, set_mode);
LOGD("Enter");
-#ifdef TIZEN_FEATURE_EVAS_RENDERER
if (CHECK_PREVIEW_CB(pc->cb_info, PREVIEW_CB_TYPE_EVAS)) {
- g_mutex_lock(&pc->cb_info->evas_mutex);
-
- ret = mm_evas_renderer_set_roi_area(pc->cb_info->evas_info, x, y, width, height);
-
- g_mutex_unlock(&pc->cb_info->evas_mutex);
-
+ ret = mm_display_interface_evas_set_roi_area(pc->cb_info->dp_interface, x, y, width, height);
if (ret != MM_ERROR_NONE) {
LOGE("mm_evas_renderer_set_roi_area error 0x%x", ret);
return CAMERA_ERROR_INVALID_OPERATION;
}
}
-#endif /* TIZEN_FEATURE_EVAS_RENDERER */
length = sizeof(set_display_roi_area) / sizeof(int) + \
(sizeof(set_display_roi_area) % sizeof(int) ? 1 : 0);