<html><head></head><body><div style="color:#000; background-color:#fff; font-family:lucida console, sans-serif;font-size:13px"><div id="yui_3_16_0_ym19_1_1506409506496_6853">Hi,</div><div id="yui_3_16_0_ym19_1_1506409506496_6854"><br></div><div id="yui_3_16_0_ym19_1_1506409506496_6855">Getting elements by name is not reliable unless you set the element names yourself.</div><div id="yui_3_16_0_ym19_1_1506409506496_6856">As you observed each element potentially has its own naming scheme.</div><div id="yui_3_16_0_ym19_1_1506409506496_6857"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1506409506496_6858">Look at the GstBin functions for better alternatives : <a href="https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBin.html" class="" id="yui_3_16_0_ym19_1_1506409506496_6935">https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBin.html</a><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1506409506496_7006">For example you can get elements by interface with gst_bin_get_by_interface().</div><div dir="ltr" id="yui_3_16_0_ym19_1_1506409506496_7182"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1506409506496_7267">Or you can connect to the "element-added" signal (in GstBin again) to be notified of elements being added and do your logic then.<br></div><div id="yui_3_16_0_ym19_1_1506409506496_7056"><span><br></span></div><div id="yui_3_16_0_ym19_1_1506409506496_7118"><span>Philippe.</span></div> <div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: lucida console, sans-serif; font-size: 13px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"><font size="2" face="Arial"> Le Mardi 26 septembre 2017 5h31, jmz <jmzheng@gmail.com> a écrit :<br></font></div>  <br><br> <div class="y_msg_container"><div dir="ltr">Hi<br clear="none"><br clear="none">I found why the gst_child_proxy_get() does not work with "h264parse::name."<br clear="none">The child's name should be h264parse0, not h264parse. However, if the child<br clear="none">is avdec_h264, its name is avdec_h264-0. How can I know a child's name is<br clear="none">child-name0 or child-name-0? A working way is to add "0" or "-0" to the<br clear="none">child's name according to the element factory name.<br clear="none"><br clear="none">Another question is how to check whether an element (e.g. h264parse) exists<br clear="none">in decodebin. I can use gst_child_proxy_get_child_by_name () to check if an<br clear="none">object is returned for the given name. Is there another better way to do<br clear="none">this?<div class="yqt8421623504" id="yqtfd99937"><br clear="none"> <br clear="none">Thanks<br clear="none"><br clear="none"><br clear="none"><br clear="none"><br clear="none">--<br clear="none">Sent from: <a shape="rect" href="http://gstreamer-devel.966125.n4.nabble.com/" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/</a><br clear="none">_______________________________________________<br clear="none">gstreamer-devel mailing list<br clear="none"><a shape="rect" ymailto="mailto:gstreamer-devel@lists.freedesktop.org" href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br clear="none"><a shape="rect" href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br clear="none"></div></div><br><br></div>  </div> </div>  </div></div></body></html>