<div dir="ltr">Hi,<div style>I am maintainer of gmrender-resurrect [1], a UPnP renderer (forked from the dormant 'gmrender' project). It is using gstreamer as backend.</div><div style><br></div><div style>Using the gstreamer "playbin" feature to set the next URI in an "about-to-finish" callback, this UPnP renderer successfully implements gapless playback, alas, not without trouble.</div>
<div style><br></div><div style>It turns out, that playing gapless with inputs from HTTP-URLs is leaking threads, up to the point that things stop working. This is with gstreamer-0.10. With gstreamer-1.0 setting HTTP URLs in the "about-to-finish" callback does not seem to work at all.</div>
<div style><br></div><div style>This _does_ work with local file-URIs, so I believe this has to do with different handling of network resources vs. local resources, i.e. buffering, probably a separate thread handling the network input (and it would explain why this hasn't been noticed before, because the usual use-case is to read from files).</div>
<div style><br></div><div style>To reproduce, I created simplified test-code including Makefile and test-sound in this public git repository that illustrates the behavior:</div><div style><br></div><div style> <a href="https://github.com/hzeller/gstreamer-gapless-test">https://github.com/hzeller/gstreamer-gapless-test</a></div>
<div style><br></div><div style><div>All it does is to re-set the original URI back once the "about-to-finish" callback is called ... and exhibiting the described behavior:</div><div><div> - gstreamer-0.1: runs out of threads on gapless playing URIs</div>
<div> - gstreamer-1.0: does not handle well having the URI set in about-to-finish callback.</div></div><div style> - both work with file URIs</div><div><br></div></div><div style>Instructions to reproduce are under</div>
<div style> <a href="https://github.com/hzeller/gstreamer-gapless-test/blob/master/README.md">https://github.com/hzeller/gstreamer-gapless-test/blob/master/README.md</a><br></div><div style><br></div><div style>Maybe, this is a usage error, but I suspect it to be a bug. If you can confirm that this _should_ work, then I am happy to file a bug, and probably dig into the code to help working on a fix.</div>
<div style><br></div><div style>Thanks,</div><div style> Henner.</div><div style><br></div><div style>[1] <a href="https://github.com/hzeller/gmrender-resurrect">https://github.com/hzeller/gmrender-resurrect</a></div></div>