GNOME Bugzilla – Bug 347385
[ghostpad] gst_ghost_pad_new_from_template() method
Last modified: 2006-08-31 11:02:02 UTC
+++ This bug was initially created as a clone of Bug #347384 +++ GhostPads shouldn't set templates automatically. It's up to whoever is creating/adding the ghostpad to set padtemplates if needed. There should be a convenience function for people wanting to set a padtemplate on a new ghostpad.
Reformulation: There should be a method to create a ghostpad FROM a padtemplate.
Created attachment 69099 [details] [review] Patch that adds methods to create ghostpads from templates This patch creates a gst_ghost_pad_new_full() method (which is not exported) which is reused in all creation functions. This means template property can go back to being a CONSTRUCT_ONLY property. The two new creation functions are: GstPad* gst_ghost_pad_new_from_template (const gchar *name, GstPad * target, GstPadTemplate * template); GstPad* gst_ghost_pad_new_no_target_from_template (const gchar *name, GstPadTemplate * template);
Created attachment 71955 [details] [review] Updated version, with unit-tests and doc fixes contains more comments, fixes get_caps issues. Added unit tests.
2006-08-31 Edward Hervey <edward@fluendo.com> * docs/gst/gstreamer-sections.txt: * gst/gstghostpad.c: (gst_proxy_pad_do_getcaps), (gst_proxy_pad_do_setcaps), (gst_proxy_pad_set_target_unlocked), (gst_proxy_pad_dispose), (gst_ghost_pad_new_full), (gst_ghost_pad_new_no_target), (gst_ghost_pad_new), (gst_ghost_pad_new_from_template), (gst_ghost_pad_new_no_target_from_template): * gst/gstghostpad.h: Refactored *_new() functions. Templates are now used as a g_object_new() parameter. Use template in _do_getcaps() if we don't have a target. Small documentation cleanups. Added two new constructors: gst_ghost_pad_new_from_template() gst_ghost_pad_new_no_target_from_template() * tests/check/gst/gstghostpad.c: (GST_START_TEST), (gst_ghost_pad_suite): Added tests for new ghostpad instanciation functions. API additions: gst_ghost_pad_new_from_template, gst_ghost_pad_new_no_target_from_template