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 767451 - Add helper to create src/sink ghost pad on a GstBin
Add helper to create src/sink ghost pad on a GstBin
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
unspecified
Other Linux
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-06-09 13:29 UTC by Xavier Claessens
Modified: 2018-11-03 12:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
utils: Add gst_bin_add_ghost_pads() (4.37 KB, patch)
2016-06-09 13:36 UTC, Xavier Claessens
reviewed Details | Review

Description Xavier Claessens 2016-06-09 13:29:30 UTC
gst_parse_bin_from_description() already have code to create a src/sink ghost pad for the simple case where there is only one unlinked src/sink. I think it can be useful to expose that part as its own method.
Comment 1 Sebastian Dröge (slomo) 2016-06-09 13:32:20 UTC
Having something more generic seems useful, but it should also come with variants to specify which pads IMHO.
Comment 2 Xavier Claessens 2016-06-09 13:36:31 UTC
Created attachment 329464 [details] [review]
utils: Add gst_bin_add_ghost_pads()
Comment 3 Sebastian Dröge (slomo) 2016-06-09 13:38:45 UTC
Review of attachment 329464 [details] [review]:

::: gst/gstutils.c
@@ +3142,3 @@
+ * Only a maximum of one ghost pad for each direction will be created; if you
+ * expect multiple unlinked source pads or multiple unlinked sink pads and want
+ * them all ghosted, you will have to create the ghost pads yourself.

This seems inconvenient and decreasing the usefulness a bit. Maybe

> gst_bin_add_src_ghost_pad(), gst_bin_add_sink_ghost_pad(), gst_bin_add_ghost_pads()

where the latter adds ghostpads for everything it possibly finds?
Comment 4 Xavier Claessens 2016-06-09 15:43:32 UTC
The problem when you add more than one src/sink is you need to document how it generated names. What's easy with my version is you know it's always going to be "src" and "sink" which is what you often need.

That's probably the reason why gst_parse_bin_from_description() doesn't do that already?
Comment 5 GStreamer system administrator 2018-11-03 12:34:58 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/175.