Remove rectangle setting for wayland overlay surface 71/160971/2 submit/tizen/20171129.023032
authorJeongmo Yang <jm80.yang@samsung.com>
Tue, 21 Nov 2017 02:50:39 +0000 (11:50 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Thu, 23 Nov 2017 06:51:41 +0000 (15:51 +0900)
[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 <jm80.yang@samsung.com>
packaging/libmm-camcorder.spec
src/include/mm_camcorder.h
src/mm_camcorder_attribute.c
src/mm_camcorder_gstcommon.c
src/mm_camcorder_internal.c

index a260abc..2d1a192 100644 (file)
@@ -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
index 4ca0807..845a4fd 100644 (file)
@@ -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                                                                     |
index 58c98af..c6a58c3 100644 (file)
@@ -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;
index 318d271..27ce41f 100644 (file)
@@ -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.");
                }
index 7e07548..fe6ca19 100644 (file)
@@ -23,6 +23,7 @@
 |  INCLUDE FILES                                                                       |
 ========================================================================================*/
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 #include <fcntl.h>
 #include <gst/gst.h>