summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorIain Holmes <iain@prettypeople.org>2003-11-01 14:04:20 +0000
committerIain Holmes <iain@prettypeople.org>2003-11-01 14:04:20 +0000
commit6d5504f6497bac3dfd697b0482b937153fd083ed (patch)
treef826eee69b4da10ed8bb1b62fb3a5b9a91445ac8 /ext
parentc9b2638183671e6446bf0a8a24033327e4662b11 (diff)
downloadgst-plugins-bad-6d5504f6497bac3dfd697b0482b937153fd083ed.tar.gz
gst-plugins-bad-6d5504f6497bac3dfd697b0482b937153fd083ed.tar.bz2
gst-plugins-bad-6d5504f6497bac3dfd697b0482b937153fd083ed.zip
Update all the audiofile stuff
Original commit message from CVS: Update all the audiofile stuff
Diffstat (limited to 'ext')
-rw-r--r--ext/audiofile/gstaf.c23
-rw-r--r--ext/audiofile/gstafparse.c37
-rw-r--r--ext/audiofile/gstafparse.h2
-rw-r--r--ext/audiofile/gstafsink.c29
-rw-r--r--ext/audiofile/gstafsink.h2
-rw-r--r--ext/audiofile/gstafsrc.c31
-rw-r--r--ext/audiofile/gstafsrc.h2
-rw-r--r--ext/audiofile/gstaftypes.c9
8 files changed, 72 insertions, 63 deletions
diff --git a/ext/audiofile/gstaf.c b/ext/audiofile/gstaf.c
index c3eb2bcf..691788ea 100644
--- a/ext/audiofile/gstaf.c
+++ b/ext/audiofile/gstaf.c
@@ -22,25 +22,30 @@
#include "gstafsink.h"
#include "gstafparse.h"
-gboolean gst_aftypes_plugin_init (GModule *module, GstPlugin *plugin);
+gboolean gst_aftypes_plugin_init (GstPlugin *plugin);
static gboolean
-plugin_init (GModule *module, GstPlugin *plugin)
+plugin_init (GstPlugin *plugin)
{
if (!gst_library_load ("gstbytestream"))
return FALSE;
- gst_afsink_plugin_init (module, plugin);
- gst_afsrc_plugin_init (module, plugin);
- gst_afparse_plugin_init (module, plugin);
- gst_aftypes_plugin_init (module, plugin);
+ gst_afsink_plugin_init (plugin);
+ gst_afsrc_plugin_init (plugin);
+ gst_afparse_plugin_init (plugin);
+ gst_aftypes_plugin_init (plugin);
return TRUE;
}
-GstPluginDesc plugin_desc = {
+GST_PLUGIN_DEFINE (
GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"gstaf",
- plugin_init
-};
+ "Audiofile plugin",
+ plugin_init,
+ VERSION,
+ "LGPL",
+ GST_COPYRIGHT,
+ GST_PACKAGE,
+ GST_ORIGIN)
diff --git a/ext/audiofile/gstafparse.c b/ext/audiofile/gstafparse.c
index 248389f6..2037bd25 100644
--- a/ext/audiofile/gstafparse.c
+++ b/ext/audiofile/gstafparse.c
@@ -33,11 +33,8 @@
static GstElementDetails afparse_details = {
"Audiofile Parse",
"Codec/Parser",
- "LGPL",
"Audiofile parser for audio/raw",
- VERSION,
"Steve Baker <stevebaker_org@yahoo.co.uk>",
- "(C) 2002"
};
@@ -90,6 +87,7 @@ GST_PAD_TEMPLATE_FACTORY (afparse_sink_factory,
)
)
+static void gst_afparse_base_init (gpointer g_class);
static void gst_afparse_class_init(GstAFParseClass *klass);
static void gst_afparse_init (GstAFParse *afparse);
@@ -113,7 +111,8 @@ gst_afparse_get_type (void)
if (!afparse_type) {
static const GTypeInfo afparse_info = {
- sizeof (GstAFParseClass), NULL,
+ sizeof (GstAFParseClass),
+ gst_afparse_base_init,
NULL,
(GClassInitFunc) gst_afparse_class_init,
NULL,
@@ -128,6 +127,17 @@ gst_afparse_get_type (void)
}
static void
+gst_afparse_base_init (gpointer g_class)
+{
+ GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
+
+ gst_element_class_add_pad_template (element_class, GST_PAD_TEMPLATE_GET (afparse_src_factory));
+ gst_element_class_add_pad_template (element_class, GST_PAD_TEMPLATE_GET (afparse_sink_factory));
+
+ gst_element_class_set_details (element_class, &afparse_details);
+}
+
+static void
gst_afparse_class_init (GstAFParseClass *klass)
{
GObjectClass *gobject_class;
@@ -320,24 +330,15 @@ gst_afparse_get_property (GObject *object, guint prop_id,
}
gboolean
-gst_afparse_plugin_init (GModule *module, GstPlugin *plugin)
+gst_afparse_plugin_init (GstPlugin *plugin)
{
- GstElementFactory *factory;
-
- factory = gst_element_factory_new ("afparse", GST_TYPE_AFPARSE,
- &afparse_details);
- g_return_val_if_fail (factory != NULL, FALSE);
-
- gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (afparse_src_factory));
- gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (afparse_sink_factory));
- /* gst_element_factory_set_rank (factory, GST_ELEMENT_RANK_PRIMARY);*/
-
- gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
-
- /* load audio support library */
+ /* load audio support library */
if (!gst_library_load ("gstaudio"))
return FALSE;
+ if (!gst_element_register (plugin, "afparse", GST_RANK_NONE, GST_TYPE_AFPARSE))
+ return FALSE;
+
return TRUE;
}
diff --git a/ext/audiofile/gstafparse.h b/ext/audiofile/gstafparse.h
index 9483f248..29342fe4 100644
--- a/ext/audiofile/gstafparse.h
+++ b/ext/audiofile/gstafparse.h
@@ -95,7 +95,7 @@ struct _GstAFParseClass {
void (*handoff) (GstElement *element,GstPad *pad);
};
-gboolean gst_afparse_plugin_init (GModule *module, GstPlugin *plugin);
+gboolean gst_afparse_plugin_init (GstPlugin *plugin);
#ifdef __cplusplus
}
diff --git a/ext/audiofile/gstafsink.c b/ext/audiofile/gstafsink.c
index fd80975e..efe242d4 100644
--- a/ext/audiofile/gstafsink.c
+++ b/ext/audiofile/gstafsink.c
@@ -31,11 +31,8 @@
static GstElementDetails afsink_details = {
"Audiofile Sink",
"Sink/Audio",
- "LGPL",
"Write audio streams to disk using libaudiofile",
- VERSION,
"Thomas <thomas@apestaart.org>",
- "(C) 2001"
};
@@ -98,6 +95,7 @@ gst_afsink_types_get_type (void)
return afsink_types_type;
}
+static void gst_afsink_base_init (gpointer g_class);
static void gst_afsink_class_init (GstAFSinkClass *klass);
static void gst_afsink_init (GstAFSink *afsink);
@@ -125,7 +123,8 @@ gst_afsink_get_type (void)
if (!afsink_type) {
static const GTypeInfo afsink_info = {
- sizeof (GstAFSinkClass), NULL,
+ sizeof (GstAFSinkClass),
+ gst_afsink_base_init,
NULL,
(GClassInitFunc) gst_afsink_class_init,
NULL,
@@ -140,6 +139,15 @@ gst_afsink_get_type (void)
}
static void
+gst_afsink_base_init (gpointer g_class)
+{
+ GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
+
+ gst_element_class_add_pad_template (element_class, GST_PAD_TEMPLATE_GET (afsink_sink_factory));
+ gst_element_class_set_details (element_class, &afsink_details);
+}
+
+static void
gst_afsink_class_init (GstAFSinkClass *klass)
{
GObjectClass *gobject_class;
@@ -263,17 +271,10 @@ gst_afsink_get_property (GObject *object, guint prop_id, GValue *value, GParamSp
}
gboolean
-gst_afsink_plugin_init (GModule *module, GstPlugin *plugin)
+gst_afsink_plugin_init (GstPlugin *plugin)
{
- GstElementFactory *factory;
-
- factory = gst_element_factory_new ("afsink", GST_TYPE_AFSINK,
- &afsink_details);
- g_return_val_if_fail (factory != NULL, FALSE);
-
- gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (afsink_sink_factory));
-
- gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
+ if (!gst_element_register (plugin, "afsink", GST_RANK_NONE, GST_TYPE_AFSINK))
+ return FALSE;
return TRUE;
}
diff --git a/ext/audiofile/gstafsink.h b/ext/audiofile/gstafsink.h
index 7dc0d73d..3e8c868c 100644
--- a/ext/audiofile/gstafsink.h
+++ b/ext/audiofile/gstafsink.h
@@ -89,7 +89,7 @@ struct _GstAFSinkClass {
};
GType gst_afsink_get_type (void);
-gboolean gst_afsink_plugin_init (GModule *module, GstPlugin *plugin);
+gboolean gst_afsink_plugin_init (GstPlugin *plugin);
diff --git a/ext/audiofile/gstafsrc.c b/ext/audiofile/gstafsrc.c
index 8c1a0c69..13e228fc 100644
--- a/ext/audiofile/gstafsrc.c
+++ b/ext/audiofile/gstafsrc.c
@@ -32,11 +32,8 @@
static GstElementDetails afsrc_details = {
"Audiofile Src",
"Source/Audio",
- "LGPL",
"Read audio files from disk using libaudiofile",
- VERSION,
"Thomas <thomas@apestaart.org>",
- "(C) 2001"
};
@@ -99,6 +96,7 @@ gst_afsrc_types_get_type (void)
return afsrc_types_type;
}
*/
+static void gst_afsrc_base_init (gpointer g_class);
static void gst_afsrc_class_init (GstAFSrcClass *klass);
static void gst_afsrc_init (GstAFSrc *afsrc);
@@ -124,7 +122,8 @@ gst_afsrc_get_type (void)
if (!afsrc_type) {
static const GTypeInfo afsrc_info = {
- sizeof (GstAFSrcClass), NULL,
+ sizeof (GstAFSrcClass),
+ gst_afsrc_base_init,
NULL,
(GClassInitFunc) gst_afsrc_class_init,
NULL,
@@ -139,6 +138,15 @@ gst_afsrc_get_type (void)
}
static void
+gst_afsrc_base_init (gpointer g_class)
+{
+ GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
+
+ gst_element_class_add_pad_template (element_class, GST_PAD_TEMPLATE_GET (afsrc_src_factory));
+ gst_element_class_set_details (element_class, &afsrc_details);
+}
+
+static void
gst_afsrc_class_init (GstAFSrcClass *klass)
{
GObjectClass *gobject_class;
@@ -274,21 +282,14 @@ gst_afsrc_get_property (GObject *object, guint prop_id, GValue *value, GParamSpe
}
gboolean
-gst_afsrc_plugin_init (GModule *module, GstPlugin *plugin)
+gst_afsrc_plugin_init (GstPlugin *plugin)
{
- GstElementFactory *factory;
-
- factory = gst_element_factory_new ("afsrc", GST_TYPE_AFSRC,
- &afsrc_details);
- g_return_val_if_fail (factory != NULL, FALSE);
-
- gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (afsrc_src_factory));
-
- gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
-
/* load audio support library */
if (!gst_library_load ("gstaudio"))
return FALSE;
+
+ if (!gst_element_register (plugin, "afsrc", GST_RANK_NONE, GST_TYPE_AFSRC))
+ return FALSE;
return TRUE;
}
diff --git a/ext/audiofile/gstafsrc.h b/ext/audiofile/gstafsrc.h
index 61cb5095..23e8669c 100644
--- a/ext/audiofile/gstafsrc.h
+++ b/ext/audiofile/gstafsrc.h
@@ -95,7 +95,7 @@ struct _GstAFSrcClass {
};
GType gst_afsrc_get_type (void);
-gboolean gst_afsrc_plugin_init (GModule *module, GstPlugin *plugin);
+gboolean gst_afsrc_plugin_init (GstPlugin *plugin);
diff --git a/ext/audiofile/gstaftypes.c b/ext/audiofile/gstaftypes.c
index befe141b..09e68d32 100644
--- a/ext/audiofile/gstaftypes.c
+++ b/ext/audiofile/gstaftypes.c
@@ -106,13 +106,14 @@ gst_aftypes_type_find(GstTypeFind *tf, gpointer private)
}
gboolean
-gst_aftypes_plugin_init (GModule *module, GstPlugin *plugin)
+gst_aftypes_plugin_init (GstPlugin *plugin)
{
static gchar * af_exts[] = { "aiff", "aif", "aifc", "wav", "au", "snd", NULL };
- gst_type_find_factory_register (plugin, "audio/x-mod",
- GST_ELEMENT_RANK_MARGINAL, gst_aftypes_type_find, af_exts,
- GST_CAPS_ANY, NULL);
+ gst_type_find_register (plugin, "audio/x-mod",
+ GST_RANK_MARGINAL,
+ gst_aftypes_type_find, af_exts,
+ GST_CAPS_ANY, NULL);
return TRUE;
}