return TRUE;
}
-
-static gboolean
-plugin_init (GstPlugin * plugin)
+void
+equalizer_element_init (GstPlugin * plugin)
{
- GST_DEBUG_CATEGORY_INIT (equalizer_debug, "equalizer", 0, "equalizer");
-
- if (!(gst_element_register (plugin, "equalizer-nbands", GST_RANK_NONE,
- GST_TYPE_IIR_EQUALIZER_NBANDS)))
- return FALSE;
-
- if (!(gst_element_register (plugin, "equalizer-3bands", GST_RANK_NONE,
- GST_TYPE_IIR_EQUALIZER_3BANDS)))
- return FALSE;
-
- if (!(gst_element_register (plugin, "equalizer-10bands", GST_RANK_NONE,
- GST_TYPE_IIR_EQUALIZER_10BANDS)))
- return FALSE;
-
- return TRUE;
+ static gsize res = FALSE;
+ if (g_once_init_enter (&res)) {
+ GST_DEBUG_CATEGORY_INIT (equalizer_debug, "equalizer", 0, "equalizer");
+ g_once_init_leave (&res, TRUE);
+ }
}
-
-GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
- GST_VERSION_MINOR,
- equalizer,
- "GStreamer audio equalizers",
- plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
#include <gst/audio/gstaudiofilter.h>
+void equalizer_element_init (GstPlugin * plugin);
+
+GST_ELEMENT_REGISTER_DECLARE (equalizer_nbands);
+GST_ELEMENT_REGISTER_DECLARE (equalizer_3bands);
+GST_ELEMENT_REGISTER_DECLARE (equalizer_10bands);
+
typedef struct _GstIirEqualizer GstIirEqualizer;
typedef struct _GstIirEqualizerClass GstIirEqualizerClass;
typedef struct _GstIirEqualizerBand GstIirEqualizerBand;
#define gst_iir_equalizer_10bands_parent_class parent_class
G_DEFINE_TYPE (GstIirEqualizer10Bands, gst_iir_equalizer_10bands,
GST_TYPE_IIR_EQUALIZER);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (equalizer_10bands, "equalizer-10bands",
+ GST_RANK_NONE, GST_TYPE_IIR_EQUALIZER_10BANDS,
+ equalizer_element_init (plugin));
/* equalizer implementation */
#define gst_iir_equalizer_3bands_parent_class parent_class
G_DEFINE_TYPE (GstIirEqualizer3Bands, gst_iir_equalizer_3bands,
GST_TYPE_IIR_EQUALIZER);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (equalizer_3bands, "equalizer-3bands",
+ GST_RANK_NONE, GST_TYPE_IIR_EQUALIZER_3BANDS,
+ equalizer_element_init (plugin));
/* equalizer implementation */
#define gst_iir_equalizer_nbands_parent_class parent_class
G_DEFINE_TYPE (GstIirEqualizerNBands, gst_iir_equalizer_nbands,
GST_TYPE_IIR_EQUALIZER);
-
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (equalizer_nbands, "equalizer-nbands",
+ GST_RANK_NONE, GST_TYPE_IIR_EQUALIZER_NBANDS,
+ equalizer_element_init (plugin));
/* equalizer implementation */
static void
--- /dev/null
+/* GStreamer
+ * Copyright (C) <2004> Benjamin Otte <otte@gnome.org>
+ * <2007> Stefan Kost <ensonic@users.sf.net>
+ * <2007> Sebastian Dröge <slomo@circular-chaos.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "gstiirequalizer.h"
+
+
+static gboolean
+plugin_init (GstPlugin * plugin)
+{
+ gboolean ret = FALSE;
+
+ ret |= GST_ELEMENT_REGISTER (equalizer_nbands, plugin);
+ ret |= GST_ELEMENT_REGISTER (equalizer_3bands, plugin);
+ ret |= GST_ELEMENT_REGISTER (equalizer_10bands, plugin);
+
+ return ret;
+}
+
+GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
+ GST_VERSION_MINOR,
+ equalizer,
+ "GStreamer audio equalizers",
+ plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
eq_sources = [
'gstiirequalizer.c',
+ 'gstiirequalizerplugin.c',
'gstiirequalizernbands.c',
'gstiirequalizer3bands.c',
'gstiirequalizer10bands.c',
+ 'gstiirequalizerplugin.c',
]
gstequalizer = library('gstequalizer',