<< Click to display table of contents >> TRVCamera.SearchCamera |
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 method only searches for the camera types specified in this parameter (the empty set works like the full set, i.e. the component searches for all supported camera models).
The following camera types are the most important, they allow searching for cameras that support a special API:
•rvctFoscam: searching for cameras supporting Foscam API
•rvctPanasonic: searching for cameras supporting Panasonic API
•rvctAxis: searching for cameras supporting Axis API
•rvctDLink: searching for cameras supporting DLink API
•rvctMobotix: searching for cameras supporting Mobotix API
For these cameras, TRVCamera can not only display video, but also rotate and configure the camera (to the extent allowed by API and access rights).
Other camera types allow searching for video URLs in location common for the specified camera types. The most comprehensive search is performed if rvctUnknown is included.
Wait mode: the method returns only when the search is complete. Return value: a camera is found. Not recommended, because searching is a relatively long process.
No-wait mode: the method initializes a searching thread and returns immediately. Return value: False. When the search is complete, OnSearchComplete event occurs.
When 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