GNOME Bugzilla – Bug 767451
Add helper to create src/sink ghost pad on a GstBin
Last modified: 2018-11-03 12:34:58 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.
Having something more generic seems useful, but it should also come with variants to specify which pads IMHO.
Created attachment 329464 [details] [review] utils: Add gst_bin_add_ghost_pads()
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?
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?
-- 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.