Name: capi-media-codec
Summary: A Media Codec library in Tizen Native API
-Version: 0.5.5
-Release: 0
+Version: 0.6.27
+Release: 2
Group: Multimedia/API
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(mm-common)
BuildRequires: pkgconfig(capi-base-common)
-BuildRequires: pkgconfig(appcore-efl)
BuildRequires: pkgconfig(capi-media-tool)
-BuildRequires: pkgconfig(capi-media-camera)
BuildRequires: pkgconfig(libtbm)
BuildRequires: pkgconfig(gstreamer-1.0)
BuildRequires: pkgconfig(gstreamer-plugins-base-1.0)
BuildRequires: pkgconfig(gstreamer-app-1.0)
+BuildRequires: pkgconfig(gstreamer-pbutils-1.0)
+BuildRequires: pkgconfig(gstreamer-tag-1.0)
+BuildRequires: pkgconfig(gstreamer-allocators-1.0)
BuildRequires: pkgconfig(capi-system-info)
BuildRequires: pkgconfig(iniparser)
-BuildRequires: pkgconfig(capi-mediademuxer)
+%if "%{tizen_profile_name}" != "tv"
+BuildRequires: pkgconfig(mm-resource-manager)
+%endif
+#BuildRequires: pkgconfig(capi-media-camera)
+#BuildRequires: pkgconfig(capi-mediademuxer)
+#BuildRequires: pkgconfig(capi-mediamuxer)
+
%description
A Media Codec library in Tizen Native API
-%ifarch %{arm}
-# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
-# if mobile || "undefined"
-%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
-%package extension-TM1
-Summary: Extension for mobile TM1
-Requires: %{name} = %{version}-%{release}
-#!BuildIgnore: kernel-headers
-BuildConflicts: linux-glibc-devel
-BuildRequires: kernel-headers-3.10-sc7730
-
-%description extension-TM1
-A Media Codec library in Tizen Native API Extension for mobile TM1
-%endif
-%endif
+
%package devel
%description devel
-%prep
-%setup -q
-
+%if 0%{?gcov:1}
+%package gcov
+Summary: Line Coverage of Media Codec library in Tizen Native API
+Group: Development/Multimedia
-%build
-
-%if 0%{?sec_build_binary_debug_enable}
-export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
-export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
-export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
+%description gcov
+Collection of files related to Line Coverage. It is tested as gcov for a media codec library in Tizen native API
%endif
-%ifarch %{arm}
-export CFLAGS="$CFLAGS -DENABLE_FFMPEG_CODEC"
-%endif
-export CFLAGS="$CFLAGS -DSYSCONFDIR=\\\"%{_sysconfdir}\\\""
-export CFLAGS_DEFAULT="$CFLAGS"
-
-%ifarch %{arm}
-# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
-# if mobile || "undefined"
-%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
-# extension-TM1
-export CFLAGS="$CFLAGS_DEFAULT -DTIZEN_PROFILE_LITE"
-MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
-%cmake . -DCMAKE_INSTALL_PREFIX=/usr -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
+%prep
+%setup -q
-make %{?jobs:-j%jobs}
-mkdir -p tm1
+%build
-%make_install
-ls -al %{buildroot}%{_libdir}/libcapi-media-codec.so.*
-cp -a %{buildroot}%{_libdir}/libcapi-media-codec.so.* tm1/
+export CFLAGS="$CFLAGS -DSYSCONFDIR=\\\"%{_hal_sysconfdir}\\\""
-%endif
+%if 0%{?gcov:1}
+export CFLAGS+=" -fprofile-arcs -ftest-coverage"
+export CXXFLAGS+=" -fprofile-arcs -ftest-coverage"
+export LDFLAGS+=" -lgcov"
%endif
-# common
-export CFLAGS="$CFLAGS_DEFAULT"
MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
-%cmake . -DCMAKE_INSTALL_PREFIX=/usr -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
-
+%cmake . -DCMAKE_INSTALL_PREFIX=/usr -DFULLVER=%{version} -DMAJORVER=${MAJORVER} \
+%if "%{tizen_profile_name}" == "tv"
+ -DTIZEN_FEATURE_MM_RESOURCE_MANAGER=NO
+%else
+ -DTIZEN_FEATURE_MM_RESOURCE_MANAGER=YES
+%endif
make %{?jobs:-j%jobs}
+
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/usr/bin
%make_install
-
-%ifarch %{arm}
-# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
-# if mobile || "undefined"
-%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
-# extension-TM1
-pushd tm1
-for FILE in libcapi-media-codec.so.*; do mv "$FILE" "%{buildroot}%{_libdir}/$FILE.tm1"; done
-popd
-
-%post extension-TM1
-pushd %{_libdir}
-for FILE in libcapi-media-codec.so.*.tm1; do mv "$FILE" "${FILE%.tm1}"; done
-popd
-/sbin/ldconfig
-
-%preun extension-TM1
-case "$1" in
- 0)
- # This is an un-installation.
- pushd %{_libdir}
- for FILE in libcapi-media-codec.so.*; do mv "$FILE" "${FILE%.tm1}"; done
- popd
- /sbin/ldconfig
- ;;
- 1)
- # This is an upgrade.
- # Do nothing.
- :
- ;;
-esac
-
-%files extension-TM1
-%manifest capi-media-codec.manifest
-%{_libdir}/libcapi-media-codec.so.*.tm1
-%endif
+%if 0%{?gcov:1}
+builddir=$(basename $PWD)
+gcno_obj_dir=%{buildroot}%{_datadir}/gcov/obj/%{name}/"$builddir"
+mkdir -p "$gcno_obj_dir"
+find . -name '*.gcno' -not -regex ".*\(test\|internal\|bitstream\|port\|ini\|util\).*$" -exec cp --parents '{}' "$gcno_obj_dir" ';'
%endif
+
%post
/sbin/ldconfig
%files
%manifest capi-media-codec.manifest
%{_libdir}/libcapi-media-codec.so.*
-%ifarch %{arm}
-%exclude %{_libdir}/libcapi-media-codec.so.*.tm1
-%endif
+
%license LICENSE.APLv2
/usr/bin/*
#%{_bindir}/*
%{_libdir}/pkgconfig/*.pc
%{_libdir}/libcapi-media-codec.so
+%if 0%{?gcov:1}
+%files gcov
+%{_datadir}/gcov/obj/*
+%endif