audiofx: add stereo element which was moved from -bad to build
authorTim-Philipp Müller <tim@centricular.com>
Tue, 25 Dec 2018 13:51:38 +0000 (14:51 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Tue, 25 Dec 2018 15:10:49 +0000 (16:10 +0100)
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/457

docs/plugins/Makefile.am
docs/plugins/gst-plugins-good-plugins.args
docs/plugins/gst-plugins-good-plugins.hierarchy
docs/plugins/inspect/plugin-audiofx.xml
gst/audiofx/Makefile.am
gst/audiofx/audiofx.c
gst/audiofx/gststereo.c
gst/audiofx/meson.build

index 942a0bd..5257826 100644 (file)
@@ -99,6 +99,7 @@ EXTRA_HFILES = \
        $(top_srcdir)/gst/audiofx/audiowsinclimit.h \
        $(top_srcdir)/gst/audiofx/audiofirfilter.h \
        $(top_srcdir)/gst/audiofx/gstscaletempo.h \
+       $(top_srcdir)/gst/audiofx/gststereo.h \
        $(top_srcdir)/gst/audioparsers/gstaacparse.h \
        $(top_srcdir)/gst/audioparsers/gstac3parse.h \
        $(top_srcdir)/gst/audioparsers/gstamrparse.h \
index 0e2d011..1671229 100644 (file)
 <DEFAULT>0</DEFAULT>
 </ARG>
 
+<ARG>
+<NAME>GstStereo::active</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>active</NICK>
+<BLURB>active.</BLURB>
+<DEFAULT>TRUE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstStereo::stereo</NAME>
+<TYPE>gfloat</TYPE>
+<RANGE>[0,1]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>stereo</NICK>
+<BLURB>stereo.</BLURB>
+<DEFAULT>0.1</DEFAULT>
+</ARG>
index 1f947d4..f6e7d23 100644 (file)
@@ -118,6 +118,7 @@ GObject
               GstIirEqualizer3Bands
               GstIirEqualizerNBands
             GstSpectrum
+            GstStereo
           GstAudioPanorama
           GstBreakMyData
           GstCapsSetter
index 8662390..dbbe6c2 100644 (file)
         </caps>
       </pads>
     </element>
+    <element>
+      <name>stereo</name>
+      <longname>Stereo effect</longname>
+      <class>Filter/Effect/Audio</class>
+      <description>Muck with the stereo signal to enhance its &apos;stereo-ness&apos;</description>
+      <author>Erik Walthinsen &lt;omega@cse.ogi.edu&gt;</author>
+      <pads>
+        <caps>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>always</presence>
+          <details>audio/x-raw, format=(string)S16LE, rate=(int)[ 1, 2147483647 ], channels=(int)2</details>
+        </caps>
+        <caps>
+          <name>src</name>
+          <direction>source</direction>
+          <presence>always</presence>
+          <details>audio/x-raw, format=(string)S16LE, rate=(int)[ 1, 2147483647 ], channels=(int)2</details>
+        </caps>
+      </pads>
+    </element>
   </elements>
 </plugin>
\ No newline at end of file
index 13ee7d9..793b8de 100644 (file)
@@ -24,7 +24,8 @@ libgstaudiofx_la_SOURCES = audiofx.c\
        audiowsinclimit.c \
        audiofirfilter.c \
        audioecho.c \
-       gstscaletempo.c
+       gstscaletempo.c \
+       gststereo.c
 nodist_libgstaudiofx_la_SOURCES = $(ORC_NODIST_SOURCES)
 
 # flags used to compile this plugin
@@ -57,4 +58,5 @@ noinst_HEADERS = audiopanorama.h \
        audiofirfilter.h \
        audioecho.h \
        gstscaletempo.h \
+       gststereo.h \
        math_compat.h
index dbddabe..b44a622 100644 (file)
@@ -37,6 +37,7 @@
 #include "audiofirfilter.h"
 #include "audioecho.h"
 #include "gstscaletempo.h"
+#include "gststereo.h"
 
 /* entry point to initialize the plug-in
  * initialize the plug-in itself
@@ -71,7 +72,8 @@ plugin_init (GstPlugin * plugin)
       gst_element_register (plugin, "audioecho", GST_RANK_NONE,
           GST_TYPE_AUDIO_ECHO) &&
       gst_element_register (plugin, "scaletempo", GST_RANK_NONE,
-          GST_TYPE_SCALETEMPO));
+          GST_TYPE_SCALETEMPO) &&
+      gst_element_register (plugin, "stereo", GST_RANK_NONE, GST_TYPE_STEREO));
 }
 
 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
index 95ca352..1a1ef75 100644 (file)
@@ -199,16 +199,3 @@ gst_stereo_get_property (GObject * object, guint prop_id, GValue * value,
       break;
   }
 }
-
-static gboolean
-plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "stereo", GST_RANK_NONE,
-      GST_TYPE_STEREO);
-}
-
-GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
-    GST_VERSION_MINOR,
-    stereo,
-    "Muck with the stereo signal, enhance its 'stereo-ness'",
-    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
index 45f0536..b3460a6 100644 (file)
@@ -14,7 +14,8 @@ audiofx_sources = [
   'audiowsinclimit.c',
   'audiofirfilter.c',
   'audioecho.c',
-  'gstscaletempo.c'
+  'gstscaletempo.c',
+  'gststereo.c'
 ]
 
 orcsrc = 'audiopanoramaorc'