From e3a8aca93f8cecb956c98a88f68f1d7921dc1aa2 Mon Sep 17 00:00:00 2001 From: Jeongmo Yang Date: Tue, 21 Nov 2017 11:50:39 +0900 Subject: [PATCH] Remove rectangle setting for wayland overlay surface [Version] 0.10.145 [Profile] Common [Issue Type] Optimization [Dependency module] capi-media-camera, mmsvc-camera [Test] [M(T) - Boot=(OK), sdb=(OK), Home=(OK), Touch=(OK), Version=tizen-unified_20171122.1] Change-Id: I32b8e73900660071effe092202211891dc9c8bff Signed-off-by: Jeongmo Yang --- packaging/libmm-camcorder.spec | 2 +- src/include/mm_camcorder.h | 11 ----------- src/mm_camcorder_attribute.c | 13 ++++--------- src/mm_camcorder_gstcommon.c | 10 +++------- src/mm_camcorder_internal.c | 1 + 5 files changed, 9 insertions(+), 28 deletions(-) diff --git a/packaging/libmm-camcorder.spec b/packaging/libmm-camcorder.spec index a260abc..2d1a192 100644 --- a/packaging/libmm-camcorder.spec +++ b/packaging/libmm-camcorder.spec @@ -1,6 +1,6 @@ Name: libmm-camcorder Summary: Camera and recorder library -Version: 0.10.144 +Version: 0.10.145 Release: 0 Group: Multimedia/Libraries License: Apache-2.0 diff --git a/src/include/mm_camcorder.h b/src/include/mm_camcorder.h index 4ca0807..845a4fd 100644 --- a/src/include/mm_camcorder.h +++ b/src/include/mm_camcorder.h @@ -1843,17 +1843,6 @@ typedef struct _MMCamFaceDetectInfo { MMCamFaceInfo *face_info; /**< face information, this should be freed after use it. */ } MMCamFaceDetectInfo; -/** - * Wayland information - */ -typedef struct _MMCamWaylandInfo { - int global_surface_id; - int window_x; - int window_y; - int window_width; - int window_height; -} MMCamWaylandInfo; - /*======================================================================================= | TYPE DEFINITIONS | diff --git a/src/mm_camcorder_attribute.c b/src/mm_camcorder_attribute.c index 58c98af..c6a58c3 100644 --- a/src/mm_camcorder_attribute.c +++ b/src/mm_camcorder_attribute.c @@ -3724,19 +3724,14 @@ bool _mmcamcorder_commit_display_handle(MMHandleType handle, int attr_idx, const _mmcam_dbg_log("Commit : videosinkname[%s]", videosink_name); if (!strcmp(videosink_name, "xvimagesink") || !strcmp(videosink_name, "ximagesink")) { - _mmcam_dbg_log("Commit : Set XID[%x]", *(int*)(p_handle)); - gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY(sc->element[_MMCAMCORDER_VIDEOSINK_SINK].gst), *(int*)(p_handle)); + _mmcam_dbg_log("Commit : Set XID[%x]", *(int *)(p_handle)); + gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY(sc->element[_MMCAMCORDER_VIDEOSINK_SINK].gst), *(int *)(p_handle)); } else if (!strcmp(videosink_name, "evasimagesink") || !strcmp(videosink_name, "evaspixmapsink")) { _mmcam_dbg_log("Commit : Set evas object [%p]", p_handle); MMCAMCORDER_G_OBJECT_SET_POINTER(sc->element[_MMCAMCORDER_VIDEOSINK_SINK].gst, "evas-object", p_handle); } else if (!strcmp(videosink_name, "tizenwlsink")) { - MMCamWaylandInfo *wl_info = (MMCamWaylandInfo *)p_handle; - - _mmcam_dbg_log("wayland global surface id : %d", wl_info->global_surface_id); - - gst_video_overlay_set_wl_window_wl_surface_id(GST_VIDEO_OVERLAY(sc->element[_MMCAMCORDER_VIDEOSINK_SINK].gst), (guintptr)wl_info->global_surface_id); - gst_video_overlay_set_render_rectangle(GST_VIDEO_OVERLAY(sc->element[_MMCAMCORDER_VIDEOSINK_SINK].gst), - wl_info->window_x, wl_info->window_y, wl_info->window_width, wl_info->window_height); + _mmcam_dbg_log("wayland global surface id : %d", *(int *)(p_handle)); + gst_video_overlay_set_wl_window_wl_surface_id(GST_VIDEO_OVERLAY(sc->element[_MMCAMCORDER_VIDEOSINK_SINK].gst), (guintptr)*(int *)(p_handle)); } else { _mmcam_dbg_warn("Commit : Nothing to commit with this element[%s]", videosink_name); return FALSE; diff --git a/src/mm_camcorder_gstcommon.c b/src/mm_camcorder_gstcommon.c index 318d271..27ce41f 100644 --- a/src/mm_camcorder_gstcommon.c +++ b/src/mm_camcorder_gstcommon.c @@ -1405,13 +1405,9 @@ int _mmcamcorder_videosink_window_set(MMHandleType handle, type_element* Videosi return MM_ERROR_CAMCORDER_INVALID_ARGUMENT; } } else if (!strcmp(videosink_name, "tizenwlsink") || !strcmp(videosink_name, "directvideosink")) { - MMCamWaylandInfo *wl_info = (MMCamWaylandInfo *)overlay; - - if (wl_info) { - _mmcam_dbg_log("wayland global surface id : %d", wl_info->global_surface_id); - gst_video_overlay_set_wl_window_wl_surface_id(GST_VIDEO_OVERLAY(vsink), (guintptr)wl_info->global_surface_id); - gst_video_overlay_set_render_rectangle(GST_VIDEO_OVERLAY(vsink), - wl_info->window_x, wl_info->window_y, wl_info->window_width, wl_info->window_height); + if (overlay) { + _mmcam_dbg_log("wayland global surface id : %d", *(int *)(overlay)); + gst_video_overlay_set_wl_window_wl_surface_id(GST_VIDEO_OVERLAY(vsink), (guintptr)*(int *)(overlay)); } else { _mmcam_dbg_warn("Handle is NULL. skip setting."); } diff --git a/src/mm_camcorder_internal.c b/src/mm_camcorder_internal.c index 7e07548..fe6ca19 100644 --- a/src/mm_camcorder_internal.c +++ b/src/mm_camcorder_internal.c @@ -23,6 +23,7 @@ | INCLUDE FILES | ========================================================================================*/ #include +#include #include #include #include -- 2.7.4