Properties

The video capture API includes constants, data types, enumerated values, and macros specifying video capture properties.

The following constants can be passed as function arguments to specify video capture behavior:

CAPTURE_PROPERTY macro

CAPTURE_PROPERTY stores bit maps of information, either retrieved from a video capture driver and device, or specified by the user application and passed to the video capture library, the video capture driver, and the device. These bit maps are placed in the four bytes of a uint32_t value:

CAPTURE_PROPERTY(a, b, c, d)
( (a) << 24 | (b) << 16 | (c) << 8 | (d) )
Shifts the bits for CAPTURE_PROPERTY_* values.

Video capture behavior

CAPTURE_FLAG_LATEST_FRAME
0x0001
Get the latest frame and discard all the other queued frames.
CAPTURE_TIMEOUT_INFINITE
-1ULL
Never timeout; wait for frame indefinitely.
CAPTURE_TIMEOUT_NO_WAIT
0
Return immediately, even if there is no frame.

Interfaces, threads, offsets

The following values specify the video capture interface type, thread priority, and YUV offsets:

CAPTURE_PROPERTY_PLANAR_OFFSETS
CAPTURE_PROPERTY( 'Q', 'P', 'L', 'O' )
Read/Write [3] int32_t
The offset from the base address for each of the Y, U, and V components of planar YUV formats.
CAPTURE_PROPERTY_THREAD_PRIORITY
CAPTURE_PROPERTY( 'Q', 'T', 'P', 'R' )
Read/Write int
The scheduling priority of the capture thread. The default value is the priority for the application + 20.
CAPTURE_PROPERTY_INTERFACE_TYPE
CAPTURE_PROPERTY('Q','P','I','F')
Read/Write uint32_t
The interface type. See "Interface types" below.

Interface types

The following enumerated values are used to specify the interface type:

enum capture_iface_type {
	CAPTURE_IF_PARALLEL = 0,
	CAPTURE_IF_MIPI_CSI2,
};
CAPTURE_IF_PARALLEL
0
The interface is parallel.
CAPTURE_IF_MIPI_CSI2
The interface is a MIPI CSI2 interface.

See also "Data bus, and clock and data lane properties"

Debugging

CAPTURE_PROPERTY_VERBOSITY
CAPTURE_PROPERTY( 'Q', 'V', 'B', 'R' )
Read/Write uint32_t
Set the log verbosity level. Default is 0.; increase this value to increase log verbosity for debugging.