Skip to content

Device dependent properties

Most of the video capture device properties are device-dependent: their content changes when the current video capture device changes. For this reason, these properties are not published, because setting a value from the Object Inspector does not make it possible to specify the video device concerned (selected by the VideoDevice property).

TVideoGrabber saves and retrieves these values for each capture device in the registry, in HKEY_CURRENT_USER under the Software\Datastead key. If the "Datastead" key is deleted, it is recreated automatically and the device settings are reset to their default values.

The content of these properties is refreshed when the OnVideoDeviceSelected event occurs, after the video capture device is selected by assigning a new value to VideoDevice. The principle is the same for the audio device (OnAudioDeviceSelected and AudioDevice).

E.g., a platform has 2 video capture devices:

  • the 1st video device has 3 inputs: "Tuner", "Composite" and "SVideo",
  • the 2nd device has 2 composite inputs: "Composite 0" and "Composite 1".

On the 1st video capture device (VideoDevice = 0), the VideoInputs string list returns the following values: "Tuner", "Composite", "SVideo". The index value VideoInput = 1 means that the "Composite" video input is selected on this video capture device.

On the 2nd video capture device (VideoDevice = 1), the VideoInputs string list returns the following values: "Composite 0", "Composite 1". Now the index value VideoInput = 1 means that the "Composite 1" input is selected on this video capture device. Moreover, the VideoInput = 2 value, which means "SVideo" on the 1st device, has no meaning and is out of range on the 2nd device.

Thus, the edit fields, list boxes and indexes of any application using TVideoGrabber MUST be refreshed when the OnVideoDeviceSelected or OnAudioDeviceSelected event occurs; otherwise their content no longer reflects the current values of the TVideoGrabber properties.

There are mainly 2 types of properties:

  • single values,
  • list/index-based values, easily identified as they are composed of a string list, an index in the list and a list count, e.g. VideoInput, VideoInputs and VideoInputsCount.

The main device-dependent properties related to the video capture device are:

The main device-dependent properties related to the audio capture device are: