mpg123: move from -bad to -ugly
authorTim-Philipp Müller <tim@centricular.com>
Tue, 16 Feb 2016 10:38:18 +0000 (10:38 +0000)
committerTim-Philipp Müller <tim@centricular.com>
Tue, 16 Feb 2016 10:59:25 +0000 (10:59 +0000)
Hook up to build system, add to docs

configure.ac
docs/plugins/gst-plugins-ugly-plugins-docs.sgml
docs/plugins/gst-plugins-ugly-plugins-sections.txt
docs/plugins/xml/plugin-mpg123.xml [new file with mode: 0644]
ext/Makefile.am
gst-plugins-ugly.spec.in
tests/check/Makefile.am

index a2f09b6..4fe2aa7 100644 (file)
@@ -342,6 +342,14 @@ AG_GST_CHECK_FEATURE(MPEG2DEC, [mpeg2dec], mpeg2dec, [
   AG_GST_PKG_CHECK_MODULES(MPEG2DEC, libmpeg2 >= 0.4.0)
 ])
 
+dnl *** mpg123 ***
+translit(dnm, m, l) AM_CONDITIONAL(USE_MPG123, true)
+AG_GST_CHECK_FEATURE(MPG123, [mpg123 audio decoder], mpg123, [
+  PKG_CHECK_MODULES(MPG123, libmpg123 >= 1.13, HAVE_MPG123="yes", HAVE_MPG123="no")
+  AC_SUBST(MPG123_CFLAGS)
+  AC_SUBST(MPG123_LIBS)
+])
+
 dnl *** sidplay : works with libsidplay 1.36.x (not 2.x.x) ***
 translit(dnm, m, l) AM_CONDITIONAL(USE_SIDPLAY, true)
 AG_GST_CHECK_FEATURE(SIDPLAY, [libsidplay], sid, [
@@ -378,6 +386,7 @@ AM_CONDITIONAL(USE_DVDREAD, false)
 AM_CONDITIONAL(USE_LAME, false)
 AM_CONDITIONAL(USE_MAD, false)
 AM_CONDITIONAL(USE_MPEG2DEC, false)
+AM_CONDITIONAL(USE_MPG123, false)
 AM_CONDITIONAL(USE_SIDPLAY, false)
 AM_CONDITIONAL(USE_TWOLAME, false)
 AM_CONDITIONAL(USE_X264, false)
@@ -462,6 +471,7 @@ ext/dvdread/Makefile
 ext/lame/Makefile
 ext/mad/Makefile
 ext/mpeg2dec/Makefile
+ext/mpg123/Makefile
 ext/sidplay/Makefile
 ext/twolame/Makefile
 ext/x264/Makefile
index 80ca473..6217c5a 100644 (file)
@@ -24,6 +24,7 @@
     <xi:include href="xml/element-cdiocddasrc.xml" />
     <xi:include href="xml/element-lamemp3enc.xml" />
     <xi:include href="xml/element-mad.xml" />
+    <xi:include href="xml/element-mpg123audiodec.xml" />
     <xi:include href="xml/element-rademux.xml" />
     <xi:include href="xml/element-rmdemux.xml" />
     <xi:include href="xml/element-rdtmanager.xml" />
@@ -48,6 +49,7 @@
     <xi:include href="xml/plugin-lame.xml" />
     <xi:include href="xml/plugin-mad.xml" />
     <xi:include href="xml/plugin-mpeg2dec.xml" />
+    <xi:include href="xml/plugin-mpg123.xml" />
     <xi:include href="xml/plugin-realmedia.xml" />
     <xi:include href="xml/plugin-siddec.xml" />
     <xi:include href="xml/plugin-twolame.xml" />
index 37c4c2c..fcd8d20 100644 (file)
@@ -107,6 +107,20 @@ gst_mad_get_type
 </SECTION>
 
 <SECTION>
+<FILE>element-mpg123audiodec</FILE>
+<TITLE>mpg123audiodec</TITLE>
+GstMpg123AudioDec
+<SUBSECTION Standard>
+GstMpg123AudioDecClass
+GST_MPG123_AUDIO_DEC
+GST_MPG123_AUDIO_DEC_CLASS
+GST_IS_MPG123_AUDIO_DEC
+GST_IS_MPG123_AUDIO_DEC_CLASS
+GST_TYPE_MPG123_AUDIO_DEC
+gst_mpg123_audio_dec_get_type
+</SECTION>
+
+<SECTION>
 <FILE>element-rademux</FILE>
 <TITLE>rademux</TITLE>
 GstRealAudioDemux
diff --git a/docs/plugins/xml/plugin-mpg123.xml b/docs/plugins/xml/plugin-mpg123.xml
new file mode 100644 (file)
index 0000000..b9c96dc
--- /dev/null
@@ -0,0 +1,34 @@
+<plugin>
+  <name>mpg123</name>
+  <description>mp3 decoding based on the mpg123 library</description>
+  <filename>../../ext/mpg123/.libs/libgstmpg123.so</filename>
+  <basename>libgstmpg123.so</basename>
+  <version>1.7.1</version>
+  <license>LGPL</license>
+  <source>gst-plugins-ugly</source>
+  <package>GStreamer Ugly Plug-ins source release</package>
+  <origin>Unknown package origin</origin>
+  <elements>
+    <element>
+      <name>mpg123audiodec</name>
+      <longname>mpg123 mp3 decoder</longname>
+      <class>Codec/Decoder/Audio</class>
+      <description>Decodes mp3 streams using the mpg123 library</description>
+      <author>Carlos Rafael Giani &lt;dv@pseudoterminal.org&gt;</author>
+      <pads>
+        <caps>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>always</presence>
+          <details>audio/mpeg, mpegversion=(int)1, layer=(int)[ 1, 3 ], rate=(int){ 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000 }, channels=(int)[ 1, 2 ], parsed=(boolean)true</details>
+        </caps>
+        <caps>
+          <name>src</name>
+          <direction>source</direction>
+          <presence>always</presence>
+          <details>audio/x-raw, format=(string){ S16LE, U16LE, S32LE, U32LE, S24LE, U24LE, F32LE }, rate=(int){ 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000 }, channels=(int)[ 1, 2 ], layout=(string)interleaved</details>
+        </caps>
+      </pads>
+    </element>
+  </elements>
+</plugin>
index e34480d..c600554 100644 (file)
@@ -46,6 +46,12 @@ else
 MPEG2DEC_DIR =
 endif
 
+if USE_MPG123
+MPG123_DIR=mpg123
+else
+MPG123_DIR=
+endif
+
 if USE_SIDPLAY
 SIDPLAY_DIR = sidplay
 else
@@ -73,6 +79,7 @@ SUBDIRS = \
        $(LAME_DIR) \
        $(MAD_DIR) \
        $(MPEG2DEC_DIR) \
+       $(MPG123_DIR) \
        $(SIDPLAY_DIR) \
        $(TWOLAME_DIR) \
        $(X264_DIR)
@@ -86,6 +93,7 @@ DIST_SUBDIRS = \
        lame \
        mad \
        mpeg2dec \
+       mpg123 \
        sidplay \
        twolame \
        x264
index 8d4727a..1d1a54a 100644 (file)
@@ -25,6 +25,7 @@ BuildRequires:  gcc-c++
 @USE_LAME_TRUE@BuildRequires:  lame-devel >= 3.89
 @USE_MAD_TRUE@BuildRequires:  libmad-devel >= 0.15.0
 @USE_MPEG2DEC_TRUE@BuildRequires:  mpeg2dec-devel >= 0.4.0
+@USE_MPG123_TRUE@BuildRequires:  mpg123-devel >= 1.13
 
 @USE_SIDPLAY_TRUE@Provides:       gstreamer-sid = %{version}-%{release}
 @USE_LAME_TRUE@Provides:      gstreamer-lame = %{version}-%{release}
@@ -105,6 +106,7 @@ rm -rf $RPM_BUILD_ROOT
 @USE_A52DEC_TRUE@%{_libdir}/gstreamer-%{majorminor}/libgsta52dec.so
 @USE_DVDREAD_TRUE@%{_libdir}/gstreamer-%{majorminor}/libgstdvdread.so
 @USE_MPEG2DEC_TRUE@%{_libdir}/gstreamer-%{majorminor}/libgstmpeg2dec.so
+@USE_MPG123_TRUE@%{_libdir}/gstreamer-%{majorminor}/libgstmpg123.so
 @USE_TWOLAME_TRUE@%{_libdir}/gstreamer-%{majorminor}/libgsttwolame.so
 %doc %{_datadir}/gtk-doc/html/gst-plugins-ugly-plugins-%{majorminor}/*
 @USE_X264_TRUE@%{_datadir}/gstreamer-%{majorminor}/presets/GstX264Enc.prs
index 98d1232..06be57a 100644 (file)
@@ -38,6 +38,12 @@ else
 MPEG2DEC =
 endif
 
+if USE_MPG123
+check_mpg123 = elements/mpg123audiodec
+else
+check_mpg123 =
+endif
+
 if USE_X264
 check_x264enc=elements/x264enc
 else
@@ -56,6 +62,7 @@ check_PROGRAMS = \
        $(AMRNB) \
        $(LAME) \
        $(MPEG2DEC) \
+       $(check_mpg123) \
        $(check_x264enc) \
        $(check_xingmux)
 
@@ -82,4 +89,9 @@ elements_amrnbenc_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstaudio-$(GST_API_VERSION)
 elements_cmmldec_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(AM_CFLAGS)
 elements_cmmlenc_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(AM_CFLAGS)
 
+elements_mpg123audiodec_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(AM_CFLAGS)
+elements_mpg123audiodec_LDADD = \
+       $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GST_LIBS) $(LDADD) \
+       -lgstaudio-@GST_API_VERSION@ -lgstfft-@GST_API_VERSION@ -lgstapp-@GST_API_VERSION@
+
 EXTRA_DIST = gst-plugins-ugly.supp