[0.3.86] Use ecore-wl2 instead of ecore-wayland 70/169370/2 accepted/tizen/unified/20180328.005939 submit/tizen/20180319.053649
authorHyunil <hyunil46.park@samsung.com>
Tue, 6 Feb 2018 07:46:26 +0000 (16:46 +0900)
committerHyunil <hyunil46.park@samsung.com>
Mon, 19 Mar 2018 03:40:15 +0000 (12:40 +0900)
Change-Id: Ie4d795ca9f2f8045c2099ec18efb0884091441e9
Signed-off-by: Hyunil <hyunil46.park@samsung.com>
disp/CMakeLists.txt
disp/player_display.c
packaging/capi-media-player.spec
src/player_internal.c
test/CMakeLists.txt

index 3e1fbec..cd39166 100644 (file)
@@ -4,9 +4,9 @@ SET(INC_DIR ./)
 INCLUDE_DIRECTORIES(INC_DIR)
 
 IF (TIZEN_FEATURE_EVAS_RENDERER)
-SET(dependents "dlog glib-2.0 libtbm capi-media-tool capi-base-common muse-client mm-common tizen-extension-client evas ecore elementary mm-evas-renderer storage capi-system-info")
+SET(dependents "dlog glib-2.0 libtbm capi-media-tool capi-base-common muse-client mm-common tizen-extension-client evas ecore-wl2 ecore-evas mm-evas-renderer storage capi-system-info")
 ELSE (TIZEN_FEATURE_EVAS_RENDERER)
-SET(dependents "dlog glib-2.0 libtbm capi-media-tool capi-base-common muse-client mm-common tizen-extension-client evas ecore elementary storage capi-system-info")
+SET(dependents "dlog glib-2.0 libtbm capi-media-tool capi-base-common muse-client mm-common tizen-extension-client evas ecore-wl2 ecore-evas storage capi-system-info")
 ENDIF (TIZEN_FEATURE_EVAS_RENDERER)
 
 INCLUDE(FindPkgConfig)
index 5fdbc8c..fc1ea6c 100644 (file)
 #include <mm_types.h>
 #include <mm_debug.h>
 #include <media_packet.h>
-#include <Elementary.h>
 #include <Evas.h>
 #include <Ecore_Evas.h>
-#include <Ecore_Wayland.h>
+#include <Ecore_Wl2.h>
 #include <tizen-extension-client-protocol.h>
 #include "player_display.h"
 #ifdef TIZEN_FEATURE_EVAS_RENDERER
@@ -66,7 +65,9 @@ unsigned int disp_set_wl_display(int wl_win_type, void *win)
        const char *object_type = NULL;
        struct wl_surface *wl_surface;
        struct wl_display *wl_display;
-       Ecore_Wl_Window *wl_window = NULL;
+       Ecore_Wl2_Window *wl_window = NULL;
+       Ecore_Evas *ee = NULL;
+       Ecore_Wl2_Display *e_wl2_display = NULL;
        unsigned int wl_surface_id = 0;
        Evas *e;
        wl_client *wlclient;
@@ -83,14 +84,17 @@ unsigned int disp_set_wl_display(int wl_win_type, void *win)
                        e = evas_object_evas_get(obj);
                        return_val_if_fail(e != NULL, FALSE);
 
-                       wl_window = elm_win_wl_window_get(obj);
+                       ee = ecore_evas_ecore_evas_get(e);
+                       return_val_if_fail(ee != NULL, FALSE);
+
+                       wl_window = ecore_evas_wayland2_window_get(ee);
                        return_val_if_fail(wl_window != NULL, FALSE);
                        LOGI("ELM Wayland overlay surface type");
 
                } else return FALSE;
        } else if (wl_win_type == ECORE_WAYLAND_WIN) {
                /* ecore win */
-               wl_window = (Ecore_Wl_Window *) win;
+               wl_window = (Ecore_Wl2_Window *) win;
                LOGD("Ecore Wayland Window handle(%p)", wl_window);
                LOGI("ECORE Wayland overlay surface type");
        } else return FALSE;
@@ -98,14 +102,16 @@ unsigned int disp_set_wl_display(int wl_win_type, void *win)
 
        /* Need to let wayland-server know that video is rendered in this wl_window
         so that wayland-server sets alpha in this wl_window */
-       ecore_wl_window_video_has(wl_window, EINA_TRUE);
+       ecore_wl2_window_video_has(wl_window, EINA_TRUE);
 
        /* get wl_surface */
-       wl_surface = (struct wl_surface *)ecore_wl_window_surface_get(wl_window);
+       wl_surface = (struct wl_surface *)ecore_wl2_window_surface_get(wl_window);
        return_val_if_fail(wl_surface != NULL, FALSE);
 
        /* get wl_display */
-       wl_display = (struct wl_display *)ecore_wl_display_get();
+       e_wl2_display = ecore_wl2_connected_display_get(NULL);
+       return_val_if_fail(e_wl2_display != NULL, FALSE);
+       wl_display = (struct wl_display *)ecore_wl2_display_get(e_wl2_display);
        return_val_if_fail(wl_display != NULL, FALSE);
        LOGD("surface = %p, wl_display = %p", wl_surface, wl_display);
 
index 4a78547..1b1372a 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-player
 Summary:    A Media Player API
-Version:    0.3.85
+Version:    0.3.86
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
@@ -18,7 +18,8 @@ BuildRequires:  pkgconfig(appcore-efl)
 BuildRequires:  pkgconfig(elementary)
 BuildRequires:  pkgconfig(ecore)
 BuildRequires:  pkgconfig(evas)
-BuildRequires:  pkgconfig(ecore-wayland)
+BuildRequires:  pkgconfig(ecore-evas)
+BuildRequires:  pkgconfig(ecore-wl2)
 BuildRequires:  pkgconfig(capi-media-tool)
 BuildRequires:  pkgconfig(mmsvc-player)
 BuildRequires:  pkgconfig(libtbm)
@@ -71,7 +72,7 @@ export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
 %endif
-export CFLAGS+=" -DPATH_LIBDIR=\\\"%{_libdir}\\\""
+export CFLAGS+=" -DEFL_BETA_API_SUPPORT -DPATH_LIBDIR=\\\"%{_libdir}\\\""
 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
 %cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER} \
 %if "%{TIZEN_PRODUCT_TV}" == "1"
index bcc34aa..9c182ba 100644 (file)
@@ -180,7 +180,7 @@ int player_set_media_stream_dynamic_resolution(player_h player, bool drc)
        return ret;
 }
 
-int player_set_ecore_wl_display(player_h player, player_display_type_e type, void *ecore_wl_window, int x, int y, int width, int height)
+int player_set_ecore_wl_display(player_h player, player_display_type_e type, void *ecore_wl2_window, int x, int y, int width, int height)
 {
        PLAYER_INSTANCE_CHECK(player);
        int ret = PLAYER_ERROR_NONE;
@@ -204,11 +204,11 @@ int player_set_ecore_wl_display(player_h player, player_display_type_e type, voi
                LOGE("Display type(%d) is not overlay", conv_type);
                return PLAYER_ERROR_INVALID_PARAMETER;
        }
-       if (!ecore_wl_window)
+       if (!ecore_wl2_window)
                return PLAYER_ERROR_INVALID_PARAMETER;
 
        PLAYER_DISP_DLSYM(pc->dl_handle, p_disp_set_wl_display, "disp_set_wl_display");
-       wl_surface_id = p_disp_set_wl_display(ECORE_WAYLAND_WIN, ecore_wl_window);
+       wl_surface_id = p_disp_set_wl_display(ECORE_WAYLAND_WIN, ecore_wl2_window);
        if (wl_surface_id > 0) {
                wl_win.wl_surface_id = wl_surface_id;
                wl_win.type = conv_type;
index 674431a..1e9ed01 100644 (file)
@@ -10,7 +10,7 @@ ENDIF (TIZEN_WEARABLE)
 INCLUDE_DIRECTORIES(event-handler/include)
 link_directories(${CMAKE_SOURCE_DIR}/../)
 
-SET(WIN_PKG "${WIN_PKG} ecore-wayland")
+SET(WIN_PKG "${WIN_PKG} ecore-wl2")
 
 INCLUDE(FindPkgConfig)
 pkg_check_modules(${fw_test} REQUIRED libudev libinput capi-system-info appcore-efl elementary ecore evas capi-media-sound-manager ${WIN_PKG})