gst/gstutils.h (GST_BOILERPLATE_FULL): Prototype instance_init as having two argument...
authorAndy Wingo <wingo@pobox.com>
Sun, 28 Aug 2005 17:45:58 +0000 (17:45 +0000)
committerAndy Wingo <wingo@pobox.com>
Sun, 28 Aug 2005 17:45:58 +0000 (17:45 +0000)
Original commit message from CVS:
2005-08-28  Andy Wingo  <wingo@pobox.com>

* 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.

22 files changed:
ChangeLog
gst/base/gstadapter.c
gst/elements/gstbufferstore.c
gst/elements/gstcapsfilter.c
gst/elements/gstfakesink.c
gst/elements/gstfakesrc.c
gst/elements/gstfilesink.c
gst/elements/gstfilesrc.c
gst/elements/gstidentity.c
gst/elements/gsttee.c
gst/elements/gsttypefindelement.c
gst/gstutils.h
libs/gst/base/gstadapter.c
plugins/elements/gstbufferstore.c
plugins/elements/gstcapsfilter.c
plugins/elements/gstfakesink.c
plugins/elements/gstfakesrc.c
plugins/elements/gstfilesink.c
plugins/elements/gstfilesrc.c
plugins/elements/gstidentity.c
plugins/elements/gsttee.c
plugins/elements/gsttypefindelement.c

index b89e791..ab53022 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2005-08-28  Andy Wingo  <wingo@pobox.com>
+
+       * 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  <ensonic@users.sf.net>
 
        * docs/design/part-messages.txt:
index c9c8565..94104de 100644 (file)
@@ -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;
index d9f1d40..8433c3c 100644 (file)
@@ -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;
 }
index 8e1bde2..3799dda 100644 (file)
@@ -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 ();
index 30e046a..643a759 100644 (file)
@@ -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;
index c0e5edf..0bfdf45 100644 (file)
@@ -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;
index 570ce35..1c62378 100644 (file)
@@ -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;
 
index 406fb1e..6e177f1 100644 (file)
@@ -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 ();
index f99e884..08c4ec1 100644 (file)
@@ -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);
 
index dc24fdd..f022f10 100644 (file)
@@ -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),
index a22e2c7..157a9d5 100644 (file)
@@ -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 =
index 18cb595..7bb16d1 100644 (file)
@@ -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,          \
index c9c8565..94104de 100644 (file)
@@ -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;
index d9f1d40..8433c3c 100644 (file)
@@ -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;
 }
index 8e1bde2..3799dda 100644 (file)
@@ -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 ();
index 30e046a..643a759 100644 (file)
@@ -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;
index c0e5edf..0bfdf45 100644 (file)
@@ -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;
index 570ce35..1c62378 100644 (file)
@@ -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;
 
index 406fb1e..6e177f1 100644 (file)
@@ -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 ();
index f99e884..08c4ec1 100644 (file)
@@ -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);
 
index dc24fdd..f022f10 100644 (file)
@@ -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),
index a22e2c7..157a9d5 100644 (file)
@@ -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 =