summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Roche <barock@frignu.net>2013-04-05 12:17:43 +0200
committerBaptiste DURAND <baptiste.durand@eurogiciel.fr>2013-04-30 17:56:01 +0200
commit2246b7fa0b78c4b803baccc4fee51417ab1bff5f (patch)
treeb77b1cfea7fa25f7192c49be75a847fc8637282a
parentefef5ddf386e4142798066c928132ca6c3a3c09c (diff)
downloadlibmm-radio-2246b7fa0b78c4b803baccc4fee51417ab1bff5f.tar.gz
libmm-radio-2246b7fa0b78c4b803baccc4fee51417ab1bff5f.tar.bz2
libmm-radio-2246b7fa0b78c4b803baccc4fee51417ab1bff5f.zip
Fix Gstreamer 1.0/0.10 compliance
- Check require Gstreamer version in specfile : set suitable CFlags - Add require version in configure.ac according to the chosen version of Gstreamer
-rwxr-xr-xconfigure.ac22
-rw-r--r--packaging/libmm-radio.spec15
-rw-r--r--src/include/mm_radio_priv.h2
3 files changed, 31 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index a659512..eeb81b2 100755
--- a/configure.ac
+++ b/configure.ac
@@ -42,13 +42,23 @@ PKG_CHECK_MODULES(MMTA, mm-ta)
AC_SUBST(MMTA_CFLAGS)
AC_SUBST(MMTA_LIBS)
-PKG_CHECK_MODULES(GST, gstreamer-0.10)
-AC_SUBST(GST_CFLAGS)
-AC_SUBST(GST_LIBS)
+if test "$use_gstreamer_1" = "1"; then
+ PKG_CHECK_MODULES(GST, gstreamer-1.0)
+ AC_SUBST(GST_CFLAGS)
+ AC_SUBST(GST_LIBS)
-PKG_CHECK_MODULES(GSTAPP, gstreamer-app-0.10)
-AC_SUBST(GSTAPP_CFLAGS)
-AC_SUBST(GSTAPP_LIBS)
+ PKG_CHECK_MODULES(GSTAPP, gstreamer-app-1.0)
+ AC_SUBST(GSTAPP_CFLAGS)
+ AC_SUBST(GSTAPP_LIBS)
+else
+ PKG_CHECK_MODULES(GST, gstreamer-0.10)
+ AC_SUBST(GST_CFLAGS)
+ AC_SUBST(GST_LIBS)
+
+ PKG_CHECK_MODULES(GSTAPP, gstreamer-app-0.10)
+ AC_SUBST(GSTAPP_CFLAGS)
+ AC_SUBST(GSTAPP_LIBS)
+fi
PKG_CHECK_MODULES(MMSESSION, mm-session)
AC_SUBST(MMSESSION_CFLAGS)
diff --git a/packaging/libmm-radio.spec b/packaging/libmm-radio.spec
index 03a0805..736c64f 100644
--- a/packaging/libmm-radio.spec
+++ b/packaging/libmm-radio.spec
@@ -11,8 +11,13 @@ BuildRequires: pkgconfig(mm-log)
BuildRequires: pkgconfig(mm-ta)
BuildRequires: pkgconfig(mm-session)
BuildRequires: pkgconfig(mm-sound)
+%if %{defined with_Gstreamer0.10}
BuildRequires: pkgconfig(gstreamer-0.10)
BuildRequires: pkgconfig(gstreamer-plugins-base-0.10)
+%else
+BuildRequires: pkgconfig(gstreamer-1.0)
+BuildRequires: pkgconfig(gstreamer-plugins-base-1.0)
+%endif
%description
Descirption: Multimedia Framework Radio Library
@@ -31,7 +36,15 @@ Description: Multimedia Framework Radio Library (DEV)
%build
./autogen.sh
-CFLAGS=" %{optflags} -DGST_EXT_TIME_ANALYSIS -DEXPORT_API=\"__attribute__((visibility(\\\"default\\\")))\" "; export CFLAGS;
+
+%if %{defined with_Gstreamer0.10}
+export GSTREAMER_API=""
+%else
+export GSTREAMER_API="-DGST_API_VERSION_1=1"
+export use_gstreamer_1=1
+%endif
+
+CFLAGS=" %{optflags} -DGST_EXT_TIME_ANALYSIS -DEXPORT_API=\"__attribute__((visibility(\\\"default\\\")))\" $GSTREAMER_API"; export CFLAGS;
%configure --disable-static --prefix=%{_prefix}
make %{?jobs:-j%jobs}
diff --git a/src/include/mm_radio_priv.h b/src/include/mm_radio_priv.h
index 04c14b8..419316e 100644
--- a/src/include/mm_radio_priv.h
+++ b/src/include/mm_radio_priv.h
@@ -221,7 +221,7 @@ int _mmradio_destroy_pipeline(mm_radio_t* radio);
#endif
int _mmradio_apply_region(mm_radio_t*radio, MMRadioRegionType region, bool update);
int _mmradio_get_region_type(mm_radio_t*radio, MMRadioRegionType *type);
-int _mmradio_get_region_frequency_range(mm_radio_t* radio, uint *min_freq, uint *max_freq);
+int _mmradio_get_region_frequency_range(mm_radio_t* radio, unsigned int *min_freq, unsigned int *max_freq);
#if 0
int mmradio_set_attrs(mm_radio_t* radio, MMRadioAttrsType type, MMHandleType attrs);
MMHandleType mmradio_get_attrs(mm_radio_t* radio, MMRadioAttrsType type);