bin: Add method to find by element factory name
A common use case of a dynamically built pipeline is that you want to
(conditionally) find a certain element, e.g. the rtpbin
s in a
uridecodebin
. If that element has a fixed name inside its parent bin
(and only has a single instance) this can be easily done by
gst_bin_get_by_name()
.
If there are multiple instances of the element however, you can only use
gst_bin_iterate_all_by_interface()
, but this doesn't work if you don't
have the specific GType
(which is often the case, due to plugins being
dynamically loaded). As such, a last fallback is to use the well-known
name of the element factory (in case of our example, "rtpbin"
).