After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 347385 - [ghostpad] gst_ghost_pad_new_from_template() method
[ghostpad] gst_ghost_pad_new_from_template() method
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Urgent enhancement
: 0.10.10
Assigned To: Edward Hervey
GStreamer Maintainers
Depends on: 347384
Reported: 2006-07-13 10:22 UTC by Edward Hervey
Modified: 2006-08-31 11:02 UTC
See Also:
GNOME target: ---
GNOME version: ---

Patch that adds methods to create ghostpads from templates (4.80 KB, patch)
2006-07-18 10:23 UTC, Edward Hervey
none Details | Review
Updated version, with unit-tests and doc fixes (14.21 KB, patch)
2006-08-31 10:42 UTC, Edward Hervey
committed Details | Review

Description Edward Hervey 2006-07-13 10:22:13 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.
Comment 1 Edward Hervey 2006-07-13 10:26:13 UTC

  There should be a method to create a ghostpad FROM a padtemplate.
Comment 2 Edward Hervey 2006-07-18 10:23:24 UTC
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);
Comment 3 Edward Hervey 2006-08-31 10:42:01 UTC
Created attachment 71955 [details] [review]
Updated version, with unit-tests and doc fixes

contains more comments, fixes get_caps issues.
Added unit tests.
Comment 4 Edward Hervey 2006-08-31 11:02:02 UTC
2006-08-31  Edward Hervey  <>

        * 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/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:
        * tests/check/gst/gstghostpad.c: (GST_START_TEST),
        Added tests for new ghostpad instanciation functions.

        API additions: gst_ghost_pad_new_from_template,