<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hello Tom<div class=""><br class=""></div><div class="">Some answers inline.<br class=""><div class=""><div><br class=""></div><div>Michael</div><div><br class=""><blockquote type="cite" class=""><div class="">On 26 Jan 2022, at 15:54, tom via gstreamer-devel <<a href="mailto:gstreamer-devel@lists.freedesktop.org" class="">gstreamer-devel@lists.freedesktop.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div class="">I would like to wrap a part of my pipeline in a single bin so I can wrap some of the data-probes in an element and we can use it as a single element using gst-launch-1.0.</div><div class=""><br class=""></div><div class="">What base class should I use ? It's not really a Transformation , more of a Bin.</div><div class="">So i used GstBin as the base 'class', setup my elements in the init(), connected up the data-probes</div></div></div></div></blockquote><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div class="">but when I gst-inspect-1.0 the element it doesn't pickup the sink and src pads of the internal pipeline.</div><div class=""><br class=""></div></div></div></div></blockquote><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div class="">1. Am i heading in the right direction with using GstBin ?</div></div></div></div></blockquote><div><br class=""></div><div>Yes, implementing GstBin sounds right.</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div class="">2. Is there an example of a custom bin that i can look at ?</div></div></div></div></blockquote><div><br class=""></div><div>The <a href="https://github.com/GStreamer/gst-plugins-good/blob/master/gst/autodetect/gstautodetect.c" class="">gstautodetect.c</a> element will build a bin based on the plug-ins installed in your system. Here’s <a href="https://github.com/RidgeRun/gst-inference/blob/master/gst/inferenceutils/gstinferencecrop.cc" class="">another example</a> which builds the internal pipeline in the init, and installs a probe to the internal pad, pretty much like you want to. </div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div class="">3. Do i need to create my own sink and source pads manually and link them to the internal pipeline or can I use the pads from the ends of the internal pipeline directly ?</div></div></div></div></blockquote><div><br class=""></div><div>You can only link pads that are in the same hierarchy. The internal pads, being inside a bin, cannot be linked with the rest of the pipeline. You need to create a ghost pad, and assign the internal pad as the ghost pad’s target. Take a look at <a href="https://gstreamer.freedesktop.org/documentation/gstreamer/gstghostpad.html?gi-language=c#gst_ghost_pad_new" class="">gst_ghost_pad_new()</a>, Having the ghost pad associated to the respective target, you can the add the ghost pad to your bin.</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div class=""><br class=""></div><div class="">thanks,</div><div class="">tom</div><div class=""><br class=""></div></div></div>
</div></blockquote></div><br class=""></div></div></body></html>