Commit 5020738a authored by Sebastian Dröge's avatar Sebastian Dröge

elements: Use G_DEFINE_TYPE instead of GST_BOILERPLATE

parent 100bdfb0
......@@ -61,12 +61,12 @@ static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
GST_DEBUG_CATEGORY_STATIC (gst_capsfilter_debug);
#define GST_CAT_DEFAULT gst_capsfilter_debug
#define _do_init(bla) \
#define _do_init \
GST_DEBUG_CATEGORY_INIT (gst_capsfilter_debug, "capsfilter", 0, \
"capsfilter element");
GST_BOILERPLATE_FULL (GstCapsFilter, gst_capsfilter, GstBaseTransform,
GST_TYPE_BASE_TRANSFORM, _do_init);
#define gst_capsfilter_parent_class parent_class
G_DEFINE_TYPE_WITH_CODE (GstCapsFilter, gst_capsfilter, GST_TYPE_BASE_TRANSFORM,
_do_init);
static void gst_capsfilter_set_property (GObject * object, guint prop_id,
......@@ -84,26 +84,11 @@ static GstFlowReturn gst_capsfilter_transform_ip (GstBaseTransform * base,
static GstFlowReturn gst_capsfilter_prepare_buf (GstBaseTransform * trans,
GstBuffer * input, gint size, GstCaps * caps, GstBuffer ** buf);
static void
gst_capsfilter_base_init (gpointer g_class)
{
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_set_details_simple (gstelement_class,
"CapsFilter",
"Generic",
"Pass data without modification, limiting formats",
"David Schleef <ds@schleef.org>");
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&srctemplate));
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&sinktemplate));
}
static void
gst_capsfilter_class_init (GstCapsFilterClass * klass)
{
GObjectClass *gobject_class;
GstElementClass *gstelement_class;
GstBaseTransformClass *trans_class;
gobject_class = G_OBJECT_CLASS (klass);
......@@ -118,6 +103,17 @@ gst_capsfilter_class_init (GstCapsFilterClass * klass)
"object."), GST_TYPE_CAPS,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
gstelement_class = GST_ELEMENT_CLASS (klass);
gst_element_class_set_details_simple (gstelement_class,
"CapsFilter",
"Generic",
"Pass data without modification, limiting formats",
"David Schleef <ds@schleef.org>");
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&srctemplate));
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&sinktemplate));
trans_class = GST_BASE_TRANSFORM_CLASS (klass);
trans_class->transform_caps =
GST_DEBUG_FUNCPTR (gst_capsfilter_transform_caps);
......@@ -128,7 +124,7 @@ gst_capsfilter_class_init (GstCapsFilterClass * klass)
}
static void
gst_capsfilter_init (GstCapsFilter * filter, GstCapsFilterClass * g_class)
gst_capsfilter_init (GstCapsFilter * filter)
{
GstBaseTransform *trans = GST_BASE_TRANSFORM (filter);
gst_base_transform_set_gap_aware (trans, TRUE);
......
......@@ -111,11 +111,11 @@ gst_fake_sink_state_error_get_type (void)
return fakesink_state_error_type;
}
#define _do_init(bla) \
#define _do_init \
GST_DEBUG_CATEGORY_INIT (gst_fake_sink_debug, "fakesink", 0, "fakesink element");
GST_BOILERPLATE_FULL (GstFakeSink, gst_fake_sink, GstBaseSink,
GST_TYPE_BASE_SINK, _do_init);
#define gst_fake_sink_parent_class parent_class
G_DEFINE_TYPE_WITH_CODE (GstFakeSink, gst_fake_sink, GST_TYPE_BASE_SINK,
_do_init);
static void gst_fake_sink_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec);
......@@ -164,22 +164,6 @@ marshal_VOID__MINIOBJECT_OBJECT (GClosure * closure, GValue * return_value,
g_value_get_object (param_values + 2), data2);
}
static void
gst_fake_sink_base_init (gpointer g_class)
{
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_set_details_simple (gstelement_class,
"Fake Sink",
"Sink",
"Black hole for data",
"Erik Walthinsen <omega@cse.ogi.edu>, "
"Wim Taymans <wim@fluendo.com>, "
"Mr. 'frag-me-more' Vanderwingo <wingo@fluendo.com>");
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&sinktemplate));
}
static void
gst_fake_sink_class_init (GstFakeSinkClass * klass)
{
......@@ -260,6 +244,16 @@ gst_fake_sink_class_init (GstFakeSinkClass * klass)
NULL, NULL, marshal_VOID__MINIOBJECT_OBJECT, G_TYPE_NONE, 2,
GST_TYPE_BUFFER, GST_TYPE_PAD);
gst_element_class_set_details_simple (gstelement_class,
"Fake Sink",
"Sink",
"Black hole for data",
"Erik Walthinsen <omega@cse.ogi.edu>, "
"Wim Taymans <wim@fluendo.com>, "
"Mr. 'frag-me-more' Vanderwingo <wingo@fluendo.com>");
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&sinktemplate));
gstelement_class->change_state =
GST_DEBUG_FUNCPTR (gst_fake_sink_change_state);
......@@ -269,7 +263,7 @@ gst_fake_sink_class_init (GstFakeSinkClass * klass)
}
static void
gst_fake_sink_init (GstFakeSink * fakesink, GstFakeSinkClass * g_class)
gst_fake_sink_init (GstFakeSink * fakesink)
{
fakesink->silent = DEFAULT_SILENT;
fakesink->dump = DEFAULT_DUMP;
......
......@@ -201,11 +201,10 @@ gst_fake_src_filltype_get_type (void)
return fakesrc_filltype_type;
}
#define _do_init(bla) \
#define _do_init \
GST_DEBUG_CATEGORY_INIT (gst_fake_src_debug, "fakesrc", 0, "fakesrc element");
GST_BOILERPLATE_FULL (GstFakeSrc, gst_fake_src, GstBaseSrc, GST_TYPE_BASE_SRC,
_do_init);
#define gst_fake_src_parent_class parent_class
G_DEFINE_TYPE_WITH_CODE (GstFakeSrc, gst_fake_src, GST_TYPE_BASE_SRC, _do_init);
static void gst_fake_src_finalize (GObject * object);
static void gst_fake_src_set_property (GObject * object, guint prop_id,
......@@ -255,27 +254,15 @@ marshal_VOID__MINIOBJECT_OBJECT (GClosure * closure, GValue * return_value,
g_value_get_object (param_values + 2), data2);
}
static void
gst_fake_src_base_init (gpointer g_class)
{
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_set_details_simple (gstelement_class,
"Fake Source",
"Source",
"Push empty (no data) buffers around",
"Erik Walthinsen <omega@cse.ogi.edu>, " "Wim Taymans <wim@fluendo.com>");
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&srctemplate));
}
static void
gst_fake_src_class_init (GstFakeSrcClass * klass)
{
GObjectClass *gobject_class;
GstElementClass *gstelement_class;
GstBaseSrcClass *gstbase_src_class;
gobject_class = G_OBJECT_CLASS (klass);
gstelement_class = GST_ELEMENT_CLASS (klass);
gstbase_src_class = GST_BASE_SRC_CLASS (klass);
gobject_class->finalize = gst_fake_src_finalize;
......@@ -379,6 +366,14 @@ gst_fake_src_class_init (GstFakeSrcClass * klass)
marshal_VOID__MINIOBJECT_OBJECT, G_TYPE_NONE, 2, GST_TYPE_BUFFER,
GST_TYPE_PAD);
gst_element_class_set_details_simple (gstelement_class,
"Fake Source",
"Source",
"Push empty (no data) buffers around",
"Erik Walthinsen <omega@cse.ogi.edu>, " "Wim Taymans <wim@fluendo.com>");
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&srctemplate));
gstbase_src_class->is_seekable = GST_DEBUG_FUNCPTR (gst_fake_src_is_seekable);
gstbase_src_class->start = GST_DEBUG_FUNCPTR (gst_fake_src_start);
gstbase_src_class->stop = GST_DEBUG_FUNCPTR (gst_fake_src_stop);
......@@ -388,7 +383,7 @@ gst_fake_src_class_init (GstFakeSrcClass * klass)
}
static void
gst_fake_src_init (GstFakeSrc * fakesrc, GstFakeSrcClass * g_class)
gst_fake_src_init (GstFakeSrc * fakesrc)
{
fakesrc->output = FAKE_SRC_FIRST_LAST_LOOP;
fakesrc->buffer_count = 0;
......
......@@ -94,23 +94,11 @@ enum
static void gst_fd_sink_uri_handler_init (gpointer g_iface,
gpointer iface_data);
static void
_do_init (GType gst_fd_sink_type)
{
static const GInterfaceInfo urihandler_info = {
gst_fd_sink_uri_handler_init,
NULL,
NULL
};
g_type_add_interface_static (gst_fd_sink_type, GST_TYPE_URI_HANDLER,
&urihandler_info);
#define _do_init \
G_IMPLEMENT_INTERFACE (GST_TYPE_URI_HANDLER, gst_fd_sink_uri_handler_init); \
GST_DEBUG_CATEGORY_INIT (gst_fd_sink__debug, "fdsink", 0, "fdsink element");
}
GST_BOILERPLATE_FULL (GstFdSink, gst_fd_sink, GstBaseSink, GST_TYPE_BASE_SINK,
_do_init);
#define gst_fd_sink_parent_class parent_class
G_DEFINE_TYPE_WITH_CODE (GstFdSink, gst_fd_sink, GST_TYPE_BASE_SINK, _do_init);
static void gst_fd_sink_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec);
......@@ -129,32 +117,28 @@ static gboolean gst_fd_sink_event (GstBaseSink * sink, GstEvent * event);
static gboolean gst_fd_sink_do_seek (GstFdSink * fdsink, guint64 new_offset);
static void
gst_fd_sink_base_init (gpointer g_class)
{
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_set_details_simple (gstelement_class,
"Filedescriptor Sink",
"Sink/File",
"Write data to a file descriptor", "Erik Walthinsen <omega@cse.ogi.edu>");
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&sinktemplate));
}
static void
gst_fd_sink_class_init (GstFdSinkClass * klass)
{
GObjectClass *gobject_class;
GstElementClass *gstelement_class;
GstBaseSinkClass *gstbasesink_class;
gobject_class = G_OBJECT_CLASS (klass);
gstelement_class = GST_ELEMENT_CLASS (klass);
gstbasesink_class = GST_BASE_SINK_CLASS (klass);
gobject_class->set_property = gst_fd_sink_set_property;
gobject_class->get_property = gst_fd_sink_get_property;
gobject_class->dispose = gst_fd_sink_dispose;
gst_element_class_set_details_simple (gstelement_class,
"Filedescriptor Sink",
"Sink/File",
"Write data to a file descriptor", "Erik Walthinsen <omega@cse.ogi.edu>");
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&sinktemplate));
gstbasesink_class->render = GST_DEBUG_FUNCPTR (gst_fd_sink_render);
gstbasesink_class->start = GST_DEBUG_FUNCPTR (gst_fd_sink_start);
gstbasesink_class->stop = GST_DEBUG_FUNCPTR (gst_fd_sink_stop);
......@@ -168,7 +152,7 @@ gst_fd_sink_class_init (GstFdSinkClass * klass)
}
static void
gst_fd_sink_init (GstFdSink * fdsink, GstFdSinkClass * klass)
gst_fd_sink_init (GstFdSink * fdsink)
{
GstPad *pad;
......
......@@ -113,23 +113,11 @@ enum
static void gst_fd_src_uri_handler_init (gpointer g_iface, gpointer iface_data);
static void
_do_init (GType fd_src_type)
{
static const GInterfaceInfo urihandler_info = {
gst_fd_src_uri_handler_init,
NULL,
NULL
};
g_type_add_interface_static (fd_src_type, GST_TYPE_URI_HANDLER,
&urihandler_info);
#define _do_init \
G_IMPLEMENT_INTERFACE (GST_TYPE_URI_HANDLER, gst_fd_src_uri_handler_init); \
GST_DEBUG_CATEGORY_INIT (gst_fd_src_debug, "fdsrc", 0, "fdsrc element");
}
GST_BOILERPLATE_FULL (GstFdSrc, gst_fd_src, GstPushSrc, GST_TYPE_PUSH_SRC,
_do_init);
#define gst_fd_src_parent_class parent_class
G_DEFINE_TYPE_WITH_CODE (GstFdSrc, gst_fd_src, GST_TYPE_PUSH_SRC, _do_init);
static void gst_fd_src_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec);
......@@ -148,27 +136,16 @@ static gboolean gst_fd_src_query (GstBaseSrc * src, GstQuery * query);
static GstFlowReturn gst_fd_src_create (GstPushSrc * psrc, GstBuffer ** outbuf);
static void
gst_fd_src_base_init (gpointer g_class)
{
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_set_details_simple (gstelement_class,
"Filedescriptor Source",
"Source/File",
"Read from a file descriptor", "Erik Walthinsen <omega@cse.ogi.edu>");
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&srctemplate));
}
static void
gst_fd_src_class_init (GstFdSrcClass * klass)
{
GObjectClass *gobject_class;
GstElementClass *gstelement_class;
GstBaseSrcClass *gstbasesrc_class;
GstPushSrcClass *gstpush_src_class;
gobject_class = G_OBJECT_CLASS (klass);
gstelement_class = GST_ELEMENT_CLASS (klass);
gstbasesrc_class = GST_BASE_SRC_CLASS (klass);
gstpush_src_class = GST_PUSH_SRC_CLASS (klass);
......@@ -192,6 +169,13 @@ gst_fd_src_class_init (GstFdSrcClass * klass)
G_MAXUINT64, DEFAULT_TIMEOUT,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
gst_element_class_set_details_simple (gstelement_class,
"Filedescriptor Source",
"Source/File",
"Read from a file descriptor", "Erik Walthinsen <omega@cse.ogi.edu>");
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&srctemplate));
gstbasesrc_class->start = GST_DEBUG_FUNCPTR (gst_fd_src_start);
gstbasesrc_class->stop = GST_DEBUG_FUNCPTR (gst_fd_src_stop);
gstbasesrc_class->unlock = GST_DEBUG_FUNCPTR (gst_fd_src_unlock);
......@@ -205,7 +189,7 @@ gst_fd_src_class_init (GstFdSrcClass * klass)
}
static void
gst_fd_src_init (GstFdSrc * fdsrc, GstFdSrcClass * klass)
gst_fd_src_init (GstFdSrc * fdsrc)
{
fdsrc->new_fd = DEFAULT_FD;
fdsrc->seekable_fd = FALSE;
......
......@@ -173,42 +173,18 @@ static gboolean gst_file_sink_query (GstPad * pad, GstQuery * query);
static void gst_file_sink_uri_handler_init (gpointer g_iface,
gpointer iface_data);
static void
_do_init (GType filesink_type)
{
static const GInterfaceInfo urihandler_info = {
gst_file_sink_uri_handler_init,
NULL,
NULL
};
g_type_add_interface_static (filesink_type, GST_TYPE_URI_HANDLER,
&urihandler_info);
GST_DEBUG_CATEGORY_INIT (gst_file_sink_debug, "filesink", 0,
"filesink element");
}
GST_BOILERPLATE_FULL (GstFileSink, gst_file_sink, GstBaseSink,
GST_TYPE_BASE_SINK, _do_init);
static void
gst_file_sink_base_init (gpointer g_class)
{
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_set_details_simple (gstelement_class,
"File Sink",
"Sink/File", "Write stream to a file",
"Thomas Vander Stichele <thomas at apestaart dot org>");
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&sinktemplate));
}
#define _do_init \
G_IMPLEMENT_INTERFACE (GST_TYPE_URI_HANDLER, gst_file_sink_uri_handler_init); \
GST_DEBUG_CATEGORY_INIT (gst_file_sink_debug, "filesink", 0, "filesink element");
#define gst_file_sink_parent_class parent_class
G_DEFINE_TYPE_WITH_CODE (GstFileSink, gst_file_sink, GST_TYPE_BASE_SINK,
_do_init);
static void
gst_file_sink_class_init (GstFileSinkClass * klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass);
GstBaseSinkClass *gstbasesink_class = GST_BASE_SINK_CLASS (klass);
gobject_class->dispose = gst_file_sink_dispose;
......@@ -244,6 +220,13 @@ gst_file_sink_class_init (GstFileSinkClass * klass)
"Append to an already existing file", DEFAULT_APPEND,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
gst_element_class_set_details_simple (gstelement_class,
"File Sink",
"Sink/File", "Write stream to a file",
"Thomas Vander Stichele <thomas at apestaart dot org>");
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&sinktemplate));
gstbasesink_class->start = GST_DEBUG_FUNCPTR (gst_file_sink_start);
gstbasesink_class->stop = GST_DEBUG_FUNCPTR (gst_file_sink_stop);
gstbasesink_class->render = GST_DEBUG_FUNCPTR (gst_file_sink_render);
......@@ -256,7 +239,7 @@ gst_file_sink_class_init (GstFileSinkClass * klass)
}
static void
gst_file_sink_init (GstFileSink * filesink, GstFileSinkClass * g_class)
gst_file_sink_init (GstFileSink * filesink)
{
GstPad *pad;
......
......@@ -205,44 +205,21 @@ static gboolean gst_file_src_query (GstBaseSrc * src, GstQuery * query);
static void gst_file_src_uri_handler_init (gpointer g_iface,
gpointer iface_data);
static void
_do_init (GType filesrc_type)
{
static const GInterfaceInfo urihandler_info = {
gst_file_src_uri_handler_init,
NULL,
NULL
};
g_type_add_interface_static (filesrc_type, GST_TYPE_URI_HANDLER,
&urihandler_info);
#define _do_init \
G_IMPLEMENT_INTERFACE (GST_TYPE_URI_HANDLER, gst_file_src_uri_handler_init); \
GST_DEBUG_CATEGORY_INIT (gst_file_src_debug, "filesrc", 0, "filesrc element");
}
GST_BOILERPLATE_FULL (GstFileSrc, gst_file_src, GstBaseSrc, GST_TYPE_BASE_SRC,
_do_init);
static void
gst_file_src_base_init (gpointer g_class)
{
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_set_details_simple (gstelement_class,
"File Source",
"Source/File",
"Read from arbitrary point in a file",
"Erik Walthinsen <omega@cse.ogi.edu>");
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&srctemplate));
}
#define gst_file_src_parent_class parent_class
G_DEFINE_TYPE_WITH_CODE (GstFileSrc, gst_file_src, GST_TYPE_BASE_SRC, _do_init);
static void
gst_file_src_class_init (GstFileSrcClass * klass)
{
GObjectClass *gobject_class;
GstElementClass *gstelement_class;
GstBaseSrcClass *gstbasesrc_class;
gobject_class = G_OBJECT_CLASS (klass);
gstelement_class = GST_ELEMENT_CLASS (klass);
gstbasesrc_class = GST_BASE_SRC_CLASS (klass);
gobject_class->set_property = gst_file_src_set_property;
......@@ -300,6 +277,14 @@ gst_file_src_class_init (GstFileSrcClass * klass)
gobject_class->finalize = gst_file_src_finalize;
gst_element_class_set_details_simple (gstelement_class,
"File Source",
"Source/File",
"Read from arbitrary point in a file",
"Erik Walthinsen <omega@cse.ogi.edu>");
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&srctemplate));
gstbasesrc_class->start = GST_DEBUG_FUNCPTR (gst_file_src_start);
gstbasesrc_class->stop = GST_DEBUG_FUNCPTR (gst_file_src_stop);
gstbasesrc_class->is_seekable = GST_DEBUG_FUNCPTR (gst_file_src_is_seekable);
......@@ -314,7 +299,7 @@ gst_file_src_class_init (GstFileSrcClass * klass)
}
static void
gst_file_src_init (GstFileSrc * src, GstFileSrcClass * g_class)
gst_file_src_init (GstFileSrc * src)
{
#ifdef HAVE_MMAP
src->pagesize = getpagesize ();
......
......@@ -106,14 +106,10 @@ GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_ALWAYS,
GST_STATIC_CAPS_ANY);
static void
_do_init (GType type)
{
#define _do_init \
GST_DEBUG_CATEGORY_INIT (gst_funnel_debug, "funnel", 0, "funnel element");
}
GST_BOILERPLATE_FULL (GstFunnel, gst_funnel, GstElement, GST_TYPE_ELEMENT,
_do_init);
#define gst_funnel_parent_class parent_class
G_DEFINE_TYPE_WITH_CODE (GstFunnel, gst_funnel, GST_TYPE_ELEMENT, _do_init);
static GstStateChangeReturn gst_funnel_change_state (GstElement * element,
GstStateChange transition);
......@@ -129,21 +125,6 @@ static GstCaps *gst_funnel_sink_getcaps (GstPad * pad);
static gboolean gst_funnel_src_event (GstPad * pad, GstEvent * event);
static void
gst_funnel_base_init (gpointer g_class)
{
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_set_details_simple (gstelement_class,
"Funnel pipe fitting", "Generic", "N-to-1 pipe fitting",
"Olivier Crete <olivier.crete@collabora.co.uk>");
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&funnel_sink_template));
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&funnel_src_template));
}
static void
gst_funnel_dispose (GObject * object)
{
......@@ -170,6 +151,15 @@ gst_funnel_class_init (GstFunnelClass * klass)
gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_funnel_dispose);
gst_element_class_set_details_simple (gstelement_class,
"Funnel pipe fitting", "Generic", "N-to-1 pipe fitting",
"Olivier Crete <olivier.crete@collabora.co.uk>");
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&funnel_sink_template));
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&funnel_src_template));
gstelement_class->request_new_pad =
GST_DEBUG_FUNCPTR (gst_funnel_request_new_pad);
gstelement_class->release_pad = GST_DEBUG_FUNCPTR (gst_funnel_release_pad);
......@@ -177,7 +167,7 @@ gst_funnel_class_init (GstFunnelClass * klass)
}
static void
gst_funnel_init (GstFunnel * funnel, GstFunnelClass * g_class)
gst_funnel_init (GstFunnel * funnel)
{
funnel->srcpad = gst_pad_new_from_static_template (&funnel_src_template,
"src");
......
......@@ -91,11 +91,11 @@ enum
};
#define _do_init(bla) \
#define _do_init \
GST_DEBUG_CATEGORY_INIT (gst_identity_debug, "identity", 0, "identity element");
GST_BOILERPLATE_FULL (GstIdentity, gst_identity, GstBaseTransform,
GST_TYPE_BASE_TRANSFORM, _do_init);
#define gst_identity_parent_class parent_class
G_DEFINE_TYPE_WITH_CODE (GstIdentity, gst_identity, GST_TYPE_BASE_TRANSFORM,
_do_init);
static void gst_identity_finalize (GObject * object);
static void gst_identity_set_property (GObject * object, guint prop_id,
......@@ -116,21 +116,6 @@ static guint gst_identity_signals[LAST_SIGNAL] = { 0 };
static GParamSpec *pspec_last_message = NULL;
static void
gst_identity_base_init (gpointer g_class)
{
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_set_details_simple (gstelement_class,
"Identity",
"Generic",
"Pass data without modification", "Erik Walthinsen <omega@cse.ogi.edu>");
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&srctemplate));
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&sinktemplate));
}
static void
gst_identity_finalize (GObject * object)
{
......@@ -179,9 +164,11 @@ static void
gst_identity_class_init (GstIdentityClass * klass)
{
GObjectClass *gobject_class;
GstElementClass *gstelement_class;
GstBaseTransformClass *gstbasetrans_class;
gobject_class = G_OBJECT_CLASS (klass);
gstelement_class = GST_ELEMENT_CLASS (klass);
gstbasetrans_class = GST_BASE_TRANSFORM_CLASS (klass);
gobject_class->set_property = gst_identity_set_property;
......@@ -271,6 +258,15 @@ gst_identity_class_init (GstIdentityClass * klass)