summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorOlivier Crete <olivier.crete@collabora.co.uk>2008-07-04 20:50:10 +0000
committerOlivier CrĂȘte <olivier.crete@collabora.co.uk>2009-03-03 14:34:06 -0500
commite76cd30d7fefd9f3f39aef237b3b457302e310a3 (patch)
tree0338f99c036d41162193e478c76940f414367ad6 /ext
parentc6396458b7ba1cb0e2f8bfa059359d4e6bc12483 (diff)
downloadgst-plugins-bad-e76cd30d7fefd9f3f39aef237b3b457302e310a3.tar.gz
gst-plugins-bad-e76cd30d7fefd9f3f39aef237b3b457302e310a3.tar.bz2
gst-plugins-bad-e76cd30d7fefd9f3f39aef237b3b457302e310a3.zip
[MOVED FROM GST-P-FARSIGHT] Port mimic plugins to GST_BOILERPLATE
20080704205010-3e2dc-da41e5685ab9ceb67555d499125432cd12d5505d.gz
Diffstat (limited to 'ext')
-rw-r--r--ext/mimic/gstmimdec.c36
-rw-r--r--ext/mimic/gstmimdec.h4
-rw-r--r--ext/mimic/gstmimenc.c37
-rw-r--r--ext/mimic/gstmimenc.h4
4 files changed, 10 insertions, 71 deletions
diff --git a/ext/mimic/gstmimdec.c b/ext/mimic/gstmimdec.c
index 00ce76b7..a5abef24 100644
--- a/ext/mimic/gstmimdec.c
+++ b/ext/mimic/gstmimdec.c
@@ -59,9 +59,6 @@ GST_STATIC_PAD_TEMPLATE (
)
);
-static void gst_mimdec_class_init (GstMimDecClass *klass);
-static void gst_mimdec_base_init (GstMimDecClass *klass);
-static void gst_mimdec_init (GstMimDec *mimdec);
static void gst_mimdec_finalize (GObject *object);
static GstFlowReturn gst_mimdec_chain (GstPad *pad,
@@ -72,36 +69,11 @@ static GstStateChangeReturn
gst_mimdec_change_state (GstElement *element,
GstStateChange transition);
-static GstElementClass *parent_class = NULL;
-GType
-gst_gst_mimdec_get_type (void)
-{
- static GType plugin_type = 0;
-
- if (!plugin_type)
- {
- static const GTypeInfo plugin_info =
- {
- sizeof (GstMimDecClass),
- (GBaseInitFunc) gst_mimdec_base_init,
- NULL,
- (GClassInitFunc) gst_mimdec_class_init,
- NULL,
- NULL,
- sizeof (GstMimDec),
- 0,
- (GInstanceInitFunc) gst_mimdec_init,
- };
- plugin_type = g_type_register_static (GST_TYPE_ELEMENT,
- "GstMimDec",
- &plugin_info, 0);
- }
- return plugin_type;
-}
+GST_BOILERPLATE (GstMimDec, gst_mimdec, GstElement, GST_TYPE_ELEMENT);
static void
-gst_mimdec_base_init (GstMimDecClass *klass)
+gst_mimdec_base_init (gpointer klass)
{
static GstElementDetails plugin_details = {
"MimDec",
@@ -134,13 +106,11 @@ gst_mimdec_class_init (GstMimDecClass *klass)
gobject_class->finalize = gst_mimdec_finalize;
- parent_class = g_type_class_peek_parent (klass);
-
GST_DEBUG_CATEGORY_INIT (mimdec_debug, "mimdec", 0, "Mimic decoder plugin");
}
static void
-gst_mimdec_init (GstMimDec *mimdec)
+gst_mimdec_init (GstMimDec *mimdec, GstMimDecClass *klass)
{
mimdec->sinkpad = gst_pad_new_from_template (
gst_static_pad_template_get (&sink_factory), "sink");
diff --git a/ext/mimic/gstmimdec.h b/ext/mimic/gstmimdec.h
index 8419f7fd..c9b77997 100644
--- a/ext/mimic/gstmimdec.h
+++ b/ext/mimic/gstmimdec.h
@@ -30,7 +30,7 @@
G_BEGIN_DECLS
#define GST_TYPE_MIMDEC \
- (gst_gst_mimdec_get_type())
+ (gst_mimdec_get_type())
#define GST_MIMDEC(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MIMDEC,GstMimDec))
#define GST_MIMDEC_CLASS(klass) \
@@ -65,7 +65,7 @@ struct _GstMimDecClass
GstElementClass parent_class;
};
-GType gst_gst_mimdec_get_type (void);
+GType gst_mimdec_get_type (void);
G_END_DECLS
diff --git a/ext/mimic/gstmimenc.c b/ext/mimic/gstmimenc.c
index 8554e541..087adef2 100644
--- a/ext/mimic/gstmimenc.c
+++ b/ext/mimic/gstmimenc.c
@@ -71,10 +71,6 @@ GST_STATIC_PAD_TEMPLATE (
);
-static void gst_mimenc_class_init (GstMimEncClass *klass);
-static void gst_mimenc_base_init (GstMimEncClass *klass);
-static void gst_mimenc_init (GstMimEnc *mimenc);
-
static gboolean gst_mimenc_setcaps (GstPad *pad,
GstCaps *caps);
static GstFlowReturn gst_mimenc_chain (GstPad *pad,
@@ -86,36 +82,11 @@ static GstStateChangeReturn
gst_mimenc_change_state (GstElement *element,
GstStateChange transition);
-static GstElementClass *parent_class = NULL;
-GType
-gst_gst_mimenc_get_type (void)
-{
- static GType plugin_type = 0;
-
- if (!plugin_type)
- {
- static const GTypeInfo plugin_info =
- {
- sizeof (GstMimEncClass),
- (GBaseInitFunc) gst_mimenc_base_init,
- NULL,
- (GClassInitFunc) gst_mimenc_class_init,
- NULL,
- NULL,
- sizeof (GstMimEnc),
- 0,
- (GInstanceInitFunc) gst_mimenc_init,
- };
- plugin_type = g_type_register_static (GST_TYPE_ELEMENT,
- "GstMimEnc",
- &plugin_info, 0);
- }
- return plugin_type;
-}
+GST_BOILERPLATE (GstMimEnc, gst_mimenc, GstElement, GST_TYPE_ELEMENT);
static void
-gst_mimenc_base_init (GstMimEncClass *klass)
+gst_mimenc_base_init (gpointer klass)
{
static GstElementDetails plugin_details = {
"MimEnc",
@@ -142,13 +113,11 @@ gst_mimenc_class_init (GstMimEncClass *klass)
gstelement_class = (GstElementClass*) klass;
gstelement_class->change_state = gst_mimenc_change_state;
- parent_class = g_type_class_peek_parent (klass);
-
GST_DEBUG_CATEGORY_INIT (mimenc_debug, "mimenc", 0, "Mimic encoder plugin");
}
static void
-gst_mimenc_init (GstMimEnc *mimenc)
+gst_mimenc_init (GstMimEnc *mimenc, GstMimEncClass *klass)
{
mimenc->sinkpad = gst_pad_new_from_template (
gst_static_pad_template_get (&sink_factory), "sink");
diff --git a/ext/mimic/gstmimenc.h b/ext/mimic/gstmimenc.h
index 8b85745e..c037f88c 100644
--- a/ext/mimic/gstmimenc.h
+++ b/ext/mimic/gstmimenc.h
@@ -30,7 +30,7 @@
G_BEGIN_DECLS
#define GST_TYPE_MIMENC \
- (gst_gst_mimenc_get_type())
+ (gst_mimenc_get_type())
#define GST_MIMENC(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MIMENC,GstMimEnc))
#define GST_MIMENC_CLASS(klass) \
@@ -62,7 +62,7 @@ struct _GstMimEncClass
GstElementClass parent_class;
};
-GType gst_gst_mimenc_get_type (void);
+GType gst_mimenc_get_type (void);
G_END_DECLS