Hi Ross,

I have an RTSP server application that uses a woefully out-of-date version of 
live555. I'm in the process of updating to the latest version of live555 and 
have come across an API change that puzzles me.

Basically, I have a thread that generates H.264 video and feeds it through a 
pipe to a ByteStreamFileSource instance in the RTSP thread.  The 
ByteStreamFileSource instance is created by an OnDemandServerMediaSubsession 
subclass that passes the pipe's read file descriptor into the 
ByteStreamFileSource through its createNew() function.  ByteStreamFileSource 
used to have a constructor and createNew() parameter called deleteFidOnClose 
that let me manage the file descriptor.  That parameter has now gone away and 
the ByteStreamFileSource instance closes the file descriptor in its desctructor.

Because of this change, when a DESCRIBE message is received and a temporary 
OnDemandServerMediaSubsession subclass object (and thus ByteStreamFileSource 
object) is created and destroyed, it ends up closing the read end of my pipe. 
This means that when the actual objects are created after the SETUP message, my 
other thread gets broken pipe errors when it tries to write to the pipe.

I'm able to get around this by checking for a clientSessionId of 0 in my 
SubclassOnDemandServerMediaSubsession::createNewStreamSource() function. In 
this case I don't use the real file descriptor, but this seems like a hack to 
me.  Is there a better way to prevent my file descriptor from getting closed 
before I want it to?

I appreciate your help and all the work you put into this great library.

Thanks,
Tyson
_______________________________________________
live-devel mailing list
[email protected]
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to