- This is for Tizen 4.0.
: Tizen 4.0 Configurability and Build Blocks require
to remove all profile-depending build options in spec files.
(No More profile macros)
- It is recommended to distinguish features/profiles at runtime.
unless it incurs too much overhead, which requires you to
create multiple binaries and subpackages.
Change-Id: Iad4bd14dc3bdecdf1b5b9814969223aacc260402
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
AC_SUBST(DLOG_CFLAGS)
AC_SUBST(DLOG_LIBS)
+PKG_CHECK_MODULES(SYSTEMINFO, capi-system-info)
+AC_SUBST(SYSTEMINFO_CFLAGS)
+AC_SUBST(SYSTEMINFO_LIBS)
+
AC_ARG_ENABLE(sdk, AC_HELP_STRING([--enable-sdk], [sdk build]),
[
case "${enableval}" in
BuildRequires: pkgconfig(capi-media-tool)
BuildRequires: pkgconfig(murphy-resource)
BuildRequires: pkgconfig(murphy-glib)
+BuildRequires: pkgconfig(capi-system-info)
%description
Multimedia Framework Player Library files.
%if %{with x}
export CFLAGS+=" -DHAVE_X11"
%endif
-%if "%{?profile}" == "tv"
-export CFLAGS+=" -DTIZEN_TV"
-%endif
LDFLAGS+="-Wl,--rpath=%{_prefix}/lib -Wl,--hash-style=both -Wl,--as-needed"; export LDFLAGS
./autogen.sh
$(DLOG_CFLAGS) \
$(EVAS_CFLAGS) \
$(ECORE_CFLAGS) \
+ $(SYSTEMINFO_CFLAGS) \
-Werror -Wno-deprecated -Wno-deprecated-declarations -Wno-cpp
noinst_HEADERS = include/mm_player_utils.h \
$(DLOG_LIBS) \
$(UTILX_LIBS) \
$(EVAS_LIBS) \
- $(ECORE_LIBS)
+ $(ECORE_LIBS) \
+ $(SYSTEMINFO_LIBS)
if IS_SDK
if WAYLAND_SUPPORT
libmmfplayer_la_CFLAGS += $(GST_WAYLAND_CFLAGS)
libmmfplayer_la_LIBADD += $(GST_WAYLAND_LIBS)
-endif
\ No newline at end of file
+endif
#include "mm_player_utils.h"
#include "mm_player_tracks.h"
+#include <system_info.h>
+
/*===========================================================================================
| |
| LOCAL DEFINITIONS AND DECLARATIONS FOR MODULE |
gint count = 0;
gint gapless = 0;
guint num_of_list = 0;
+ static int profile_tv = -1;
MMPLAYER_FENTER();
mm_attrs_get_int_by_name(attrs, "content_video_found", &video);
-#ifdef TIZEN_TV
+ if (__builtin_expect(profile_tv == -1, 0)) {
+ char *profileName;
+ system_info_get_platform_string("http://tizen.org/feature/profile", &profileName);
+ switch (*profileName) {
+ case 't':
+ case 'T':
+ profile_tv = 1;
+ break;
+ default:
+ profile_tv = 0;
+ }
+ free(profileName);
+ }
/* gapless playback is not supported in case of video at TV profile. */
- if (video) {
+ if (profile_tv && video) {
LOGW("not support video gapless playback");
goto ERROR;
}
-#endif
if (mm_attrs_get_int_by_name(attrs, "pd_mode", &mode) == MM_ERROR_NONE) {
if (mode == TRUE) {