[Live-devel] Problem in sending PAUSE and then PLAY request in openrtsp

Andrey Kaminsky and at faonet.com
Tue Jul 24 08:38:23 PDT 2007


On Tue, 2007-07-24 at 05:19 -0500, Ross Finlayson wrote:
> > We are using openRTSP Client to receive mpeg2 streams. When we call
> > PAUSE and then PLAY request during streaming then
> >  we observed functiongetResponse1() is getting called from two
> > places simultaneously
> 
> 
> No. Remember that the code is single-threaded.  It is not possible for
> "getResponse1()" - or any other function - to be called from two
> places 'simultaneously'.
> 
I found the same things. live.2007.04.24a

in file RTSPClient.cpp: function

Boolean RTSPClient::playMediaSession(MediaSession& session,
                                     float start, float end, float
scale) {
................
line 1096
    if (fTCPStreamIdCount == 0) { // we're not receiving RTP-over-TCP
      // Arrange to handle incoming requests sent by the server

envir().taskScheduler().turnOnBackgroundReadHandling(fInputSocketNum,

(TaskScheduler::BackgroundHandlerProc*)&incomingRequestHandler, this);
    }

If you comment out this code block, than you can always resume from
 pause. Otherwise this is like a russian roulette :-). 

getResponse -> getResponse1 -> (pause/resume okey)
OR
incomingRequestHandler -> incomingRequestHandler1 -> getResponse1 ->
you are blocked in select

Regards
Andrey Kaminsky





More information about the live-devel mailing list