Driver and device

Updated: May 27, 2022

The video capture API includes constants that specify the video capture driver and device properties.

Definitions:

#define CAPTURE_PROPERTY_DEVICE_INFO CAPTURE_PROPERTY( 'Q', 'I', 'N', 'F' )

Return string information about the video capture driver and device; all drivers support this property.

The content of this property depends on the device that's set in CAPTURE_PROPERTY_DEVICE property.

Read const char *

#define CAPTURE_ENABLE CAPTURE_PROPERTY( 'Q', 'E', 'N', 'A' )

Capture start(1) and stop(0)

Read/Write uint32_t

#define CAPTURE_PROPERTY_NDEVICES CAPTURE_PROPERTY( 'Q', 'N', 'D', 'V' )

Number of supported capture units A capture driver can support a number of devices (CAPTURE_PROPERTY_NDEVICES); each device has at least one input (CAPTURE_PROPERTY_NSOURCES).

Selection of the input is done by choosing a device, and then a source.

Read uint32_t

#define CAPTURE_PROPERTY_DEVICE CAPTURE_PROPERTY( 'Q', 'D', 'E', 'V' )

Capture device in this context.

Once set, on some drivers, this property cannot be changed.

Read/Write uint32_t

#define CAPTURE_PROPERTY_NSOURCES CAPTURE_PROPERTY( 'Q', 'N', 'S', 'R' )

Number of source inputs available after the device is set.

Read uint32_t

#define CAPTURE_PROPERTY_CONTRAST CAPTURE_PROPERTY( 'Q', 'C', 'O', 'N' )

Contrast (-128 to 127)

Read/Write int32_t

#define CAPTURE_PROPERTY_BRIGHTNESS CAPTURE_PROPERTY( 'Q', 'B', 'R', 'I' )

Brightness (-128 to 127)

Read/Write int32_t

#define CAPTURE_PROPERTY_SATURATION CAPTURE_PROPERTY( 'Q', 'S', 'A', 'T' )

Color saturation (-128 to 127)

Read/Write int32_t

#define CAPTURE_PROPERTY_HUE CAPTURE_PROPERTY( 'Q', 'H', 'U', 'E' )

Color hue (-128 to 127)

Read/Write int32_t

#define CAPTURE_PROPERTY_SHARPNESS CAPTURE_PROPERTY( 'Q', 'S', 'R', 'P' )

Sharpness (-128 to 127); where an image is blurred at -128 to the sharpest at 127.

Read/Write int32_t

#define CAPTURE_PROPERTY_DEINTERLACE_FLAGS CAPTURE_PROPERTY( 'Q', 'D', 'E', 'I' )

Deinterlacing flags (bit-field)

Use CAPTURE_DEI_WEAVE_FLAG_BOTTOM_TOP

Read/Write uint32_t

#define CAPTURE_DEI_WEAVE_FLAG_BOTTOM_TOP (1 << 0)

Used to specify the field order for weave deinterlacing.

When set, the weave order is to always weave bottom + top, possibly dropping an unexpected first top field. When not set, the weave order is to always weave top + bottom, possibly dropping an unexpected first bottom field.

#define CAPTURE_PROPERTY_DEINTERLACE_MODE CAPTURE_PROPERTY( 'Q', 'D', 'E', 'M' )

Deinterlacing mode; refer to Deinterlacing mode types.

Read/Write uint32_t

#define CAPTURE_PROPERTY_NO_SIGNAL_MODE CAPTURE_PROPERTY( 'Q', 'N', 'O', 'S' )

No signal mode; set default action if "no carrier" or "no signal" state is detected.

Refer to No signal mode types. Read/Write @c uint32_t

#define CAPTURE_PROPERTY_SRC_INDEX CAPTURE_PROPERTY( 'Q', 'S', 'I', 'D' )

Video capture unit of the device.

Read/Write uint32_t