[gst-plugins-farsight/master] Port mimic plugins to GST_BOILERPLATE
Olivier Crete
olivier.crete at collabora.co.uk
Tue Mar 3 10:53:12 PST 2009
20080704205010-3e2dc-da41e5685ab9ceb67555d499125432cd12d5505d.gz
---
ext/mimic/gstmimdec.c | 36 +++---------------------------------
ext/mimic/gstmimdec.h | 4 ++--
ext/mimic/gstmimenc.c | 37 +++----------------------------------
ext/mimic/gstmimenc.h | 4 ++--
4 files changed, 10 insertions(+), 71 deletions(-)
diff --git a/ext/mimic/gstmimdec.c b/ext/mimic/gstmimdec.c
index 00ce76b..a5abef2 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 8419f7f..c9b7799 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 8554e54..087adef 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 8b85745..c037f88 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
--
1.5.6.5
More information about the farsight-commits
mailing list