DISP_GEO_METHOD_FULL_SCREEN,
DISP_GEO_METHOD_CROPPED_FULL_SCREEN,
DISP_GEO_METHOD_ORIGIN_SIZE_OR_LETTER_BOX,
+ DISP_GEO_METHOD_CUSTOM_ROI,
DISP_GEO_METHOD_NUM,
};
if (result.x || result.y)
LOGD("coordinate x, y (%d, %d) for locating video to center", result.x, result.y);
- evas_object_image_fill_set(evas_info->eo, result.x, result.y, result.w, result.h);
+
+ if (evas_info->display_geometry_method != DISP_GEO_METHOD_CUSTOM_ROI)
+ evas_object_image_fill_set(evas_info->eo, result.x, result.y, result.w, result.h);
evas_object_image_pixels_dirty_set(evas_info->eo, EINA_TRUE);
LOGD("GEO_METHOD : src(%dx%d), dst(%dx%d), dst_x(%d), dst_y(%d), rotate(%d), flip(%d)", evas_info->w, evas_info->h, evas_info->eo_size.w, evas_info->eo_size.h, evas_info->eo_size.x, evas_info->eo_size.y, evas_info->rotate_angle, evas_info->flip);
if (result.x || result.y)
LOGD("coordinate x, y (%d, %d) for locating video to center", result.x, result.y);
- evas_object_image_fill_set(evas_info->eo, result.x, result.y, result.w, result.h);
+
+ if (evas_info->display_geometry_method != DISP_GEO_METHOD_CUSTOM_ROI)
+ evas_object_image_fill_set(evas_info->eo, result.x, result.y, result.w, result.h);
/* set flush buffer */
surf.type = EVAS_NATIVE_SURFACE_TBM;
evas_info->pkt_info[i].tbm_surf = NULL;
evas_info->pkt_info[i].prev = -1;
}
-
evas_info->cur_idx = -1;
+ evas_info->dst_roi.x = evas_info->dst_roi.y = evas_info->dst_roi.w = evas_info->dst_roi.h = 0;
evas_info->eo = eo;
evas_info->epipe = ecore_pipe_add((Ecore_Pipe_Cb) _evas_pipe_cb, evas_info);
if (!evas_info->epipe) {
}
evas_info->eo_size.x = evas_info->eo_size.y = evas_info->eo_size.w = evas_info->eo_size.h = 0;
+ evas_info->dst_roi.x = evas_info->dst_roi.y = evas_info->dst_roi.w = evas_info->dst_roi.h = 0;
evas_info->w = evas_info->h = 0;
if (evas_info->flush_buffer)
result->h = evas_info->eo_size.h;
}
break;
+ case DISP_GEO_METHOD_CUSTOM_ROI:
+ LOGD("custom roi mode");
+ evas_info->use_ratio= FALSE;
+ result->x = evas_info->dst_roi.x;
+ result->y = evas_info->dst_roi.y;
+ result->w = evas_info->dst_roi.w;
+ result->h = evas_info->dst_roi.h;
+
+ /* don't call evas_object_image_fill_set */
+ evas_object_move(evas_info->eo, result->x, result->y);
+ evas_object_resize(evas_info->eo, result->w, result->h);
+ break;
default:
LOGW("unsupported mode.");
break;
if (result.x || result.y)
LOGD("coordinate x, y (%d, %d) for locating video to center", result.x, result.y);
- evas_object_image_fill_set(evas_info->eo, result.x, result.y, result.w, result.h);
+ if (evas_info->display_geometry_method != DISP_GEO_METHOD_CUSTOM_ROI)
+ evas_object_image_fill_set(evas_info->eo, result.x, result.y, result.w, result.h);
return MM_ERROR_NONE;
} else
LOGW("there is no surf");
if (!ret) {
LOGW("fail to ecore_pipe_write() for updating visibility\n");
return MM_ERROR_UNKNOWN;
- }
+ } else
+ ret = MM_ERROR_NONE;
+
#if 0 /* FIXME: pause state only */
g_mutex_lock(&evas_info->idx_lock);
ret = ecore_pipe_write(evas_info->epipe, evas_info, UPDATE_TBM_SURF);
return MM_ERROR_NONE;
}
+int mm_evas_renderer_set_roi_area(MMHandleType handle, int x, int y, int w, int h)
+{
+ int ret = MM_ERROR_NONE;
+ mm_evas_info *evas_info = (mm_evas_info *)handle;
+
+ if (!evas_info) {
+ LOGW("skip it. it is not evas surface type or handle is not prepared");
+ return MM_ERROR_RESOURCE_NOT_INITIALIZED;
+ }
+ if (!w || !h) {
+ LOGW("invalid resolution");
+ return MM_ERROR_INVALID_ARGUMENT;
+ }
+
+ /* display mode is set to DISP_GEO_METHOD_CUSTOM_ROI internally */
+ evas_info->display_geometry_method = DISP_GEO_METHOD_CUSTOM_ROI;
+ evas_info->dst_roi.x = x;
+ evas_info->dst_roi.y = y;
+ evas_info->dst_roi.w = w;
+ evas_info->dst_roi.h = h;
+ ret = _mm_evas_renderer_apply_geometry(evas_info);
+
+ return ret;
+}
+
+int mm_evas_renderer_get_roi_area(MMHandleType handle, int *x, int *y, int *w, int *h)
+{
+ mm_evas_info *evas_info = (mm_evas_info *)handle;
+
+ if (!evas_info) {
+ LOGW("skip it. it is not evas surface type or handle is not prepared");
+ return MM_ERROR_RESOURCE_NOT_INITIALIZED;
+ }
+ if (evas_info->display_geometry_method != DISP_GEO_METHOD_CUSTOM_ROI) {
+ LOGW("invalid mode");
+ return MM_ERROR_INVALID_ARGUMENT;
+ }
+
+ *x = evas_info->dst_roi.x;
+ *y = evas_info->dst_roi.y;
+ *w = evas_info->dst_roi.w;
+ *h = evas_info->dst_roi.h;
+
+ return MM_ERROR_NONE;
+}
+
int mm_evas_renderer_set_flip(MMHandleType handle, int flip)
{
int ret = MM_ERROR_NONE;
switch(flip) {
case FLIP_NONE :
- evas_info->flip = 0;
+ evas_info->flip = EVAS_IMAGE_ORIENT_NONE;
break;
case FLIP_HORIZONTAL:
evas_info->flip = EVAS_IMAGE_FLIP_HORIZONTAL;
}
switch(evas_info->flip) {
- case 0:
+ case EVAS_IMAGE_ORIENT_NONE:
*flip = FLIP_NONE;
break;
case EVAS_IMAGE_FLIP_HORIZONTAL: