From 4b9e69121232b90cad488d8fe0e53abfcd4411f7 Mon Sep 17 00:00:00 2001 From: Hyunil Date: Mon, 10 Apr 2017 17:37:37 +0900 Subject: [PATCH] Remove wayland dependency and unused UI dependency Change-Id: I63ffe5c6d9111dcb967cd58a51ed5fea9dc9608a Signed-off-by: Hyunil --- LICENSE.APLv2 => LICENSE.Apache-2.0 | 0 configure.ac | 31 ----------------------------- packaging/libmm-player.spec | 8 ++------ src/Makefile.am | 9 --------- src/mm_player_attrs.c | 12 ++--------- src/mm_player_common_priv.c | 3 --- src/mm_player_priv.c | 21 +------------------ src/mm_player_sound_focus.c | 3 --- 8 files changed, 5 insertions(+), 82 deletions(-) rename LICENSE.APLv2 => LICENSE.Apache-2.0 (100%) diff --git a/LICENSE.APLv2 b/LICENSE.Apache-2.0 similarity index 100% rename from LICENSE.APLv2 rename to LICENSE.Apache-2.0 diff --git a/configure.ac b/configure.ac index a9d2d04..83334ce 100644 --- a/configure.ac +++ b/configure.ac @@ -61,21 +61,6 @@ PKG_CHECK_MODULES(GST_PLUGIN_BASE, gstreamer-plugins-base-1.0 >= 1.2.0) AC_SUBST(GST_PLUGIN_BASE_CFLAGS) AC_SUBST(GST_PLUGIN_BASE_LIBS) -AC_ARG_ENABLE(wayland, AC_HELP_STRING([--enable-wayland], [enable wayland]), -[ - case "${enableval}" in - yes) WAYLAND_SUPPORT=yes ;; - no) WAYLAND_SUPPORT=no ;; - *) AC_MSG_ERROR(bad value ${enableval} for --enable-wayland) ;; - esac - ],[WAYLAND_SUPPORT=no]) -if test "x$WAYLAND_SUPPORT" = "xyes"; then -PKG_CHECK_MODULES(GST_WAYLAND, gstreamer-wayland-1.0 >= 1.2.0) -AC_SUBST(GST_WAYLAND_CFLAGS) -AC_SUBST(GST_WAYLAND_LIBS) -fi -AM_CONDITIONAL([WAYLAND_SUPPORT], [test "x$WAYLAND_SUPPORT" = "xyes"]) - PKG_CHECK_MODULES(GST_VIDEO, gstreamer-video-1.0 >= 1.2.0) AC_SUBST(GST_VIDEO_CFLAGS) AC_SUBST(GST_VIDEO_LIBS) @@ -92,31 +77,15 @@ PKG_CHECK_MODULES(TZPLATFORM_CONFIG, libtzplatform-config) AC_SUBST(TZPLATFORM_CONFIG_CFLAGS) AC_SUBST(TZPLATFORM_CONFIG_LIBS) -PKG_CHECK_MODULES(APPFWK, appcore-efl) -AC_SUBST(APPFWK_CFLAGS) -AC_SUBST(APPFWK_LIBS) - -PKG_CHECK_MODULES(ELEMENTARY, elementary) -AC_SUBST(ELEMENTARY_CFLAGS) -AC_SUBST(ELEMENTARY_LIBS) - # for testsuite PKG_CHECK_MODULES(MMUTIL, mmutil-imgp) AC_SUBST(MMUTIL_CFLAGS) AC_SUBST(MMUTIL_LIBS) -PKG_CHECK_MODULES(ECORE, ecore) -AC_SUBST(ECORE_CFLAGS) -AC_SUBST(ECORE_LIBS) - PKG_CHECK_MODULES(INIPARSER, iniparser) AC_SUBST(INIPARSER_CFLAGS) AC_SUBST(INIPARSER_LIBS) -PKG_CHECK_MODULES(VCONF, vconf) -AC_SUBST(VCONF_CFLAGS) -AC_SUBST(VCONF_LIBS) - PKG_CHECK_MODULES(ICU, icu-i18n) AC_SUBST(ICU_CFLAGS) AC_SUBST(ICU_LIBS) diff --git a/packaging/libmm-player.spec b/packaging/libmm-player.spec index 0f3b4c1..9de4ac5 100644 --- a/packaging/libmm-player.spec +++ b/packaging/libmm-player.spec @@ -1,6 +1,6 @@ Name: libmm-player Summary: Multimedia Framework Player Library -Version: 0.6.41 +Version: 0.6.42 Release: 0 Group: Multimedia/Libraries License: Apache-2.0 @@ -14,14 +14,10 @@ BuildRequires: pkgconfig(mm-common) BuildRequires: pkgconfig(mm-sound) BuildRequires: pkgconfig(gstreamer-1.0) BuildRequires: pkgconfig(gstreamer-plugins-base-1.0) -BuildRequires: pkgconfig(gstreamer-wayland-1.0) BuildRequires: pkgconfig(gstreamer-video-1.0) BuildRequires: pkgconfig(gstreamer-app-1.0) -BuildRequires: pkgconfig(appcore-efl) -BuildRequires: pkgconfig(elementary) BuildRequires: pkgconfig(mmutil-imgp) BuildRequires: pkgconfig(iniparser) -BuildRequires: pkgconfig(vconf) BuildRequires: pkgconfig(icu-i18n) BuildRequires: pkgconfig(capi-media-tool) BuildRequires: pkgconfig(murphy-resource) @@ -71,7 +67,7 @@ make %{?jobs:-j%jobs} %files %manifest %{name}.manifest -%license LICENSE.APLv2 +%license LICENSE.Apache-2.0 %defattr(-,root,root,-) %{_libdir}/*.so.* diff --git a/src/Makefile.am b/src/Makefile.am index 84e3c1f..ee184fe 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -31,12 +31,10 @@ libmmfplayer_la_CFLAGS = -I$(srcdir)/include \ $(MMSOUND_CFLAGS) \ $(MRP_RESOURCE_CFLAGS) \ $(MRP_GLIB_CFLAGS) \ - $(VCONF_CFLAGS) \ $(ICU_CFLAGS) \ $(UTILX_CFLAGS) \ $(MEDIAPACKET_CFLAGS) \ $(DLOG_CFLAGS) \ - $(ECORE_CFLAGS) \ $(SYSTEMINFO_CFLAGS) \ $(STORAGE_CFLAGS) \ $(TZPLATFORM_CONFIG_CFLAGS) \ @@ -64,12 +62,10 @@ libmmfplayer_la_LIBADD = $(GST_LIBS) \ $(MMSOUND_LIBS) \ $(MRP_RESOURCE_LIBS) \ $(MRP_GLIB_LIBS) \ - $(VCONF_LIBS) \ $(ICU_LIBS) \ $(MEDIAPACKET_LIBS) \ $(DLOG_LIBS) \ $(UTILX_LIBS) \ - $(ECORE_LIBS) \ $(SYSTEMINFO_LIBS) $(STORAGE_LIBS) \ $(TZPLATFORM_CONFIG_LIBS) @@ -78,8 +74,3 @@ libmmfplayer_la_LIBADD = $(GST_LIBS) \ if IS_SDK libmmfplayer_la_CFLAGS += -DIS_SDK endif - -if WAYLAND_SUPPORT -libmmfplayer_la_CFLAGS += $(GST_WAYLAND_CFLAGS) -libmmfplayer_la_LIBADD += $(GST_WAYLAND_LIBS) -endif diff --git a/src/mm_player_attrs.c b/src/mm_player_attrs.c index 5a22ceb..91dd447 100644 --- a/src/mm_player_attrs.c +++ b/src/mm_player_attrs.c @@ -185,12 +185,13 @@ __mmplayer_apply_attribute(MMHandleType handle, const char *attribute_name) if (g_strrstr(attribute_name, "display") || g_strrstr(attribute_name, "wl_window_render_x")) { char *param_name = NULL; int str_len = strlen(attribute_name); - param_name = g_malloc0(str_len); + param_name = g_malloc0(str_len + 1); if (!param_name) { LOGE("failed to alloc param_name"); return MM_ERROR_PLAYER_INTERNAL; } strncpy(param_name, attribute_name, str_len); + param_name[str_len] = '\0'; LOGD(" param_name: %s", param_name); if (MM_ERROR_NONE != _mmplayer_update_video_param(player, param_name)) { g_free(param_name); @@ -772,15 +773,6 @@ _mmplayer_construct_attribute(MMHandleType handle) 0, MMPLAYER_MAX_INT }, - { - "use_wl_surface", - MM_ATTRS_TYPE_INT, - MM_ATTRS_FLAG_RW, - (void *) FALSE, - MM_ATTRS_VALID_TYPE_INT_RANGE, - FALSE, - TRUE - }, { "display_overlay_user_data", MM_ATTRS_TYPE_DATA, diff --git a/src/mm_player_common_priv.c b/src/mm_player_common_priv.c index a871bff..26f83cf 100644 --- a/src/mm_player_common_priv.c +++ b/src/mm_player_common_priv.c @@ -25,9 +25,6 @@ | INCLUDE FILES | | | ========================================================================================== */ -#include -#include - #include #include #include diff --git a/src/mm_player_priv.c b/src/mm_player_priv.c index 56943d6..7c7ba50 100644 --- a/src/mm_player_priv.c +++ b/src/mm_player_priv.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include @@ -3999,10 +3998,6 @@ __mmplayer_video_param_set_display_overlay(mm_player_t* player) { MMHandleType attrs = 0; void *handle = NULL; - /*use wl_surface*/ - gboolean use_wl_surface = 0; - void * wl_display = NULL; - GstContext *context = NULL; /* check video sinkbin is created */ if (MM_ERROR_NONE != __mmplayer_video_param_check_video_sink_bin(player)) @@ -4013,9 +4008,8 @@ __mmplayer_video_param_set_display_overlay(mm_player_t* player) /* common case if using overlay surface */ mm_attrs_get_data_by_name(attrs, "display_overlay", &handle); - mm_attrs_get_int_by_name(attrs, "use_wl_surface", &use_wl_surface); - if (handle && !use_wl_surface) { + if (handle) { /* default is using wl_surface_id */ unsigned int wl_surface_id = 0; wl_surface_id = *(int*)handle; @@ -4023,19 +4017,6 @@ __mmplayer_video_param_set_display_overlay(mm_player_t* player) gst_video_overlay_set_wl_window_wl_surface_id( GST_VIDEO_OVERLAY(player->pipeline->videobin[MMPLAYER_V_SINK].gst), *(int*)handle); - } else if (handle && use_wl_surface) { - /* use wl_surface for legacy_player_test */ - mm_attrs_get_data_by_name(attrs, "wl_display", &wl_display); - if (wl_display) - context = gst_wayland_display_handle_context_new(wl_display); - if (context) - gst_element_set_context(GST_ELEMENT(player->pipeline->videobin[MMPLAYER_V_SINK].gst), context); - - guintptr wl_surface = (guintptr)handle; - LOGD("[use wl_surface for legacy_player_test] set video param : wayland surface %p", handle); - gst_video_overlay_set_window_handle( - GST_VIDEO_OVERLAY(player->pipeline->videobin[MMPLAYER_V_SINK].gst), - wl_surface); } else /* FIXIT : is it error case? */ LOGW("still we don't have a window handle on player attribute. create it's own surface."); diff --git a/src/mm_player_sound_focus.c b/src/mm_player_sound_focus.c index 5088a76..e7a932c 100644 --- a/src/mm_player_sound_focus.c +++ b/src/mm_player_sound_focus.c @@ -23,9 +23,6 @@ #include #include #include -#include -#include - #include "mm_player_utils.h" #include "mm_player_priv.h" #include "mm_player_sound_focus.h" -- 2.34.1