Updated for the new plugin loading code

Original commit message from CVS:
Updated for the new plugin loading code
This commit is contained in:
Jan Schmidt 2003-11-02 14:09:39 +00:00
parent 9ad6701204
commit eccc6fd4bf
2 changed files with 40 additions and 14 deletions

View file

@ -39,15 +39,13 @@
#include <string.h> /* memmove */ #include <string.h> /* memmove */
/* elementfactory information */ /* elementfactory information */
GstElementDetails gst_bpwsinc_details = { static GstElementDetails gst_bpwsinc_details = GST_ELEMENT_DETAILS (
"BPWSinc", "BPWSinc",
"Filter/Audio/Effect", "Filter/Audio/Effect",
"LGPL",
"Band-Pass Windowed sinc filter", "Band-Pass Windowed sinc filter",
VERSION, "Thomas <thomas@apestaart.org>, "
"Thomas <thomas@apestaart.org>", "Steven W. Smith"
"(C) 2002 Steven W. Smith", );
};
enum { enum {
/* FILL ME */ /* FILL ME */
@ -95,6 +93,7 @@ struct _GstBPWSincClass
GstElementClass parent_class; GstElementClass parent_class;
}; };
static void gst_bpwsinc_base_init (gpointer g_class);
static void gst_bpwsinc_class_init (GstBPWSincClass * klass); static void gst_bpwsinc_class_init (GstBPWSincClass * klass);
static void gst_bpwsinc_init (GstBPWSinc * filter); static void gst_bpwsinc_init (GstBPWSinc * filter);
@ -117,7 +116,9 @@ GType gst_bpwsinc_get_type (void)
if (!bpwsinc_type) { if (!bpwsinc_type) {
static const GTypeInfo bpwsinc_info = { static const GTypeInfo bpwsinc_info = {
sizeof (GstBPWSincClass), NULL, NULL, sizeof (GstBPWSincClass),
gst_bpwsinc_base_init,
NULL,
(GClassInitFunc) gst_bpwsinc_class_init, NULL, NULL, (GClassInitFunc) gst_bpwsinc_class_init, NULL, NULL,
sizeof (GstBPWSinc), 0, sizeof (GstBPWSinc), 0,
(GInstanceInitFunc) gst_bpwsinc_init, (GInstanceInitFunc) gst_bpwsinc_init,
@ -129,6 +130,18 @@ GType gst_bpwsinc_get_type (void)
return bpwsinc_type; return bpwsinc_type;
} }
static void
gst_bpwsinc_base_init (gpointer g_class)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
/* register src pads */
gst_element_class_add_pad_template (element_class, gst_filter_src_factory ());
gst_element_class_add_pad_template (element_class, gst_filter_sink_factory ());
gst_element_class_set_details (element_class, &gst_bpwsinc_details);
}
static void static void
gst_bpwsinc_class_init (GstBPWSincClass * klass) gst_bpwsinc_class_init (GstBPWSincClass * klass)
{ {

View file

@ -38,15 +38,13 @@
#include <math.h> /* M_PI */ #include <math.h> /* M_PI */
#include <string.h> /* memmove */ #include <string.h> /* memmove */
GstElementDetails gst_lpwsinc_details = { static GstElementDetails gst_lpwsinc_details = GST_ELEMENT_DETAILS (
"LPWSinc", "LPWSinc",
"Filter/Audio/Effect", "Filter/Audio/Effect",
"LGPL",
"Low-pass Windowed sinc filter", "Low-pass Windowed sinc filter",
VERSION, "Thomas <thomas@apestaart.org>, "
"Thomas <thomas@apestaart.org>", "Steven W. Smith"
"(C) 2002 Steven W. Smith", );
};
enum { enum {
/* FILL ME */ /* FILL ME */
@ -92,6 +90,7 @@ struct _GstLPWSincClass
GstElementClass parent_class; GstElementClass parent_class;
}; };
static void gst_lpwsinc_base_init (gpointer g_class);
static void gst_lpwsinc_class_init (GstLPWSincClass * klass); static void gst_lpwsinc_class_init (GstLPWSincClass * klass);
static void gst_lpwsinc_init (GstLPWSinc * filter); static void gst_lpwsinc_init (GstLPWSinc * filter);
@ -114,7 +113,9 @@ GType gst_lpwsinc_get_type (void)
if (!lpwsinc_type) { if (!lpwsinc_type) {
static const GTypeInfo lpwsinc_info = { static const GTypeInfo lpwsinc_info = {
sizeof (GstLPWSincClass), NULL, NULL, sizeof (GstLPWSincClass),
gst_lpwsinc_base_init,
NULL,
(GClassInitFunc) gst_lpwsinc_class_init, NULL, NULL, (GClassInitFunc) gst_lpwsinc_class_init, NULL, NULL,
sizeof (GstLPWSinc), 0, sizeof (GstLPWSinc), 0,
(GInstanceInitFunc) gst_lpwsinc_init, (GInstanceInitFunc) gst_lpwsinc_init,
@ -126,6 +127,18 @@ GType gst_lpwsinc_get_type (void)
return lpwsinc_type; return lpwsinc_type;
} }
static void
gst_lpwsinc_base_init (gpointer g_class)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
/* register src pads */
gst_element_class_add_pad_template (element_class, gst_filter_src_factory ());
gst_element_class_add_pad_template (element_class, gst_filter_sink_factory ());
gst_element_class_set_details (element_class, &gst_lpwsinc_details);
}
static void static void
gst_lpwsinc_class_init (GstLPWSincClass * klass) gst_lpwsinc_class_init (GstLPWSincClass * klass)
{ {