Retry a connect (Search) after the initial attempts fail

RVMedia support and discussion (components for displaying and controlling IP cameras, webcams, video conferencing, video chats, recording audio and video files)
Post Reply
balbaro
Posts: 4
Joined: Mon Sep 03, 2018 7:12 am

Retry a connect (Search) after the initial attempts fail

Post by balbaro » Thu Jan 17, 2019 4:53 am

Hello,

Im trying to reattempt to call a ipcamera with SearchCamera when status is <> 0 in SearchComplete.
But what am i doing wrong.
Now, to connect succesfully i have to close and restart my app several times.

Could i not attempt a reconnect automatic if the first attempt fails, or if a connection is lost while connected.

Ising Nowait.
Using DelphiXE .

Thanks for any help.

Sergey Tkachenko
Site Admin
Posts: 14721
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Retry a connect (Search) after the initial attempts fail

Post by Sergey Tkachenko » Thu Jan 17, 2019 7:03 am

Are you sure that the application restart affect results?
If SearchCamera does not find a camera that works, this means that the connection is too unreliable, the camera does not respond for too long.

Sergey Tkachenko
Site Admin
Posts: 14721
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Retry a connect (Search) after the initial attempts fail

Post by Sergey Tkachenko » Thu Jan 17, 2019 10:22 am

TRVCamera has property allowing to increase timeout limit while searching.
They are experimental, so we did not document them.

SearchHTTPTimeOut, SearchRTSPTimeOut, MJPEGTimeOut. You can try set them to "long" or "huge".

balbaro
Posts: 4
Joined: Mon Sep 03, 2018 7:12 am

Re: Retry a connect (Search) after the initial attempts fail

Post by balbaro » Fri Jan 18, 2019 3:50 am

First of all, thanks for the reply.

Yes the application restart attempts work.
Sometimes i have to restart 4,5 times for the 3 camera connections to display do.
I have them connected sequentally one after the other after each StartVideoStream event.
And i also noticed once the first camera connects the other two also connect.
But once connected the connection seems to be stable.
Except twice, where one and the same camera disconnected probably a fault of the camera do.
Thats why i was asking if there was someway of retrying a connection if one of the camera's disconnect, without having to restart the app, that is.
I must say, i have load balancing in my router on 2 internet connections a very slow landline connection and a satellite connection.
I live in a rural area.

I use the long timeout option for HTTP do and the CameraSearchTimeOut to 20 seconds.
Have been testing this for 3 to 4 days now.

Sergey Tkachenko
Site Admin
Posts: 14721
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Retry a connect (Search) after the initial attempts fail

Post by Sergey Tkachenko » Fri Jan 18, 2019 10:49 am

From your description, it looks like the problem is on the camera side.
If you would say that one restart always solved the problem, it would be possible that the problem is on RVMedia side.
But 4-5 restarts make me think that the matter is not in restarts. Probably, the remote camera does not accept any connections for some time. It may be because of a previous connection that is being timed out. Or maybe it does like when RVCamera makes too many requests while searching for a video stream, so it may think that this is a DOS attack and protects itself. You can decrease the value of RVCamera.MaxCameraSearchThreadCount.

Post Reply