gst/: Make it possible (and recommended) to set element details and add pad templates...
authorSebastian Dröge <slomo@circular-chaos.org>
Sun, 3 Feb 2008 10:48:01 +0000 (10:48 +0000)
committerSebastian Dröge <slomo@circular-chaos.org>
Sun, 3 Feb 2008 10:48:01 +0000 (10:48 +0000)
commit86e45df8607e2b60cb9ef08bcf90443b2894f615
tree26662077c41f7f3fb879d553f72997d83b45ef13
parentd7a94887b55eef5040943ca4adf26b64ebfe6afa
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.
ChangeLog
common
gst/gstelement.c
gst/gstpadtemplate.c
tests/check/gst/gstelement.c