SetIPCameraSetting
function SetIPCameraSetting (Setting: TIPCameraSetting; Value: LongInt): Boolean;
bool __fastcall SetIPCameraSetting(TIPCameraSetting Setting, System::LongInt Value);
public bool SetIPCameraSetting(TIPCameraSetting Setting, int Value);
Public Function SetIPCameraSetting(Setting As TIPCameraSetting, Value As Integer) As Boolean
BOOL SetIPCameraSetting (TIPCameraSetting Setting, int Value);
Adjusts the IP camera settings. The Setting parameter accepts the following values:
-
ips_ConnectionTimeout: specifies the connection timeout (when connecting to the IP camera), in milliseconds. Default value: 20001 (about 20 seconds), used by the HTTP / MJPEG IP cameras and by SendIPCameraCommand. With the Datastead RTSP/RTMP/HTTP/ONVIF source filter, the value is passed to the filter only if it has been changed; otherwise the default of the filter applies: 10000 ms (10 seconds) with the asynchronous connection (OpenURLAsync enabled, the default), 5000 ms (5 seconds) with OpenURLAsync disabled. Minimum value: 500 (0.5 second). If the value is too low, connection failures may occur. E.g. SetIPCameraSetting (ips_ConnectionTimeout, 5000) sets a connection timeout of 5 seconds.
-
ips_ReceiveTimeout: specifies the receive timeout to the IP camera (after the camera preview or recording has started), in milliseconds. Default value: 5001 (about 5 seconds), used by the HTTP / MJPEG IP cameras and by SendIPCameraCommand. With the Datastead source filter, the value is passed to the filter as its device lost timeout only if it has been changed; otherwise the default of the filter applies: 5000 ms (5 seconds). Minimum value: 500 (0.5 second). If the value is too low, unexpected disconnections may occur. E.g. SetIPCameraSetting (ips_ReceiveTimeout, 1000) sets a receive timeout of 1 second.
-
ips_RetryInitialConnect: specifies how many times the initial connection is retried if it fails (e.g. camera or NVR not reachable, or maximum number of connections reached). Default value: 0 (disabled). -1 = retried until StopPreview/Stop is invoked. A 1-second pause is inserted between the retries. The connection is not retried if the authentication fails (401 Unauthorized). Once connected, the reconnection after a connection loss is handled by the auto-reconnection (see Auto-reconnection). E.g. SetIPCameraSetting (ips_RetryInitialConnect, 30) retries the initial connection up to 30 times.