From f341ef39fafdd40641ee83e4c487651baf48bffe Mon Sep 17 00:00:00 2001 From: Johan Rydberg Date: Thu, 20 Apr 2006 19:59:34 +0000 Subject: remove double gst_get_, fix '_' in names Original commit message from CVS: Patch by: Johan Rydberg * src/gstplugin.c: (gst_plugin_template_get_type), (gst_plugin_template_base_init), (gst_plugin_template_class_init), (gst_plugin_template_set_property), (gst_plugin_template_get_property): * src/gstplugin.h: * src/gsttransform.c: (gst_plugin_template_base_init), (gst_plugin_template_set_property), (gst_plugin_template_get_property): * tools/make_element: remove double gst_get_, fix '_' in names --- common | 2 +- gst-plugin/ChangeLog | 16 ++++++++++++++++ gst-plugin/src/gstplugin.c | 16 +++++----------- gst-plugin/src/gstplugin.h | 4 ++-- gst-plugin/src/gsttransform.c | 21 +++++++-------------- gst-plugin/tools/make_element | 8 +++++--- 6 files changed, 36 insertions(+), 31 deletions(-) diff --git a/common b/common index c09cd18..a6710e6 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit c09cd18d328f740ac532377fa5605b0f712cc6fd +Subproject commit a6710e67fd82147e32a18f1b63177583faffd498 diff --git a/gst-plugin/ChangeLog b/gst-plugin/ChangeLog index ef16383..7daf379 100644 --- a/gst-plugin/ChangeLog +++ b/gst-plugin/ChangeLog @@ -1,3 +1,19 @@ +2006-04-20 Stefan Kost + + Patch by: Johan Rydberg + + * src/gstplugin.c: (gst_plugin_template_get_type), + (gst_plugin_template_base_init), (gst_plugin_template_class_init), + (gst_plugin_template_set_property), + (gst_plugin_template_get_property): + * src/gstplugin.h: + * src/gsttransform.c: (gst_plugin_template_base_init), + (gst_plugin_template_set_property), + (gst_plugin_template_get_property): + * tools/make_element: + remove double gst_get_, fix '_' in names + + 2006-02-26 Tim-Philipp Müller * src/gstplugin.c: (gst_plugin_template_init), diff --git a/gst-plugin/src/gstplugin.c b/gst-plugin/src/gstplugin.c index 1f23b57..b7eb059 100644 --- a/gst-plugin/src/gstplugin.c +++ b/gst-plugin/src/gstplugin.c @@ -108,7 +108,7 @@ static GstFlowReturn gst_plugin_template_chain (GstPad *pad, GstBuffer *buf); static GstElementClass *parent_class = NULL; GType -gst_gst_plugin_template_get_type (void) +gst_plugin_template_get_type (void) { static GType plugin_type = 0; @@ -139,7 +139,7 @@ gst_plugin_template_base_init (GstPluginTemplateClass *klass) static GstElementDetails element_details = { "PluginTemplate", "Generic/PluginTemplate", - "Generic Template Plugin", + "Generic Template Element", "Thomas Vander Stichele " }; GstElementClass *element_class = GST_ELEMENT_CLASS (klass); @@ -161,7 +161,7 @@ gst_plugin_template_class_init (GstPluginTemplateClass *klass) gobject_class = (GObjectClass*) klass; gstelement_class = (GstElementClass*) klass; - parent_class = g_type_class_ref (GST_TYPE_ELEMENT); + parent_class = g_type_class_peek_parent (klass); gobject_class->set_property = gst_plugin_template_set_property; gobject_class->get_property = gst_plugin_template_get_property; @@ -201,10 +201,7 @@ static void gst_plugin_template_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { - GstPluginTemplate *filter; - - g_return_if_fail (GST_IS_PLUGIN_TEMPLATE (object)); - filter = GST_PLUGIN_TEMPLATE (object); + GstPluginTemplate *filter = GST_PLUGIN_TEMPLATE (object); switch (prop_id) { @@ -221,10 +218,7 @@ static void gst_plugin_template_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { - GstPluginTemplate *filter; - - g_return_if_fail (GST_IS_PLUGIN_TEMPLATE (object)); - filter = GST_PLUGIN_TEMPLATE (object); + GstPluginTemplate *filter = GST_PLUGIN_TEMPLATE (object); switch (prop_id) { case ARG_SILENT: diff --git a/gst-plugin/src/gstplugin.h b/gst-plugin/src/gstplugin.h index 0ef9256..1bcdb90 100644 --- a/gst-plugin/src/gstplugin.h +++ b/gst-plugin/src/gstplugin.h @@ -51,7 +51,7 @@ G_BEGIN_DECLS /* #defines don't like whitespacey bits */ #define GST_TYPE_PLUGIN_TEMPLATE \ - (gst_gst_plugin_template_get_type()) + (gst_plugin_template_get_type()) #define GST_PLUGIN_TEMPLATE(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PLUGIN_TEMPLATE,GstPluginTemplate)) #define GST_PLUGIN_TEMPLATE_CLASS(klass) \ @@ -78,7 +78,7 @@ struct _GstPluginTemplateClass GstElementClass parent_class; }; -GType gst_gst_plugin_template_get_type (void); +GType gst_plugin_template_get_type (void); G_END_DECLS diff --git a/gst-plugin/src/gsttransform.c b/gst-plugin/src/gsttransform.c index 64c595d..4756f8c 100644 --- a/gst-plugin/src/gsttransform.c +++ b/gst-plugin/src/gsttransform.c @@ -35,15 +35,14 @@ #include "config.h" #endif -#include #include #include -#include #include #include "gstplugin.h" -GST_DEBUG_CATEGORY (plugin_debug); +GST_DEBUG_CATEGORY_STATIC (gst_plugin_template_debug); +#define GST_CAT_DEFAULT gst_plugin_template_debug /* Filter signals and args */ enum { @@ -73,7 +72,7 @@ GST_STATIC_PAD_TEMPLATE ( ); #define DEBUG_INIT(bla) \ - GST_DEBUG_CATEGORY_INIT (plugin_debug, "plugin", 0, "plugin template element"); + GST_DEBUG_CATEGORY_INIT (gst_plugin_template_debug, "plugin_template", 0, "transformer template plugin"); GST_BOILERPLATE_FULL (GstPluginTemplate, gst_plugin_template, GstBaseTransform, GST_TYPE_BASE_TRANSFORM, DEBUG_INIT); @@ -94,7 +93,7 @@ gst_plugin_template_base_init (gpointer klass) static GstElementDetails element_details = { "PluginTemplate", "Generic/PluginTemplate", - "Generic Template Plugin", + "Generic Template Element", "Stefan Kost " }; GstElementClass *element_class = GST_ELEMENT_CLASS (klass); @@ -133,10 +132,7 @@ static void gst_plugin_template_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec) { - GstPluginTemplate *filter; - - g_return_if_fail (GST_IS_PLUGIN_TEMPLATE (object)); - filter = GST_PLUGIN_TEMPLATE (object); + GstPluginTemplate *filter = GST_PLUGIN_TEMPLATE (object); switch (prop_id) { case PROP_SILENT: @@ -152,10 +148,7 @@ static void gst_plugin_template_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { - GstPluginTemplate *filter; - - g_return_if_fail (GST_IS_PLUGIN_TEMPLATE (object)); - filter = GST_PLUGIN_TEMPLATE (object); + GstPluginTemplate *filter = GST_PLUGIN_TEMPLATE (object); switch (prop_id) { case PROP_SILENT: @@ -212,7 +205,7 @@ GST_PLUGIN_DEFINE ( GST_VERSION_MAJOR, GST_VERSION_MINOR, "plugin", - "Template plugin", + "Generic Template Plugin", plugin_init, VERSION, "LGPL", diff --git a/gst-plugin/tools/make_element b/gst-plugin/tools/make_element index 4447185..c83e4c4 100755 --- a/gst-plugin/tools/make_element +++ b/gst-plugin/tools/make_element @@ -21,11 +21,13 @@ id=$(echo '$Id$' | sed \ TEMPLATE=$(echo $Template | tr a-z A-Z) template=$(echo $Template | tr A-Z a-z) +filename=$(echo $template | tr -d _) +Template=$(echo $Template | tr -d _) # remember to break up the Id: in the line below sed \ -e 's/gstplugin\.c/SOURCEFILE/g' \ - -e "s/gstplugin\.h/gst$template.h/g" \ + -e "s/gstplugin\.h/gst$filename.h/g" \ -e "s/GstPluginTemplate/Gst$Template/g" \ -e "s/gst_plugin_template/gst_$template/g" \ -e "s/gst_type_plugin_template/gst_$template/g" \ @@ -34,7 +36,7 @@ sed \ -e 's/\$I[d]: \([^$]*\)\$/\1/g' \ -e 's/SOURCEFILE/gstobject\.c/g' \ -e "s%MAKEFILTERVERSION%$id%g" \ - $srcfile >gst$template.c.tmp && mv gst$template.c.tmp gst$template.c + $srcfile >gst$filename.c.tmp && mv gst$filename.c.tmp gst$filename.c sed \ -e 's/gstplugin\.c/SOURCEFILE/g' \ @@ -46,5 +48,5 @@ sed \ -e 's/\$I[d]: \([^$]*\)\$/\1/g' \ -e 's/SOURCEFILE/gstobject\.c/g' \ -e "s%MAKEFILTERVERSION%$id%g" \ - $srcfile_h >gst$template.h.tmp && mv gst$template.h.tmp gst$template.h + $srcfile_h >gst$filename.h.tmp && mv gst$filename.h.tmp gst$filename.h -- cgit v1.2.3