[Live-devel] Re-connection handling

Ross Finlayson finlayson at live555.com
Fri Aug 31 14:27:13 PDT 2012


> I've therefore looked into how to best handle reconnection if the stream for any reason is disconnected. I noticed fairly quickly that liveMedia is taking care of that really good and there is no reason for me to try to implement any general disconnect handling, as I can't possible reconnect any faster than liveMedia already does.

Agreed.


> There is one case where it doesn't work though, and I'm not sure how to handle it. This is if I do a seek while the stream is disconnected, then it never reconnects. In some cases I play a 10s loop where a timer do a seek every 10s and jumps back (using absolute seeking). Those streams never reconnect after a disconnection.
>  

OK, so unless you can tell me a reliable way to reproduce this problem (perhaps using "openRTSP), then you'll need to figure out yourself why the LIVE555 library's connection reestablishment code is not working in this case (and then I'll try to fix it).  Remember, You Have Complete Source Code.

The place to look in the code is near the start of "RTSPClient::sendRequest()" (line 535 of "liveMedia/RTSPClient.cpp").  When you do your 'seek' (really "PLAY") operation (that's failing), then is "fInputSocketNum" <0?  If so, then what value does "openConnection()" return.

If, however, "fInputSocketNum" is >= 0 (in practice, it will be >0), then we will (eventually) call "send()" (at line 787) to transmit the command.  Is this "send()" call succeeding, or not?


> I see a few alternatives:

No, there's only one 'alternative': Figure out why the LIVE55 code is (apparently) failing in this case, so I can fix the problem.  Trying instead to work around this problem yourself might help you in the short term, but wouldn't help anyone else.


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20120831/1c268adf/attachment.html>


More information about the live-devel mailing list