Commit 7da7494a authored by Sebastian Dröge's avatar Sebastian Dröge

base: Use G_DEFINE_TYPE instead of GST_BOILERPLATE

parent 0f3f816f
......@@ -136,20 +136,14 @@ struct _GstAdapterPrivate
gsize csize;
};
#define _do_init(thing) \
#define _do_init \
GST_DEBUG_CATEGORY_INIT (gst_adapter_debug, "adapter", 0, "object to splice and merge buffers to desired size")
GST_BOILERPLATE_FULL (GstAdapter, gst_adapter, GObject, G_TYPE_OBJECT,
_do_init);
#define gst_adapter_parent_class parent_class
G_DEFINE_TYPE_WITH_CODE (GstAdapter, gst_adapter, G_TYPE_OBJECT, _do_init);
static void gst_adapter_dispose (GObject * object);
static void gst_adapter_finalize (GObject * object);
static void
gst_adapter_base_init (gpointer g_class)
{
/* nop */
}
static void
gst_adapter_class_init (GstAdapterClass * klass)
{
......@@ -162,7 +156,7 @@ gst_adapter_class_init (GstAdapterClass * klass)
}
static void
gst_adapter_init (GstAdapter * adapter, GstAdapterClass * g_class)
gst_adapter_init (GstAdapter * adapter)
{
adapter->priv = GST_ADAPTER_GET_PRIVATE (adapter);
adapter->assembled_data = g_malloc (DEFAULT_SIZE);
......
......@@ -86,7 +86,8 @@ struct _GstCollectPadsPrivate
gpointer clipfunc_user_data;
};
GST_BOILERPLATE (GstCollectPads, gst_collect_pads, GstObject, GST_TYPE_OBJECT);
#define gst_collect_pads_parent_class parent_class
G_DEFINE_TYPE (GstCollectPads, gst_collect_pads, GST_TYPE_OBJECT);
static void gst_collect_pads_clear (GstCollectPads * pads,
GstCollectData * data);
......@@ -97,12 +98,6 @@ static void ref_data (GstCollectData * data);
static void unref_data (GstCollectData * data);
static void gst_collect_pads_check_pads_unlocked (GstCollectPads * pads);
static void
gst_collect_pads_base_init (gpointer g_class)
{
/* Do nothing here */
}
static void
gst_collect_pads_class_init (GstCollectPadsClass * klass)
{
......@@ -117,7 +112,7 @@ gst_collect_pads_class_init (GstCollectPadsClass * klass)
}
static void
gst_collect_pads_init (GstCollectPads * pads, GstCollectPadsClass * g_class)
gst_collect_pads_init (GstCollectPads * pads)
{
pads->abidata.ABI.priv = GST_COLLECT_PADS_GET_PRIVATE (pads);
......
......@@ -62,23 +62,17 @@
GST_DEBUG_CATEGORY_STATIC (gst_push_src_debug);
#define GST_CAT_DEFAULT gst_push_src_debug
#define _do_init(type) \
#define _do_init \
GST_DEBUG_CATEGORY_INIT (gst_push_src_debug, "pushsrc", 0, \
"pushsrc element");
GST_BOILERPLATE_FULL (GstPushSrc, gst_push_src, GstBaseSrc, GST_TYPE_BASE_SRC,
_do_init);
#define gst_push_src_parent_class parent_class
G_DEFINE_TYPE_WITH_CODE (GstPushSrc, gst_push_src, GST_TYPE_BASE_SRC, _do_init);
static gboolean gst_push_src_check_get_range (GstBaseSrc * src);
static GstFlowReturn gst_push_src_create (GstBaseSrc * bsrc, guint64 offset,
guint length, GstBuffer ** ret);
static void
gst_push_src_base_init (gpointer g_class)
{
/* nop */
}
static void
gst_push_src_class_init (GstPushSrcClass * klass)
{
......@@ -90,7 +84,7 @@ gst_push_src_class_init (GstPushSrcClass * klass)
}
static void
gst_push_src_init (GstPushSrc * pushsrc, GstPushSrcClass * klass)
gst_push_src_init (GstPushSrc * pushsrc)
{
/* nop */
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment