From: Edward Hervey Date: Tue, 7 Jun 2011 09:23:55 +0000 (+0200) Subject: auparse: Don't use GST_BOILERPLATE X-Git-Tag: RELEASE-0.11.1~587 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b3a1f5d1edff94e3802490a20a3832f308367472;p=platform%2Fupstream%2Fgst-plugins-good.git auparse: Don't use GST_BOILERPLATE --- diff --git a/gst/auparse/gstauparse.c b/gst/auparse/gstauparse.c index 69e5273..aecb815 100644 --- a/gst/auparse/gstauparse.c +++ b/gst/auparse/gstauparse.c @@ -82,24 +82,8 @@ static gboolean gst_au_parse_src_convert (GstAuParse * auparse, GstFormat src_format, gint64 srcval, GstFormat dest_format, gint64 * destval); -GST_BOILERPLATE (GstAuParse, gst_au_parse, GstElement, GST_TYPE_ELEMENT); - -static void -gst_au_parse_base_init (gpointer g_class) -{ - GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_template)); - gst_element_class_set_details_simple (element_class, "AU audio demuxer", - "Codec/Demuxer/Audio", - "Parse an .au file into raw audio", - "Erik Walthinsen "); - - GST_DEBUG_CATEGORY_INIT (auparse_debug, "auparse", 0, ".au parser"); -} +#define gst_au_parse_parent_class parent_class +G_DEFINE_TYPE (GstAuParse, gst_au_parse, GST_TYPE_ELEMENT); static void gst_au_parse_class_init (GstAuParseClass * klass) @@ -107,6 +91,8 @@ gst_au_parse_class_init (GstAuParseClass * klass) GObjectClass *gobject_class; GstElementClass *gstelement_class; + GST_DEBUG_CATEGORY_INIT (auparse_debug, "auparse", 0, ".au parser"); + gobject_class = (GObjectClass *) klass; gstelement_class = (GstElementClass *) klass; @@ -114,10 +100,19 @@ gst_au_parse_class_init (GstAuParseClass * klass) gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_au_parse_change_state); + gst_element_class_add_pad_template (gstelement_class, + gst_static_pad_template_get (&sink_template)); + gst_element_class_add_pad_template (gstelement_class, + gst_static_pad_template_get (&src_template)); + gst_element_class_set_details_simple (gstelement_class, + "AU audio demuxer", + "Codec/Demuxer/Audio", + "Parse an .au file into raw audio", + "Erik Walthinsen "); } static void -gst_au_parse_init (GstAuParse * auparse, GstAuParseClass * klass) +gst_au_parse_init (GstAuParse * auparse) { auparse->sinkpad = gst_pad_new_from_static_template (&sink_template, "sink"); gst_pad_set_chain_function (auparse->sinkpad, @@ -785,7 +780,7 @@ gst_au_parse_change_state (GstElement * element, GstStateChange transition) GstAuParse *auparse = GST_AU_PARSE (element); GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS; - ret = parent_class->change_state (element, transition); + ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); if (ret == GST_STATE_CHANGE_FAILURE) return ret;