Skip to content

VideoDevice

property

Delphi
property VideoDevice: LongInt read GetVideoDevice write SetVideoDevice default DEF_VideoDevice;
C++Builder
__property System::LongInt VideoDevice = {read=GetVideoDevice, write=SetVideoDevice, default=-1};
C#
public int VideoDevice { get; set; }
VB.NET
Public Property VideoDevice As Integer
C++/Qt
int GetVideoDevice ();
void SetVideoDevice (int Value);

Used to select the current video capture device. This property is an index in the VideoDevices list.

When a new value is assigned to this property, the related device-dependent values are loaded from the registry and the OnVideoDeviceSelected event occurs.

It is possible to select the video capture device programmatically by its name (as it appears in the VideoDevices list) by using the FindIndexInListByName function, e.g.:

procedure TfrmMainForm.Button1Click(Sender: TObject);

var

i: LongInt;

begin

i := VideoGrabber.FindIndexInListByName (VideoGrabber.VideoDevices, 'Microsoft DV Camera and VCR - JVC GR DVL357EG Camcorder DV (WDM)', false, true);

if i > -1 then begin // if this Device exists...

VideoGrabber.VideoDevice := i;

end;

end;

end;