Don't use base_init where not absolutely necessary. For example it's not necessary anymore for adding pad templates o...

Original commit message from CVS:
* gst/gstbin.c: (gst_bin_get_type), (gst_bin_class_init):
* gst/gstpipeline.c: (gst_pipeline_get_type),
(gst_pipeline_class_init):
* libs/gst/base/gstbasesink.c: (gst_base_sink_get_type),
(gst_base_sink_class_init):
* libs/gst/base/gstbasesrc.c: (gst_base_src_get_type),
(gst_base_src_class_init):
* libs/gst/base/gstbasetransform.c: (gst_base_transform_get_type),
(gst_base_transform_class_init):
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_base_init),
(gst_collect_pads_class_init):
* libs/gst/base/gstdataqueue.c: (gst_data_queue_get_type):
* libs/gst/net/gstnettimeprovider.c:
(gst_net_time_provider_base_init),
(gst_net_time_provider_class_init):
* plugins/elements/gstcapsfilter.c: (gst_capsfilter_base_init),
(gst_capsfilter_class_init):
* plugins/elements/gstfakesink.c: (gst_fake_sink_base_init),
(gst_fake_sink_class_init):
* plugins/elements/gstfakesrc.c: (gst_fake_src_base_init),
(gst_fake_src_class_init):
* plugins/elements/gstfdsink.c: (gst_fd_sink_base_init),
(gst_fd_sink_class_init):
* plugins/elements/gstfdsrc.c: (gst_fd_src_base_init),
(gst_fd_src_class_init):
* plugins/elements/gstfilesink.c: (gst_file_sink_base_init),
(gst_file_sink_class_init):
* plugins/elements/gstfilesrc.c: (gst_file_src_base_init),
(gst_file_src_class_init):
* plugins/elements/gstidentity.c: (gst_identity_base_init),
(gst_identity_class_init):
* plugins/elements/gstmultiqueue.c: (gst_multi_queue_base_init),
(gst_multi_queue_class_init):
* plugins/elements/gstqueue.c: (gst_queue_base_init),
(gst_queue_class_init):
* plugins/elements/gsttee.c: (gst_tee_base_init),
(gst_tee_class_init):
* plugins/elements/gsttypefindelement.c:
(gst_type_find_element_base_init),
(gst_type_find_element_class_init):
Don't use base_init where not absolutely necessary. For example it's
not necessary anymore for adding pad templates or setting element
details.
Leave empty base_init functions in several places as GST_BOILERPLATE
still defines and uses them.
This commit is contained in:
Sebastian Dröge 2008-02-03 12:04:37 +00:00
parent 86e45df860
commit 9db28f8537
21 changed files with 187 additions and 180 deletions

View file

@ -1,3 +1,52 @@
2008-02-03 Sebastian Dröge <slomo@circular-chaos.org>
* gst/gstbin.c: (gst_bin_get_type), (gst_bin_class_init):
* gst/gstpipeline.c: (gst_pipeline_get_type),
(gst_pipeline_class_init):
* libs/gst/base/gstbasesink.c: (gst_base_sink_get_type),
(gst_base_sink_class_init):
* libs/gst/base/gstbasesrc.c: (gst_base_src_get_type),
(gst_base_src_class_init):
* libs/gst/base/gstbasetransform.c: (gst_base_transform_get_type),
(gst_base_transform_class_init):
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_base_init),
(gst_collect_pads_class_init):
* libs/gst/base/gstdataqueue.c: (gst_data_queue_get_type):
* libs/gst/net/gstnettimeprovider.c:
(gst_net_time_provider_base_init),
(gst_net_time_provider_class_init):
* plugins/elements/gstcapsfilter.c: (gst_capsfilter_base_init),
(gst_capsfilter_class_init):
* plugins/elements/gstfakesink.c: (gst_fake_sink_base_init),
(gst_fake_sink_class_init):
* plugins/elements/gstfakesrc.c: (gst_fake_src_base_init),
(gst_fake_src_class_init):
* plugins/elements/gstfdsink.c: (gst_fd_sink_base_init),
(gst_fd_sink_class_init):
* plugins/elements/gstfdsrc.c: (gst_fd_src_base_init),
(gst_fd_src_class_init):
* plugins/elements/gstfilesink.c: (gst_file_sink_base_init),
(gst_file_sink_class_init):
* plugins/elements/gstfilesrc.c: (gst_file_src_base_init),
(gst_file_src_class_init):
* plugins/elements/gstidentity.c: (gst_identity_base_init),
(gst_identity_class_init):
* plugins/elements/gstmultiqueue.c: (gst_multi_queue_base_init),
(gst_multi_queue_class_init):
* plugins/elements/gstqueue.c: (gst_queue_base_init),
(gst_queue_class_init):
* plugins/elements/gsttee.c: (gst_tee_base_init),
(gst_tee_class_init):
* plugins/elements/gsttypefindelement.c:
(gst_type_find_element_base_init),
(gst_type_find_element_class_init):
Don't use base_init where not absolutely necessary. For example it's
not necessary anymore for adding pad templates or setting element
details.
Leave empty base_init functions in several places as GST_BOILERPLATE
still defines and uses them.
2008-02-03 Sebastian Dröge <slomo@circular-chaos.org>
* gst/gstelement.c: (gst_element_base_class_init),

View file

@ -268,7 +268,6 @@ enum
/* FILL ME */
};
static void gst_bin_base_init (gpointer g_class);
static void gst_bin_class_init (GstBinClass * klass);
static void gst_bin_init (GstBin * bin);
static void gst_bin_child_proxy_init (gpointer g_iface, gpointer iface_data);
@ -290,7 +289,7 @@ gst_bin_get_type (void)
if (G_UNLIKELY (gst_bin_type == 0)) {
static const GTypeInfo bin_info = {
sizeof (GstBinClass),
gst_bin_base_init,
NULL,
NULL,
(GClassInitFunc) gst_bin_class_init,
NULL,
@ -327,14 +326,6 @@ gst_bin_get_type (void)
return gst_bin_type;
}
static void
gst_bin_base_init (gpointer g_class)
{
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_set_details (gstelement_class, &gst_bin_details);
}
static GstObject *
gst_bin_child_proxy_get_child_by_index (GstChildProxy * child_proxy,
guint index)
@ -438,6 +429,8 @@ gst_bin_class_init (GstBinClass * klass)
GST_DEBUG_FUNCPTR (gst_bin_restore_thyself);
#endif
gst_element_class_set_details (gstelement_class, &gst_bin_details);
gstelement_class->change_state =
GST_DEBUG_FUNCPTR (gst_bin_change_state_func);
gstelement_class->get_state = GST_DEBUG_FUNCPTR (gst_bin_get_state_func);

View file

@ -128,7 +128,6 @@ struct _GstPipelinePrivate
};
static void gst_pipeline_base_init (gpointer g_class);
static void gst_pipeline_class_init (gpointer g_class, gpointer class_data);
static void gst_pipeline_init (GTypeInstance * instance, gpointer g_class);
@ -156,7 +155,7 @@ gst_pipeline_get_type (void)
if (G_UNLIKELY (pipeline_type == 0)) {
static const GTypeInfo pipeline_info = {
sizeof (GstPipelineClass),
gst_pipeline_base_init,
NULL,
NULL,
(GClassInitFunc) gst_pipeline_class_init,
NULL,
@ -176,14 +175,6 @@ gst_pipeline_get_type (void)
return pipeline_type;
}
static void
gst_pipeline_base_init (gpointer g_class)
{
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_set_details (gstelement_class, &gst_pipeline_details);
}
static void
gst_pipeline_class_init (gpointer g_class, gpointer class_data)
{
@ -231,6 +222,8 @@ gst_pipeline_class_init (gpointer g_class, gpointer class_data)
gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_pipeline_dispose);
gst_element_class_set_details (gstelement_class, &gst_pipeline_details);
gstelement_class->change_state =
GST_DEBUG_FUNCPTR (gst_pipeline_change_state);
gstelement_class->provide_clock =

View file

@ -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:
* <programlisting>
* 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"
@ -251,7 +251,6 @@ enum
static GstElementClass *parent_class = NULL;
static void gst_base_sink_base_init (gpointer g_class);
static void gst_base_sink_class_init (GstBaseSinkClass * klass);
static void gst_base_sink_init (GstBaseSink * trans, gpointer g_class);
static void gst_base_sink_finalize (GObject * object);
@ -264,7 +263,7 @@ gst_base_sink_get_type (void)
if (G_UNLIKELY (base_sink_type == 0)) {
static const GTypeInfo base_sink_info = {
sizeof (GstBaseSinkClass),
(GBaseInitFunc) gst_base_sink_base_init,
NULL,
NULL,
(GClassInitFunc) gst_base_sink_class_init,
NULL,
@ -316,13 +315,6 @@ static gboolean gst_base_sink_is_too_late (GstBaseSink * basesink,
GstMiniObject * obj, GstClockTime start, GstClockTime stop,
GstClockReturn status, GstClockTimeDiff jitter);
static void
gst_base_sink_base_init (gpointer g_class)
{
GST_DEBUG_CATEGORY_INIT (gst_base_sink_debug, "basesink", 0,
"basesink element");
}
static void
gst_base_sink_class_init (GstBaseSinkClass * klass)
{
@ -332,6 +324,9 @@ gst_base_sink_class_init (GstBaseSinkClass * klass)
gobject_class = G_OBJECT_CLASS (klass);
gstelement_class = GST_ELEMENT_CLASS (klass);
GST_DEBUG_CATEGORY_INIT (gst_base_sink_debug, "basesink", 0,
"basesink element");
g_type_class_add_private (klass, sizeof (GstBaseSinkPrivate));
parent_class = g_type_class_peek_parent (klass);

View file

@ -125,14 +125,14 @@
* <para>
* There is only support in #GstBaseSrc for exactly one source pad, which
* should be named "src". A source implementation (subclass of #GstBaseSrc)
* should install a pad template in its base_init function, like so:
* should install a pad template in its class_init function, like so:
* </para>
* <para>
* <programlisting>
* 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);
* // srctemplate should be a #GstStaticPadTemplate with direction
* // #GST_PAD_SRC and name "src"
* gst_element_class_add_pad_template (gstelement_class,
@ -250,7 +250,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);
@ -264,7 +263,7 @@ gst_base_src_get_type (void)
if (G_UNLIKELY (base_src_type == 0)) {
static const GTypeInfo base_src_info = {
sizeof (GstBaseSrcClass),
(GBaseInitFunc) gst_base_src_base_init,
NULL,
NULL,
(GClassInitFunc) gst_base_src_class_init,
NULL,
@ -319,12 +318,6 @@ static GstFlowReturn gst_base_src_pad_get_range (GstPad * pad, guint64 offset,
static GstFlowReturn gst_base_src_get_range (GstBaseSrc * src, guint64 offset,
guint length, GstBuffer ** buf);
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)
{
@ -334,6 +327,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);

View file

@ -240,7 +240,6 @@ struct _GstBaseTransformPrivate
static GstElementClass *parent_class = NULL;
static void gst_base_transform_base_init (gpointer g_class);
static void gst_base_transform_class_init (GstBaseTransformClass * klass);
static void gst_base_transform_init (GstBaseTransform * trans,
GstBaseTransformClass * klass);
@ -255,7 +254,7 @@ gst_base_transform_get_type (void)
if (!base_transform_type) {
static const GTypeInfo base_transform_info = {
sizeof (GstBaseTransformClass),
(GBaseInitFunc) gst_base_transform_base_init,
NULL,
NULL,
(GClassInitFunc) gst_base_transform_class_init,
NULL,
@ -303,13 +302,6 @@ static GstFlowReturn gst_base_transform_buffer_alloc (GstPad * pad,
/* static guint gst_base_transform_signals[LAST_SIGNAL] = { 0 }; */
static void
gst_base_transform_base_init (gpointer g_class)
{
GST_DEBUG_CATEGORY_INIT (gst_base_transform_debug, "basetransform", 0,
"basetransform element");
}
static void
gst_base_transform_finalize (GObject * object)
{
@ -329,6 +321,9 @@ gst_base_transform_class_init (GstBaseTransformClass * klass)
gobject_class = G_OBJECT_CLASS (klass);
GST_DEBUG_CATEGORY_INIT (gst_base_transform_debug, "basetransform", 0,
"basetransform element");
g_type_class_add_private (klass, sizeof (GstBaseTransformPrivate));
parent_class = g_type_class_peek_parent (klass);

View file

@ -92,8 +92,7 @@ static void unref_data (GstCollectData * data);
static void
gst_collect_pads_base_init (gpointer g_class)
{
GST_DEBUG_CATEGORY_INIT (collect_pads_debug, "collectpads", 0,
"GstCollectPads");
/* Do nothing here */
}
static void
@ -101,6 +100,9 @@ gst_collect_pads_class_init (GstCollectPadsClass * klass)
{
GObjectClass *gobject_class = (GObjectClass *) klass;
GST_DEBUG_CATEGORY_INIT (collect_pads_debug, "collectpads", 0,
"GstCollectPads");
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_collect_pads_finalize);
}

View file

@ -87,7 +87,6 @@ enum
q->cur_level.time, \
q->queue->length)
static void gst_data_queue_base_init (GstDataQueueClass * klass);
static void gst_data_queue_class_init (GstDataQueueClass * klass);
static void gst_data_queue_init (GstDataQueue * queue);
static void gst_data_queue_finalize (GObject * object);
@ -108,7 +107,7 @@ gst_data_queue_get_type (void)
if (!queue_type) {
static const GTypeInfo queue_info = {
sizeof (GstDataQueueClass),
(GBaseInitFunc) gst_data_queue_base_init,
NULL,
NULL,
(GClassInitFunc) gst_data_queue_class_init,
NULL,
@ -130,13 +129,6 @@ gst_data_queue_get_type (void)
return queue_type;
}
static void
gst_data_queue_base_init (GstDataQueueClass * klass)
{
/* Do we need anything here ?? */
return;
}
static void
gst_data_queue_class_init (GstDataQueueClass * klass)
{

View file

@ -136,7 +136,7 @@ inet_aton (const char *c, struct in_addr *paddr)
static void
gst_net_time_provider_base_init (gpointer g_class)
{
g_assert (sizeof (GstClockTime) == 8);
/* Do nothing here */
}
static void
@ -146,6 +146,8 @@ gst_net_time_provider_class_init (GstNetTimeProviderClass * klass)
gobject_class = G_OBJECT_CLASS (klass);
g_assert (sizeof (GstClockTime) == 8);
gobject_class->finalize = gst_net_time_provider_finalize;
gobject_class->set_property = gst_net_time_provider_set_property;
gobject_class->get_property = gst_net_time_provider_get_property;

View file

@ -62,7 +62,6 @@ GST_DEBUG_CATEGORY_STATIC (gst_capsfilter_debug);
GST_BOILERPLATE_FULL (GstCapsFilter, gst_capsfilter, GstBaseTransform,
GST_TYPE_BASE_TRANSFORM, _do_init);
static void gst_capsfilter_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec);
static void gst_capsfilter_get_property (GObject * object, guint prop_id,
@ -81,17 +80,6 @@ static gboolean gst_capsfilter_transform_size (GstBaseTransform * trans,
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
@ -99,6 +87,7 @@ gst_capsfilter_class_init (GstCapsFilterClass * klass)
{
GObjectClass *gobject_class;
GstBaseTransformClass *trans_class;
GstElementClass *gstelement_class;
gobject_class = G_OBJECT_CLASS (klass);
gobject_class->set_property = gst_capsfilter_set_property;
@ -111,6 +100,17 @@ gst_capsfilter_class_init (GstCapsFilterClass * klass)
"Setting this property takes a reference to the supplied GstCaps "
"object."), GST_TYPE_CAPS, G_PARAM_READWRITE));
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_capsfilter_transform_caps;
trans_class->transform_ip = gst_capsfilter_transform_ip;

View file

@ -129,17 +129,6 @@ static guint gst_fake_sink_signals[LAST_SIGNAL] = { 0 };
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
@ -220,6 +209,16 @@ gst_fake_sink_class_init (GstFakeSinkClass * klass)
NULL, NULL, gst_marshal_VOID__OBJECT_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);

View file

@ -229,15 +229,6 @@ static guint gst_fake_src_signals[LAST_SIGNAL] = { 0 };
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
@ -337,6 +328,14 @@ gst_fake_src_class_init (GstFakeSrcClass * klass)
gst_marshal_VOID__OBJECT_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);

View file

@ -140,20 +140,13 @@ static gboolean gst_fd_sink_unlock_stop (GstBaseSink * basesink);
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 = GST_ELEMENT_CLASS (klass);
GstBaseSinkClass *gstbasesink_class;
gobject_class = G_OBJECT_CLASS (klass);
@ -163,6 +156,13 @@ gst_fd_sink_class_init (GstFdSinkClass * klass)
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->get_times = NULL;
gstbasesink_class->render = GST_DEBUG_FUNCPTR (gst_fd_sink_render);
gstbasesink_class->start = GST_DEBUG_FUNCPTR (gst_fd_sink_start);

View file

@ -123,14 +123,6 @@ 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
@ -156,6 +148,13 @@ gst_fd_src_class_init (GstFdSrcClass * klass)
g_param_spec_int ("fd", "fd", "An open file descriptor to read from",
0, G_MAXINT, 0, G_PARAM_READWRITE));
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);

View file

@ -137,19 +137,13 @@ GST_BOILERPLATE_FULL (GstFileSink, gst_file_sink, GstBaseSink,
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 <thomas@apestaart.org>");
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&sinktemplate));
}
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;
@ -171,6 +165,12 @@ gst_file_sink_class_init (GstFileSinkClass * klass)
"Size of buffer in number of bytes for line or full buffer-mode", 0,
G_MAXUINT, DEFAULT_BUFFER_SIZE, G_PARAM_READWRITE));
gst_element_class_set_details_simple (gstelement_class,
"File Sink",
"Sink/File", "Write stream to a file", "Thomas <thomas@apestaart.org>");
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&sinktemplate));
gstbasesink_class->get_times = NULL;
gstbasesink_class->start = GST_DEBUG_FUNCPTR (gst_file_sink_start);
gstbasesink_class->stop = GST_DEBUG_FUNCPTR (gst_file_sink_stop);

View file

@ -180,15 +180,6 @@ GST_BOILERPLATE_FULL (GstFileSrc, gst_file_src, GstBaseSrc, GST_TYPE_BASE_SRC,
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));
}
static void
@ -250,6 +241,14 @@ gst_file_src_class_init (GstFileSrcClass * klass)
gobject_class->finalize = GST_DEBUG_FUNCPTR (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);

View file

@ -115,16 +115,6 @@ static guint gst_identity_signals[LAST_SIGNAL] = { 0 };
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
@ -259,6 +249,15 @@ gst_identity_class_init (GstIdentityClass * klass)
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_identity_finalize);
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));
gstbasetrans_class->event = GST_DEBUG_FUNCPTR (gst_identity_event);
gstbasetrans_class->transform_ip =
GST_DEBUG_FUNCPTR (gst_identity_transform_ip);

View file

@ -249,15 +249,6 @@ static guint gst_multi_queue_signals[LAST_SIGNAL] = { 0 };
static void
gst_multi_queue_base_init (gpointer g_class)
{
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_set_details_simple (gstelement_class,
"MultiQueue",
"Generic", "Multiple data queue", "Edward Hervey <edward@fluendo.com>");
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&sinktemplate));
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&srctemplate));
}
static void
@ -312,6 +303,14 @@ gst_multi_queue_class_init (GstMultiQueueClass * klass)
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_multi_queue_finalize);
gst_element_class_set_details_simple (gstelement_class,
"MultiQueue",
"Generic", "Multiple data queue", "Edward Hervey <edward@fluendo.com>");
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&sinktemplate));
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&srctemplate));
gstelement_class->request_new_pad =
GST_DEBUG_FUNCPTR (gst_multi_queue_request_new_pad);
gstelement_class->release_pad =

View file

@ -235,15 +235,6 @@ static guint gst_queue_signals[LAST_SIGNAL] = { 0 };
static void
gst_queue_base_init (gpointer g_class)
{
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_set_details_simple (gstelement_class,
"Queue",
"Generic", "Simple data queue", "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
@ -354,6 +345,14 @@ gst_queue_class_init (GstQueueClass * klass)
/* set several parent class virtual functions */
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_queue_finalize);
gst_element_class_set_details_simple (gstelement_class,
"Queue",
"Generic", "Simple data queue", "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));
gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_queue_change_state);
}

View file

@ -123,19 +123,6 @@ static GstFlowReturn gst_tee_src_get_range (GstPad * pad, guint64 offset,
static void
gst_tee_base_init (gpointer g_class)
{
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_set_details_simple (gstelement_class,
"Tee pipe fitting",
"Generic",
"1-to-N pipe fitting",
"Erik Walthinsen <omega@cse.ogi.edu>, " "Wim Taymans <wim@fluendo.com>");
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&sinktemplate));
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&tee_src_template));
push_data = g_quark_from_static_string ("tee-push-data");
}
static void
@ -188,6 +175,18 @@ gst_tee_class_init (GstTeeClass * klass)
"Behavior of tee in pull mode", GST_TYPE_TEE_PULL_MODE,
DEFAULT_PULL_MODE, G_PARAM_CONSTRUCT | G_PARAM_READWRITE));
gst_element_class_set_details_simple (gstelement_class,
"Tee pipe fitting",
"Generic",
"1-to-N pipe fitting",
"Erik Walthinsen <omega@cse.ogi.edu>, " "Wim Taymans <wim@fluendo.com>");
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&sinktemplate));
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&tee_src_template));
push_data = g_quark_from_static_string ("tee-push-data");
gstelement_class->request_new_pad =
GST_DEBUG_FUNCPTR (gst_tee_request_new_pad);
gstelement_class->release_pad = GST_DEBUG_FUNCPTR (gst_tee_release_pad);

View file

@ -161,17 +161,6 @@ gst_type_find_element_have_type (GstTypeFindElement * typefind,
static void
gst_type_find_element_base_init (gpointer g_class)
{
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_set_details_simple (gstelement_class,
"TypeFind",
"Generic",
"Finds the media type of a stream",
"Benjamin Otte <in7y118@public.uni-hamburg.de>");
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&type_find_element_src_template));
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&type_find_element_sink_template));
}
static void
@ -216,6 +205,16 @@ gst_type_find_element_class_init (GstTypeFindElementClass * typefind_class)
gst_marshal_VOID__UINT_BOXED, G_TYPE_NONE, 2,
G_TYPE_UINT, GST_TYPE_CAPS | G_SIGNAL_TYPE_STATIC_SCOPE);
gst_element_class_set_details_simple (gstelement_class,
"TypeFind",
"Generic",
"Finds the media type of a stream",
"Benjamin Otte <in7y118@public.uni-hamburg.de>");
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&type_find_element_src_template));
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&type_find_element_sink_template));
gstelement_class->change_state =
GST_DEBUG_FUNCPTR (gst_type_find_element_change_state);
}