<div dir="auto">As requested a toy example,<div dir="auto">Here we see that the audio-changed emit never activates the connect, maybe because it emits before the video has began playing?</div><div dir="auto"><br></div><div dir="auto">I'm probably doing something very wrong </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 17 Dec 2020, 11:24 Michael Johnson, <<a href="mailto:liquidmikerrs@gmail.com">liquidmikerrs@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">Do you have a link to a video that has multiple audio streams for the test case, I'm only finding single audio stream files </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 17 Dec 2020, 11:02 Sebastian Dröge, <<a href="mailto:sebastian@centricular.com" target="_blank" rel="noreferrer">sebastian@centricular.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>On Thu, 2020-12-17 at 10:46 +0000, Michael Johnson wrote:</div><blockquote type="cite" style="margin:0 0 0 .8ex;border-left:2px #729fcf solid;padding-left:1ex"><div dir="auto">Another point here, connecting to the audio-stream signal and printing the current-audio yields -1 until I physically close the window when it gets the correct audio stream here</div></blockquote><div><br></div><div>That seems wrong, please provide a testcase for that.</div><div><br></div><blockquote type="cite" style="margin:0 0 0 .8ex;border-left:2px #729fcf solid;padding-left:1ex"><div dir="auto"><div dir="auto">Also, I imagine when I want to bind changing stream to a key press I need to emit this signal to be caught. But I can't access any data structures from the callback, so it'll always chose a constant stream. Am I missing something? here </div></div></blockquote><div><br></div><div>You can pass any heap allocated data without references to stack memory into the signal handler closure.</div><div><br></div><div>A common pattern would be to store your state in a std::sync::Arc to give it reference counting, and use a std::sync::Mutex for getting interior mutability of whatever state you need to change.</div><div><br></div><div><span><pre>-- <br></pre><div style="width:71ch">Sebastian Dröge, Centricular Ltd · <a href="http://www.centricular.com" rel="noreferrer noreferrer" target="_blank">https://www.centricular.com</a></div><div style="width:71ch"><br></div></span></div></div>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" rel="noreferrer noreferrer" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer noreferrer noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div>
</blockquote></div>