gst_bin_get_by_name with a prefix?

Juan Navarro juan.navarro at gmx.es
Tue May 7 22:31:15 UTC 2019


Hi,

is there anything like gst_bin_get_by_name() but that accepts a prefix?
Searching strictly by name falls short really soon, and given that the
default behavior is to add a number after the element names ("mp4mux0"),
it would make sense that there is already a function like that, but I
cannot find anything similar.

being able to find by prefix would overcome changes such as this:
https://github.com/GStreamer/gst-plugins-bad/commit/d2ef3a4c19a84e45f1e43fecf931b4bcc5008433

which breaks finding the elements by name, something that gets done very
commonly in GStreamer, such as in here:
https://github.com/Kurento/kms-elements/blob/41992175288a7b918f5e6461d2688df83f92b048/src/gst-plugins/webrtcendpoint/kmswebrtctransportsink.c#L57

I guess it's possible to just iterate manually over all bin elements and
check the name prefixes, but it would be handy of such function already
existed somewhere in GStreamer...

Regards,
Juan


More information about the gstreamer-devel mailing list