TRVCamera.SearchCamera

Top  Previous  Next

Searches for the camera at CameraHost:CameraPort having the specified video format.

function SearchCamera(CameraTypes: TRVCameraTypes = []) : Boolean;

The method connects to the specified address, recognizes the camera model (if there is a camera at this address), reads its properties.

If VideoFormat=rvvfMJPEG, the method searches for cameras providing MJPEG video streams; otherwise it searches for cameras providing H.264 streams (they require FFmpeg to play).

If you know a model of the camera, you can specify its type in CameraTypes parameter. The methods only search for camera types specified in this parameter (the empty set works like the full set, i.e. the component searches for all supported camera models).

Wait mode: the method returns only when the search is complete. Return value: a camera is found.

No-wait mode: the method initializes a searching thread and returns immediately. Return value: False. When the search is complete, OnSearchComplete event occurs.

Then the search is successfully completed, the following changes are made:

IPCameraTypes property is assigned

VideoResolution property is assigned if the camera supports it

for all camera models, except for controllable Foscam, Axis, D-Link and Panasonic (or compatible) cameras, CameraHost:CameraPort are cleared, and URL of MJPEG stream is assigned to URL property

Parameters property is filled

 

After searching, call PlayVideoStream to receive video from this camera.

 

See also

WaitForSearch

MaxCameraSearchThreadCount

CameraSearchTimeOut

Searching