<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 6, 2017 at 5:17 PM, Sebastian Dröge <span dir="ltr"><<a href="mailto:sebastian@centricular.com" target="_blank">sebastian@centricular.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail-HOEnZb"><div class="gmail-h5">
<br>
</div></div>As both elements are at the same level of the bin hierarchy, annotation<br>
element would never see any messages from motion detector. Only the<br>
surrounding bin would see messages.<br></blockquote><div> </div><div>yes.<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
And the surrounding bin is exactly the "element" that is created by the<br>
RTSP media factory, and you can return your bin subclass there that is<br>
catching messages of its child elements (like the motion detector).<br></blockquote><div><br></div><div>This element is created by gst_parse_launch_full with GST_PARSE_FLAG_PLACE_IN_BIN.</div><div>Should I then modify grammar.tab.c to add my custom flag GST_PARSE_FLAG_PLACE_IN_MY_BIN which would return a "MyBin" instead of "GstBin" ?</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
A better approach might be to place the motion detector in front of the<br>
annotation element, so that it can be to information directly on its<br>
output buffers (GstMeta e.g.) and let the annotation element directly<br>
read it from there instead of having yet another way of communication.<br></blockquote><div><br></div><div>So then the motion detector would act as a passthrough with my custom metadata ?<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Alternatively you could also let the motion detection element know<br>
about the annotation element and have them communicate via direct<br>
function calls.<br></blockquote><div><br></div><div>Yes but I would need to implement my own inter-thread communication ? <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="gmail-HOEnZb"><div class="gmail-h5"><br>
-<br></div></div></blockquote><div>Thanks for your help. <br></div></div></div></div>