> On Aug 25, 2020, at 9:51 PM, Simon Brown <sbr...@microvideo.co.uk> wrote: > > On 25/08/2020 10:44, Ross Finlayson wrote: >>> It would transpire that the onDemandRTSP server doesn't open stdin or pull >>> data from it until it gets an RTSP request from the outside world. But our >>> encoder is pushing data out on stdout continuously. >> Why is it doing that? Is it doing non-blocking writes to ’stdout’? If so, >> then it probably shouldn’t. If you do blocking writes to ’stdout’, and >> nothing is currently reading from the other side, then your encoder will >> just block until the other side needs data. > > It does non-blocking writes because otherwise everything else stalls. We're > only sending one of the streams to live555, the other streams can't stop just > because no-one is pulling the RTSP stream.
Then you could restructure your application as multiple threads (or perhaps multiple processes, using the “tee” utility). > Is there any way for the onDemandRTSPServer to signal when it has a request > for a stream? Yes, of course. You could write your own input source class, and use that, instead of reading from ’stdin’. See http://live555.com/liveMedia/faq.html#liveInput-unicast This, however, is a lot more work than simply having the server read from ‘stdin’ (especially since you already seem to have that mostly working). (In any case, this will be my last posting on this topic.) Ross Finlayson Live Networks, Inc. http://www.live555.com/ _______________________________________________ live-devel mailing list live-devel@lists.live555.com http://lists.live555.com/mailman/listinfo/live-devel