TRVCamera.VideoDeviceIndex, VideoDeviceCount, VideoDeviceList, VideoDeviceIdList

<< Click to display table of contents >>

TRVCamera.VideoDeviceIndex, VideoDeviceCount, VideoDeviceList, VideoDeviceIdList

Properties controlling USB webcams and monitors (displays).

property VideoDeviceIndex: Integer;

property VideoDeviceCount: Integer; // read-only

property VideoDeviceList[Index: Integer]: String// read-only

property VideoDeviceIdList[Index : Integer]: String// read-only

These properties are used if DeviceType=rvdtWebCamera or rvdtDesktop. VideoDeviceIdList is used only for web cameras.

DeviceType=rvdtWebCamera

VideoDeviceCount returns the count of webcams (video capture devices).

VideoDeviceList[Index] (where Index is in the range 0..VideoDeviceCount-1) returns names of webcams. These names can be shown to users in the application UI.

VideoDeviceIdList[Index] (where Index is in the range 0..VideoDeviceCount-1) returns identifiers of webcams. These identifiers are unique on the computer.

Assign a value in the range 0..VideoDeviceCount-1 to VideoDeviceIndex to choose the webcam.

To play video from the camera, call PlayVideoStream.

DeviceType=rvdtDesktop

VideoDeviceCount returns the count of monitors + 1.

The 0-th device corresponds to the whole desktop, the indexes from 1 to VideoDeviceCount-1 correspond to monitors (the i-th device corresponds to Screen.Monitors[i-1]).

VideoDeviceList[Index]  (where Index is in the range 0..VideoDeviceCount-1) returns a description of a device (a desktop or a monitor).

Assign a value in the range 0..VideoDeviceCount-1 to VideoDeviceIndex to choose the desktop or a monitor as a video source (if DesktopMode=rvdmFull)

To play video from the desktop, call PlayVideoStream.

[FMX note]: in FireMonkey, multiple monitors are supported since Delphi XE7. For Delphi XE6, VideoDeviceCount returns 1 and VideoDeviceList[0] returns the description of the primary monitor.

See also

FillVideoDeviceList

CamVideoMode methods

DesktopVideoMode methods

TRVWebCamDialog component