The key to understanding your problem is this line:

> "FramedSource[0x2493050]::getNextFrame(): attempting to read more than once 
> at the same time!”

What’s happening (according to the stack trace) is that the “FramedSource” 
object that’s being fed into the “H264VideoStreamDiscreteFramer” object is 
being read from more than once at the same time.  In this case, this is the 
“MediaSubsession”s “readSource()”.

You’re problem is that you’re setting up a RTSP server to read from the 
incoming H.264 video stream (from SIP), but you’re still writing that same 
incoming H.264 video stream into a file.  Therefore, two different objects are 
trying to read from the same “FramedSource” object at the same time, which is a 
no no.

You have two solutions:
1/ Stop writing the video stream to a file.  The easiest way to do this is to 
run your (modified) “playSIP” application with the “-r” command-line flag.
2/ Duplicate the H.264 video stream - using the “StreamReplicator” class - 
before you feed it into your “H264VideoStreamDiscreteFramer” object (for the 
RTSP server), and into the “H264VideoFileSink” (for saving the data into a 
file).  This is rather complicated; you should look at the “testReplicator” 
demo application code for guidance.  Also, you would need to change the call to 
“startPlaying()” at line 948 of “playCommon.cpp” to take its input from one of 
the duplicates (the one that you’re not feeding into your RTSP server), rather 
than "subsession->readSource()”.


I should also point out, however, that there’s a much much easier way to feed 
the video output from “playSIP” into a RTSP server: Run them as separate 
applications, and pipe the H.264 video between them.  I.e., run (on the command 
line):
        playSIP -v etc | your-modified-testOnDemandRTSPServer
where "your-modified-testOnDemandRTSPServer” is a slightly modified version of 
the “testOnDemandRTSPServer” demo application that:
        1/ Sets “reuseFirstSource” to True (“testOnDemandRTSPServer.cpp”, line 
29)
        2/ Changes “test.264” to “stdin” (“testOnDemandRTSPServer.cpp”, line 99)
        See also http://live555.com/liveMedia/faq.html#liveInput-unicast


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

Reply via email to