Question

This is the situation:

  1. I connect to RTSP Server with Live555 openRTSP Client
  2. Then supose that The Server connection is lost

To Re-connect the rtsp server, what should i do?

  1. Does openRTSP Client handle this? [ in my experiment it does not]
  2. If Not how should i detect connection lost, and modify the Open Rtsp Client code to re-connect the server?

Any suggestions?

Was it helpful?

Solution

IMO it would be easiest to setup a new RTSP session.

1.) not as far as I know

2.) you can schedule a periodic task in the live555 event loop that checks if any samples have been received in the last n seconds. If not, you could try to teardown the existing session before beginning a new one. However if the connection has gone down between the server and client, your TEARDOWN might also fail (which is ok since the RTSP server times out RTSP sessions in any case). The live555 timeout on the RTSP server is 60 seconds as far as I remember.

For clarity purposes: What exactly do you mean by connection: the link between the RTSP server and client? Are you streaming RTP over UDP or RTP over RTSP (TCP)? If you are interleaving RTP over RTSP, you may be able to detect the connection failure when the TCP connection goes down.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top