From: Andy Wingo Date: Sun, 28 Aug 2005 17:45:58 +0000 (+0000) Subject: gst/gstutils.h (GST_BOILERPLATE_FULL): Prototype instance_init as having two argument... X-Git-Tag: RELEASE-0_9_2~53 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=944491ab452d38cd86c8a12da058dcebcd0c491f;p=platform%2Fupstream%2Fgstreamer.git gst/gstutils.h (GST_BOILERPLATE_FULL): Prototype instance_init as having two arguments instead of just one. Allows su... Original commit message from CVS: 2005-08-28 Andy Wingo * gst/gstutils.h (GST_BOILERPLATE_FULL): Prototype instance_init as having two arguments instead of just one. Allows superclasses to access information on subclasses -- see the terrible for() loop in gtype.c:g_type_create_instance for the reason why. All callers changed. --- diff --git a/ChangeLog b/ChangeLog index b89e791..ab53022 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2005-08-28 Andy Wingo + + * gst/gstutils.h (GST_BOILERPLATE_FULL): Prototype instance_init + as having two arguments instead of just one. Allows superclasses + to access information on subclasses -- see the terrible for() loop + in gtype.c:g_type_create_instance for the reason why. All callers + changed. + 2005-08-27 Stefan Kost * docs/design/part-messages.txt: diff --git a/gst/base/gstadapter.c b/gst/base/gstadapter.c index c9c8565..94104de 100644 --- a/gst/base/gstadapter.c +++ b/gst/base/gstadapter.c @@ -89,7 +89,7 @@ gst_adapter_class_init (GstAdapterClass * klass) } static void -gst_adapter_init (GstAdapter * adapter) +gst_adapter_init (GstAdapter * adapter, GstAdapterClass * g_class) { adapter->assembled_data = g_malloc (DEFAULT_SIZE); adapter->assembled_size = DEFAULT_SIZE; diff --git a/gst/elements/gstbufferstore.c b/gst/elements/gstbufferstore.c index d9f1d40..8433c3c 100644 --- a/gst/elements/gstbufferstore.c +++ b/gst/elements/gstbufferstore.c @@ -104,7 +104,7 @@ gst_buffer_store_class_init (GstBufferStoreClass * store_class) store_class->buffer_added = gst_buffer_store_add_buffer_func; } static void -gst_buffer_store_init (GstBufferStore * store) +gst_buffer_store_init (GstBufferStore * store, GstBufferStoreClass * g_class) { store->buffers = NULL; } diff --git a/gst/elements/gstcapsfilter.c b/gst/elements/gstcapsfilter.c index 8e1bde2..3799dda 100644 --- a/gst/elements/gstcapsfilter.c +++ b/gst/elements/gstcapsfilter.c @@ -138,7 +138,7 @@ gst_capsfilter_class_init (GstCapsFilterClass * klass) } static void -gst_capsfilter_init (GstCapsFilter * filter) +gst_capsfilter_init (GstCapsFilter * filter, GstCapsFilterClass * g_class) { gst_base_transform_set_passthrough (GST_BASE_TRANSFORM (filter), TRUE); filter->filter_caps = gst_caps_new_any (); diff --git a/gst/elements/gstfakesink.c b/gst/elements/gstfakesink.c index 30e046a..643a759 100644 --- a/gst/elements/gstfakesink.c +++ b/gst/elements/gstfakesink.c @@ -214,7 +214,7 @@ gst_fake_sink_class_init (GstFakeSinkClass * klass) } static void -gst_fake_sink_init (GstFakeSink * fakesink) +gst_fake_sink_init (GstFakeSink * fakesink, GstFakeSinkClass * g_class) { fakesink->silent = DEFAULT_SILENT; fakesink->dump = DEFAULT_DUMP; diff --git a/gst/elements/gstfakesrc.c b/gst/elements/gstfakesrc.c index c0e5edf..0bfdf45 100644 --- a/gst/elements/gstfakesrc.c +++ b/gst/elements/gstfakesrc.c @@ -320,7 +320,7 @@ gst_fake_src_class_init (GstFakeSrcClass * klass) } static void -gst_fake_src_init (GstFakeSrc * fakesrc) +gst_fake_src_init (GstFakeSrc * fakesrc, GstFakeSrcClass * g_class) { fakesrc->output = FAKE_SRC_FIRST_LAST_LOOP; fakesrc->segment_start = -1; diff --git a/gst/elements/gstfilesink.c b/gst/elements/gstfilesink.c index 570ce35..1c62378 100644 --- a/gst/elements/gstfilesink.c +++ b/gst/elements/gstfilesink.c @@ -148,7 +148,7 @@ gst_file_sink_class_init (GstFileSinkClass * klass) } static void -gst_file_sink_init (GstFileSink * filesink) +gst_file_sink_init (GstFileSink * filesink, GstFileSinkClass * g_class) { GstPad *pad; diff --git a/gst/elements/gstfilesrc.c b/gst/elements/gstfilesrc.c index 406fb1e..6e177f1 100644 --- a/gst/elements/gstfilesrc.c +++ b/gst/elements/gstfilesrc.c @@ -222,7 +222,7 @@ gst_file_src_class_init (GstFileSrcClass * klass) } static void -gst_file_src_init (GstFileSrc * src) +gst_file_src_init (GstFileSrc * src, GstFileSrcClass * g_class) { #ifdef HAVE_MMAP src->pagesize = getpagesize (); diff --git a/gst/elements/gstidentity.c b/gst/elements/gstidentity.c index f99e884..08c4ec1 100644 --- a/gst/elements/gstidentity.c +++ b/gst/elements/gstidentity.c @@ -217,7 +217,7 @@ gst_identity_class_init (GstIdentityClass * klass) } static void -gst_identity_init (GstIdentity * identity) +gst_identity_init (GstIdentity * identity, GstIdentityClass * g_class) { gst_base_transform_set_passthrough (GST_BASE_TRANSFORM (identity), TRUE); diff --git a/gst/elements/gsttee.c b/gst/elements/gsttee.c index dc24fdd..f022f10 100644 --- a/gst/elements/gsttee.c +++ b/gst/elements/gsttee.c @@ -137,7 +137,7 @@ gst_tee_class_init (GstTeeClass * klass) } static void -gst_tee_init (GstTee * tee) +gst_tee_init (GstTee * tee, GstTeeClass * g_class) { tee->sinkpad = gst_pad_new_from_template (gst_static_pad_template_get (&sinktemplate), diff --git a/gst/elements/gsttypefindelement.c b/gst/elements/gsttypefindelement.c index a22e2c7..157a9d5 100644 --- a/gst/elements/gsttypefindelement.c +++ b/gst/elements/gsttypefindelement.c @@ -200,7 +200,8 @@ gst_type_find_element_class_init (GstTypeFindElementClass * typefind_class) GST_DEBUG_FUNCPTR (gst_type_find_element_change_state); } static void -gst_type_find_element_init (GstTypeFindElement * typefind) +gst_type_find_element_init (GstTypeFindElement * typefind, + GstTypeFindElementClass * g_class) { /* sinkpad */ typefind->sink = diff --git a/gst/gstutils.h b/gst/gstutils.h index 18cb595..7bb16d1 100644 --- a/gst/gstutils.h +++ b/gst/gstutils.h @@ -50,7 +50,8 @@ void gst_print_element_args (GString *buf, gint indent, GstElement *element) \ static void type_as_function ## _base_init (gpointer g_class); \ static void type_as_function ## _class_init (type ## Class *g_class);\ -static void type_as_function ## _init (type *object); \ +static void type_as_function ## _init (type *object, \ + type ## Class *g_class);\ static parent_type ## Class *parent_class = NULL; \ static void \ type_as_function ## _class_init_trampoline (gpointer g_class, \ diff --git a/libs/gst/base/gstadapter.c b/libs/gst/base/gstadapter.c index c9c8565..94104de 100644 --- a/libs/gst/base/gstadapter.c +++ b/libs/gst/base/gstadapter.c @@ -89,7 +89,7 @@ gst_adapter_class_init (GstAdapterClass * klass) } static void -gst_adapter_init (GstAdapter * adapter) +gst_adapter_init (GstAdapter * adapter, GstAdapterClass * g_class) { adapter->assembled_data = g_malloc (DEFAULT_SIZE); adapter->assembled_size = DEFAULT_SIZE; diff --git a/plugins/elements/gstbufferstore.c b/plugins/elements/gstbufferstore.c index d9f1d40..8433c3c 100644 --- a/plugins/elements/gstbufferstore.c +++ b/plugins/elements/gstbufferstore.c @@ -104,7 +104,7 @@ gst_buffer_store_class_init (GstBufferStoreClass * store_class) store_class->buffer_added = gst_buffer_store_add_buffer_func; } static void -gst_buffer_store_init (GstBufferStore * store) +gst_buffer_store_init (GstBufferStore * store, GstBufferStoreClass * g_class) { store->buffers = NULL; } diff --git a/plugins/elements/gstcapsfilter.c b/plugins/elements/gstcapsfilter.c index 8e1bde2..3799dda 100644 --- a/plugins/elements/gstcapsfilter.c +++ b/plugins/elements/gstcapsfilter.c @@ -138,7 +138,7 @@ gst_capsfilter_class_init (GstCapsFilterClass * klass) } static void -gst_capsfilter_init (GstCapsFilter * filter) +gst_capsfilter_init (GstCapsFilter * filter, GstCapsFilterClass * g_class) { gst_base_transform_set_passthrough (GST_BASE_TRANSFORM (filter), TRUE); filter->filter_caps = gst_caps_new_any (); diff --git a/plugins/elements/gstfakesink.c b/plugins/elements/gstfakesink.c index 30e046a..643a759 100644 --- a/plugins/elements/gstfakesink.c +++ b/plugins/elements/gstfakesink.c @@ -214,7 +214,7 @@ gst_fake_sink_class_init (GstFakeSinkClass * klass) } static void -gst_fake_sink_init (GstFakeSink * fakesink) +gst_fake_sink_init (GstFakeSink * fakesink, GstFakeSinkClass * g_class) { fakesink->silent = DEFAULT_SILENT; fakesink->dump = DEFAULT_DUMP; diff --git a/plugins/elements/gstfakesrc.c b/plugins/elements/gstfakesrc.c index c0e5edf..0bfdf45 100644 --- a/plugins/elements/gstfakesrc.c +++ b/plugins/elements/gstfakesrc.c @@ -320,7 +320,7 @@ gst_fake_src_class_init (GstFakeSrcClass * klass) } static void -gst_fake_src_init (GstFakeSrc * fakesrc) +gst_fake_src_init (GstFakeSrc * fakesrc, GstFakeSrcClass * g_class) { fakesrc->output = FAKE_SRC_FIRST_LAST_LOOP; fakesrc->segment_start = -1; diff --git a/plugins/elements/gstfilesink.c b/plugins/elements/gstfilesink.c index 570ce35..1c62378 100644 --- a/plugins/elements/gstfilesink.c +++ b/plugins/elements/gstfilesink.c @@ -148,7 +148,7 @@ gst_file_sink_class_init (GstFileSinkClass * klass) } static void -gst_file_sink_init (GstFileSink * filesink) +gst_file_sink_init (GstFileSink * filesink, GstFileSinkClass * g_class) { GstPad *pad; diff --git a/plugins/elements/gstfilesrc.c b/plugins/elements/gstfilesrc.c index 406fb1e..6e177f1 100644 --- a/plugins/elements/gstfilesrc.c +++ b/plugins/elements/gstfilesrc.c @@ -222,7 +222,7 @@ gst_file_src_class_init (GstFileSrcClass * klass) } static void -gst_file_src_init (GstFileSrc * src) +gst_file_src_init (GstFileSrc * src, GstFileSrcClass * g_class) { #ifdef HAVE_MMAP src->pagesize = getpagesize (); diff --git a/plugins/elements/gstidentity.c b/plugins/elements/gstidentity.c index f99e884..08c4ec1 100644 --- a/plugins/elements/gstidentity.c +++ b/plugins/elements/gstidentity.c @@ -217,7 +217,7 @@ gst_identity_class_init (GstIdentityClass * klass) } static void -gst_identity_init (GstIdentity * identity) +gst_identity_init (GstIdentity * identity, GstIdentityClass * g_class) { gst_base_transform_set_passthrough (GST_BASE_TRANSFORM (identity), TRUE); diff --git a/plugins/elements/gsttee.c b/plugins/elements/gsttee.c index dc24fdd..f022f10 100644 --- a/plugins/elements/gsttee.c +++ b/plugins/elements/gsttee.c @@ -137,7 +137,7 @@ gst_tee_class_init (GstTeeClass * klass) } static void -gst_tee_init (GstTee * tee) +gst_tee_init (GstTee * tee, GstTeeClass * g_class) { tee->sinkpad = gst_pad_new_from_template (gst_static_pad_template_get (&sinktemplate), diff --git a/plugins/elements/gsttypefindelement.c b/plugins/elements/gsttypefindelement.c index a22e2c7..157a9d5 100644 --- a/plugins/elements/gsttypefindelement.c +++ b/plugins/elements/gsttypefindelement.c @@ -200,7 +200,8 @@ gst_type_find_element_class_init (GstTypeFindElementClass * typefind_class) GST_DEBUG_FUNCPTR (gst_type_find_element_change_state); } static void -gst_type_find_element_init (GstTypeFindElement * typefind) +gst_type_find_element_init (GstTypeFindElement * typefind, + GstTypeFindElementClass * g_class) { /* sinkpad */ typefind->sink =