[Live-devel] RTSPClient reconnection
Craig Matsuura
cmatsuura at vivint.com
Mon Dec 9 10:10:01 PST 2013
I believe the ProxyServerMediaSession.cpp has an example of resetting the client connected to a server on result codes returned via OPTION command. See the continueAfterLivenessCommand() and continueAfterOPTIONS().
Craig
On 12/09/2013 08:07 AM, Adrian Kovacs wrote:
Hi,
I would like to handle the event, when the connection to RTSP server lost and the connection is restored. I can detect, when the connection is lost with sending a command to RSTP server and check the response result code.
RTSPClient* pClient;
pClient->sendOptionsCommand(CheckResponse, NULL);
void CheckResponse(RTSPClient* pRTSPClient, int resultCode, char* resString)
{
if (resultCode < 0)
{
//connection lost
}
}
I can also detect, when the connection restored, when the result code again becomes 0. The problem is that I don't get frames anymore after connection restored. I debugged why this happens, and I noticed, that in BasicTaskScheduler::SingleStep (line 138) the socket is not readable.
The question is that can I somehow get frames again with the active event loop, or should I clear everything and start a new event loop after reconnection?
Adrian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20131209/9922c5e7/attachment.html>
More information about the live-devel
mailing list