summaryrefslogtreecommitdiff
path: root/gst/gstpadtemplate.c
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2008-02-03 10:48:01 +0000
committerSebastian Dröge <slomo@circular-chaos.org>2008-02-03 10:48:01 +0000
commit86e45df8607e2b60cb9ef08bcf90443b2894f615 (patch)
tree26662077c41f7f3fb879d553f72997d83b45ef13 /gst/gstpadtemplate.c
parentd7a94887b55eef5040943ca4adf26b64ebfe6afa (diff)
gst/: Make it possible (and recommended) to set element details and add pad templates in the class_init functions by ...
Original commit message from CVS: * gst/gstelement.c: (gst_element_base_class_init), (gst_element_class_add_pad_template): * gst/gstpadtemplate.c: Make it possible (and recommended) to set element details and add pad templates in the class_init functions by copying the details/pad templates in GstElement's base_init. Also make it possible to replace existing pad templates by adding a new one with the same name. This was done in a hackish fashion in same elements before already. Don't reference pad templates that are added a second time. A new pad template has a refcount of one and is not floating anymore and to be owned by the element's class. Make this more explicit by mentioning it in the docs of gst_element_class_add_pad_template(). These changes are backwards compatible. Fixes bug #491501. * tests/check/gst/gstelement.c: Add unit test for setting element details, adding pad templates and replacing them in a subclass.
Diffstat (limited to 'gst/gstpadtemplate.c')
-rw-r--r--gst/gstpadtemplate.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gst/gstpadtemplate.c b/gst/gstpadtemplate.c
index 2f12f1c5d..fb1be4956 100644
--- a/gst/gstpadtemplate.c
+++ b/gst/gstpadtemplate.c
@@ -78,13 +78,13 @@
* </example>
*
* The following example shows you how to add the padtemplate to an
- * element class, this is usually done in the base_init of the class:
+ * element class, this is usually done in the class_init of the class:
* <informalexample>
* <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);
*
* gst_element_class_add_pad_template (gstelement_class,
* gst_static_pad_template_get (&amp;my_template));