gst_child_proxy interface

philippe renon philippe_renon at yahoo.fr
Tue Sep 26 07:13:13 UTC 2017


Hi,
Getting elements by name is not reliable unless you set the element names yourself.As you observed each element potentially has its own naming scheme.
Look at the GstBin functions for better alternatives : https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBin.html
For example you can get elements by interface with gst_bin_get_by_interface().
Or you can connect to the "element-added" signal (in GstBin again) to be notified of elements being added and do your logic then.

Philippe. 

    Le Mardi 26 septembre 2017 5h31, jmz <jmzheng at gmail.com> a écrit :
 

 Hi

I found why the gst_child_proxy_get() does not work with "h264parse::name."
The child's name should be h264parse0, not h264parse. However, if the child
is avdec_h264, its name is avdec_h264-0. How can I know a child's name is
child-name0 or child-name-0? A working way is to add "0" or "-0" to the
child's name according to the element factory name.

Another question is how to check whether an element (e.g. h264parse) exists
in decodebin. I can use gst_child_proxy_get_child_by_name () to check if an
object is returned for the given name. Is there another better way to do
this?
 
Thanks




--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170926/e38de64e/attachment.html>


More information about the gstreamer-devel mailing list