Apply ecore-wl2 instead of ecore-wayland 76/169376/3 accepted/tizen/unified/20180328.010120 submit/tizen/20180319.053649
authorHyunil <hyunil46.park@samsung.com>
Tue, 6 Feb 2018 08:00:40 +0000 (17:00 +0900)
committerHyunil Park <hyunil46.park@samsung.com>
Thu, 15 Mar 2018 00:45:37 +0000 (00:45 +0000)
Change-Id: I1f3545e93acf6e9001d8b1764eaa9a0029f00212
Signed-off-by: Hyunil <hyunil46.park@samsung.com>
CMakeLists.txt
packaging/capi-media-streamer.spec
src/media_streamer_node.c

index 3867ff6..658ab0d 100644 (file)
@@ -10,8 +10,8 @@ SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 SET(INC_DIR include)
 INCLUDE_DIRECTORIES(${INC_DIR})
 
-SET(dependents "dlog glib-2.0 mm-common capi-media-tool iniparser bundle libtbm gstreamer-1.0 gstreamer-plugins-base-1.0 gstreamer-app-1.0 gstreamer-video-1.0 cynara-client capi-system-info ecore elementary mm-resource-manager dpm capi-content-mime-type libsoup-2.4")
-SET(pc_dependents "capi-base-common capi-media-tool gstreamer-1.0 gstreamer-plugins-base-1.0 gstreamer-app-1.0 gstreamer-video-1.0 cynara-client capi-system-info ecore evas elementary mm-resource-manager dpm capi-system-info capi-content-mime-type libsoup-2.4")
+SET(dependents "dlog glib-2.0 mm-common capi-media-tool iniparser bundle libtbm gstreamer-1.0 gstreamer-plugins-base-1.0 gstreamer-app-1.0 gstreamer-video-1.0 cynara-client capi-system-info ecore-evas evas ecore-wl2 mm-resource-manager dpm capi-content-mime-type libsoup-2.4")
+SET(pc_dependents "capi-base-common capi-media-tool bundle")
 
 INCLUDE(FindPkgConfig)
 pkg_check_modules(${fw_name} REQUIRED ${dependents})
index c5e2b77..9006e8c 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-streamer
 Summary:    A Media Streamer API
-Version:    0.1.21
+Version:    0.1.22
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
@@ -22,12 +22,12 @@ BuildRequires:  pkgconfig(iniparser)
 BuildRequires:  pkgconfig(bundle)
 BuildRequires:  pkgconfig(cynara-client)
 BuildRequires:  pkgconfig(capi-system-info)
-#BuildRequires:  pkgconfig(libtbm)
 BuildRequires:  pkgconfig(tizen-extension-client)
 BuildRequires:  pkgconfig(elementary)
 BuildRequires:  pkgconfig(ecore)
 BuildRequires:  pkgconfig(evas)
-BuildRequires:  pkgconfig(ecore-wayland)
+BuildRequires:  pkgconfig(ecore-wl2)
+BuildRequires:  pkgconfig(ecore-evas)
 BuildRequires:  pkgconfig(appcore-efl)
 BuildRequires:  pkgconfig(mm-resource-manager)
 BuildRequires:  pkgconfig(dpm)
@@ -52,7 +52,7 @@ cp %{SOURCE1001} .
 %define ini_path %{_sysconfdir}/multimedia/mmfw_media_streamer.ini
 
 %build
-flags="-DMEDIA_STREAMER_INI_PATH=\\\"%{ini_path}\\\" -D_FILE_OFFSET_BITS=64"
+flags="-DMEDIA_STREAMER_INI_PATH=\\\"%{ini_path}\\\" -D_FILE_OFFSET_BITS=64 -DEFL_BETA_API_SUPPORT"
 
 %if 0%{?sec_build_binary_debug_enable}
 flags="$flags -DTIZEN_DEBUG_ENABLE"
index 1723c00..409e33e 100644 (file)
@@ -21,9 +21,9 @@
 #include <media_streamer_gst.h>
 #include <cynara-client.h>
 #include <system_info.h>
-#include <Elementary.h>
 #include <Evas.h>
-#include <Ecore_Wayland.h>
+#include <Ecore_Evas.h>
+#include <Ecore_Wl2.h>
 #include <tizen-extension-client-protocol.h>
 #include <gst/video/videooverlay.h>
 
@@ -1538,7 +1538,10 @@ static const struct tizen_resource_listener _media_streamer_tz_resource_listener
 int _media_streamer_get_wl_info(Evas_Object *obj, media_streamer_wl_info_s *wl_info)
 {
        int ret = MEDIA_STREAMER_ERROR_NONE;
-       Ecore_Wl_Window *window = NULL;
+       Ecore_Wl2_Window *window = NULL;
+       Ecore_Evas *ee = NULL;
+       Ecore_Wl2_Display *e_wl2_display = NULL;
+       Evas *e = NULL;
        struct wl_display *display = NULL;
        struct wl_display *display_wrapper = NULL;
        struct wl_surface *surface = NULL;
@@ -1552,30 +1555,51 @@ int _media_streamer_get_wl_info(Evas_Object *obj, media_streamer_wl_info_s *wl_i
                return MEDIA_STREAMER_ERROR_INVALID_OPERATION;
        }
 
-       window = elm_win_wl_window_get(obj);
+       e = evas_object_evas_get(obj);
+       if (!e) {
+               LOGE("failed to get evas object");
+               ret = MEDIA_STREAMER_ERROR_INVALID_OPERATION;
+               goto _DONE;
+       }
+
+       ee = ecore_evas_ecore_evas_get(e);
+       if (!ee) {
+               LOGE("failed to get ecore evas object");
+               ret = MEDIA_STREAMER_ERROR_INVALID_OPERATION;
+               goto _DONE;
+       }
+
+       window = ecore_evas_wayland2_window_get(ee);
        if (!window) {
                LOGE("failed to get wayland window");
                ret = MEDIA_STREAMER_ERROR_INVALID_OPERATION;
                goto _DONE;
        }
 
-       surface = (struct wl_surface *)ecore_wl_window_surface_get(window);
+       /* set video_has flag to a video application window */
+       ecore_wl2_window_video_has(window, EINA_TRUE);
+
+       surface = (struct wl_surface *)ecore_wl2_window_surface_get(window);
        if (!surface) {
                LOGE("failed to get wayland surface");
                ret = MEDIA_STREAMER_ERROR_INVALID_OPERATION;
                goto _DONE;
        }
 
-       display = (struct wl_display *)ecore_wl_display_get();
+       e_wl2_display = ecore_wl2_connected_display_get(NULL);
+       if (!e_wl2_display) {
+               LOGE("failed to get ecore wl2 display");
+               ret = MEDIA_STREAMER_ERROR_INVALID_OPERATION;
+               goto _DONE;
+       }
+
+       display = (struct wl_display *)ecore_wl2_display_get(e_wl2_display);
        if (!display) {
                LOGE("failed to get wayland display");
                ret = MEDIA_STREAMER_ERROR_INVALID_OPERATION;
                goto _DONE;
        }
 
-       /* set video_has flag to a video application window */
-       ecore_wl_window_video_has(window, EINA_TRUE);
-
        display_wrapper = wl_proxy_create_wrapper(display);
        if (!display_wrapper) {
                LOGE("failed to create wl display wrapper");