<div dir="ltr"><div>I would probably use a mutex that gets unlocked once you receive the state change message of your bin in the pipeline bus. </div><div><br></div><div>1 - lock</div><div>2 - add the bin to the tee</div><div>3 - lock - this will block, until you get the unlock from the state change message.</div><div>4 - unlock again</div><div><br></div><div>Cheers</div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-09-17 22:24 GMT+02:00 Stirling Westrup <span dir="ltr"><<a href="mailto:swestrup@gmail.com" target="_blank">swestrup@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>I have a worker thread which is attempting to add another output bin to an output tee on a playing pipeline. When it changes the output bin's state (via gst_element_sync_state_with_parent), it gets a TRUE result, and if I do nothing else, the newly added output works correctly.<br><br></div>However, if I call gst_element_get_state to wait for the transition to finish, it *always* times out, no matter how long the timeout. My Logs show that the state change only ever completes AFTER gst_element_get_state has returned.<br><br></div>I can only imagine that some sort of lock is being held somewhere which is preventing the state change to complete while the worker thread is waiting.<br><br></div>Is there any good way to wait upon the state change that DOES work? I really do need to know when the new part of the pipeline is actually in the new state.<span class="HOEnZb"><font color="#888888"><br clear="all"><div><div><div><div><br>-- <br><div>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></div></div></font></span></div>
<br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br></div>