From 9b90d3d9c01e9730622a85aa2a156606a0e6749b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Sat, 16 Apr 2011 15:24:01 +0200 Subject: [PATCH] base: Update docs to say class_init instead of base_init And remove a useless base_init in basesrc --- libs/gst/base/gstbasesink.c | 6 +++--- libs/gst/base/gstbasesrc.c | 11 +++-------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/libs/gst/base/gstbasesink.c b/libs/gst/base/gstbasesink.c index 470ef37..6a340c4 100644 --- a/libs/gst/base/gstbasesink.c +++ b/libs/gst/base/gstbasesink.c @@ -36,12 +36,12 @@ * * #GstBaseSink provides support for exactly one sink pad, which should be * named "sink". A sink implementation (subclass of #GstBaseSink) should - * install a pad template in its base_init function, like so: + * install a pad template in its class_init function, like so: * |[ * static void - * my_element_base_init (gpointer g_class) + * my_element_class_init (GstMyElementClass *klass) * { - * GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class); + * GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass); * * // sinktemplate should be a #GstStaticPadTemplate with direction * // #GST_PAD_SINK and name "sink" diff --git a/libs/gst/base/gstbasesrc.c b/libs/gst/base/gstbasesrc.c index be9aa7d..d130502 100644 --- a/libs/gst/base/gstbasesrc.c +++ b/libs/gst/base/gstbasesrc.c @@ -251,7 +251,6 @@ struct _GstBaseSrcPrivate static GstElementClass *parent_class = NULL; -static void gst_base_src_base_init (gpointer g_class); static void gst_base_src_class_init (GstBaseSrcClass * klass); static void gst_base_src_init (GstBaseSrc * src, gpointer g_class); static void gst_base_src_finalize (GObject * object); @@ -266,7 +265,7 @@ gst_base_src_get_type (void) GType _type; static const GTypeInfo base_src_info = { sizeof (GstBaseSrcClass), - (GBaseInitFunc) gst_base_src_base_init, + NULL, NULL, (GClassInitFunc) gst_base_src_class_init, NULL, @@ -325,12 +324,6 @@ static GstFlowReturn gst_base_src_get_range (GstBaseSrc * src, guint64 offset, static gboolean gst_base_src_seekable (GstBaseSrc * src); static void -gst_base_src_base_init (gpointer g_class) -{ - GST_DEBUG_CATEGORY_INIT (gst_base_src_debug, "basesrc", 0, "basesrc element"); -} - -static void gst_base_src_class_init (GstBaseSrcClass * klass) { GObjectClass *gobject_class; @@ -339,6 +332,8 @@ gst_base_src_class_init (GstBaseSrcClass * klass) gobject_class = G_OBJECT_CLASS (klass); gstelement_class = GST_ELEMENT_CLASS (klass); + GST_DEBUG_CATEGORY_INIT (gst_base_src_debug, "basesrc", 0, "basesrc element"); + g_type_class_add_private (klass, sizeof (GstBaseSrcPrivate)); parent_class = g_type_class_peek_parent (klass); -- 2.7.4