On 24/08/2020 15:08, Ross Finlayson wrote:
Is there any reason why or how test testOnDemandRTSPServer would be blocking my 
main program from running?
No, but it sounds like there’s something wrong in the way that you’re “spawning 
the testOnDemandRTSPServer from within my main program and connect pipes to it 
and then pushing the data into this pipe”.

You should make sure that you can walk, before you try running.

Why not simply do the following:
        1/ Have your encoder simply output to ‘stdout’, rather than trying to 
spawn “testOnDemandRTSPServer”, and creating pipes itself.  Then run, from the 
command line (again, make sure that each step works OK before moving to the 
next step):
        2/ your-encoder-program > source.ts
        3/ your-modified-testOnDemandRTSPServer < source.ts  (make sure that 
RTSP clients (“openRTSP” and “VLC”) can receive data OK from this)
        4/ your-encoder-program | your-modified-testOnDemandRTSPServer  (again, 
make sure that RTSP clients can receive data OK from this)
Thanks for your help.  I have a slight problem in that stdout gets sent all sorts of other garbage, but I have redirected the encoder output to stderr, and if I run "my-encoder 2> source.ts" and then "testOnDemandRTSPServer < source.ts" it plays.  But as soon as I try step 4, I can receive my usual UDP stream up until I enable the output to stderr, and I can view the RTSP stream, but only for a few seconds.  I will see what is involved in removing all the stdout output and then using that instead, because redirecting stderr to the stdin isn't a simple process either.
In other words, why bother having your program go through all the work of 
setting up/writing to a pipe, and spawning “testOnDemandRTSPServer”? Instead, 
simply do all of this from your shell's command line.  That’s one of the good 
things about Unix.


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
Simon Brown

--
Microvideo
Copley Hill Business Park
Cambridge Road
Babraham
CB22 3GN

tel: +44 1223 834119

_______________________________________________
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to