<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Apr 29, 2015 at 1:59 PM, Yogesh Tyagi <span dir="ltr"><<a href="mailto:yogesh.bit2006@gmail.com" target="_blank">yogesh.bit2006@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>Is it possible to broadcast a custom event in gstreamer so that it reaches all the downstream and upstream elements?</div><div><br></div><div>I want to keep a variable in one element and whenever this variable is updated, I want to generate an event which would carry the updated value of this variable to all the elements in pipeline so that these elements can update their private copy of variable.</div></div></blockquote><div><br></div></div>You CAN define custom bidirectional events, but I'm not sure how well they'd propagate. I'd hope they would reach every element, but I can imagine piplelines where that wouldn't work. Things like this:<br><br></div><div class="gmail_extra"><span style="font-family:monospace,monospace"> +--- aud ! aud ! aud ---+<br></span></div><div class="gmail_extra"><span style="font-family:monospace,monospace">src---< >---snk<br clear="all"></span></div><div class="gmail_extra"><span style="font-family:monospace,monospace"> +--- vid ! [vid] ! vid ---+</span><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">So, if you have two parallel processing pipes (audio, and video, for example) and the <span style="font-family:monospace,monospace">[vid]</span> element sends out a bidirectional event, the <span style="font-family:monospace,monospace">src</span> and <span style="font-family:monospace,monospace">snk</span> elements will see it, but I doubt any of the <span style="font-family:monospace,monospace">aud</span> elements will.<br><br></div><div class="gmail_extra">If that's a problem then I recommend that the element that needs to change the variable sends out a signal that the main program is looking for. When it gets it, it sends an event through the pipeline from one end (src, for example) that DOES reach all the elements.<br><br></div><div class="gmail_extra">-- <br><div class="gmail_signature">Stirling Westrup<br>Programmer, Entrepreneur.<br><a href="https://www.linkedin.com/e/fpf/77228" target="_blank">https://www.linkedin.com/e/fpf/77228</a><br><a href="http://www.linkedin.com/in/swestrup" target="_blank">http://www.linkedin.com/in/swestrup</a><br><a href="http://technaut.livejournal.com" target="_blank">http://technaut.livejournal.com</a><br><a href="http://sourceforge.net/users/stirlingwestrup" target="_blank">http://sourceforge.net/users/stirlingwestrup</a></div>
</div></div>