Camera API#

Library to access the cameras.

Here are the objects and functions provided.

Enumerations#

enum vacq_control_flags#

Device / pad control flags.

Each control can have one or more flags to notify specific behavior like read / write state, actions or internal state.

Values:

enumerator VACQ_CONTROL_FLAGS_NONE#

No flags.

The value of the control can be read and/or write.

enumerator VACQ_CONTROL_FLAGS_DISABLED#

Control is disabled.

The control is permanently disabled and should be ignored. Any read and/or write will results in an error.

enumerator VACQ_CONTROL_FLAGS_GRABBED#

Control is temporarily unchangeable.

The value can be only read temporarily. Any write will results in an error.

enumerator VACQ_CONTROL_FLAGS_READ_ONLY#

Control is read only.

The value can be only read. Any write will results in an error.

enumerator VACQ_CONTROL_FLAGS_UPDATE#

Control may affect other controls of the same class.

A write on the value could imply some changes on other control of the same class. The application should read other controls.

enumerator VACQ_CONTROL_FLAGS_INACTIVE#

Control is not applicable in current configuration.

The value should not be read and/or write for the current configuration. Any operation will not affect current configuration.

enumerator VACQ_CONTROL_FLAGS_SLIDER#

Control should be represented as a slider.

enumerator VACQ_CONTROL_FLAGS_WRITE_ONLY#

Control is write only.

The value can be only written. Any read will results in an error.

enumerator VACQ_CONTROL_FLAGS_VOLATILE#

Control is volatile.

The value changes continuously.

A write to the control is ignored unless VACQ_CONTROL_FLAGS_EXECUTE_ON_WRITE flag is set.

enumerator VACQ_CONTROL_FLAGS_HAS_PAYLOAD#

Control uses pointer values.

The value is accessed through one of the pointers values in the vacq_control structure. It should be set when control type is VACQ_CONTROL_TYPE_U8, VACQ_CONTROL_TYPE_U16, VACQ_CONTROL_TYPE_U32 or VACQ_CONTROL_TYPE_UNKNOWN.

enumerator VACQ_CONTROL_FLAGS_EXECUTE_ON_WRITE#

Control value is propagated to driver.

The value is propagated to under layers even if the value read remains constant. It can be useful for clearing some bits of a value.

All controls of type VACQ_CONTROL_TYPE_BUTTON must have this flag set.

enumerator VACQ_CONTROL_FLAGS_MODIFY_LAYOUT#

Control may modify the buffer layout and/or pad format.

A write could change the output format or buffer layout: a typical example would be the VACQ_CONTROL_CLASS_IMG_ROTATE control.

This kind of controls should use the VACQ_CONTROL_FLAGS_GRABBED when stream is started.

enum vacq_control_type#

Device / pad control types.

Many types are available for device / pad controls in order to handle any kind of value or data array.

Values:

enumerator VACQ_CONTROL_TYPE_UNKNOWN#

Unknown type.

This type can be used for unknown data type as structure or undefined data.

The vacq_control_desc.elem_size and vacq_control_desc.elem_count fields should be used.

The vacq_control.value (or vacq_control.ptr if control flag VACQ_CONTROL_FLAGS_HAS_PAYLOAD is set) and vacq_control.size are used to hold the data.

No check are done on value while calling vacq_check_control_value() and vacq_check_controls().

enumerator VACQ_CONTROL_TYPE_BOOLEAN#

Boolean type.

This type can be used for boolean values (true / false).

No additional vacq_control_desc field need to be set.

The vacq_control.value is used to hold the boolean (0 for false and 1 for true).

enumerator VACQ_CONTROL_TYPE_INTEGER#

Integer type (32 bits).

This type can be used for signed 32 bits integer or less.

The vacq_control_desc.minimum and vacq_control_desc.maximum fields must be defined. The vacq_control_desc.step and vacq_control_desc.default_value are optional.

The vacq_control.value is used to hold the integer.

enumerator VACQ_CONTROL_TYPE_INTEGER_64#

Long long integer type (64 bits).

This type can be used for signed 64 bits long long integer or less.

The vacq_control_desc.minimum and vacq_control_desc.maximum fields must be defined. The vacq_control_desc.step and vacq_control_desc.default_value are optional.

The vacq_control.value64 is used to hold the long long integer.

enumerator VACQ_CONTROL_TYPE_BITMASK#

Bit-mask type (64 bits).

This type can be used to handle bit-mask / bit-field values. It can handle up to 64 bits.

The vacq_control_desc.minimum and vacq_control_desc.maximum fields must be defined. The vacq_control_desc.default_value is optional.

The vacq_control.value64 is used to hold the bit-mask.

enumerator VACQ_CONTROL_TYPE_STRING#

String type.

This type can be used to handle a string.

No additional vacq_control_desc field need to be set.

The vacq_control.string is used to hold the string.

enumerator VACQ_CONTROL_TYPE_U8#

Unsigned 8 bits array.

This type can be used to handle an array of 8 bits values.

The vacq_control_desc.elem_size and vacq_control_desc.elem_count fields must be defined. If the array have multiple dimensions, the vacq_control_desc.dim_count and vacq_control_desc.dim_list can be used to specify respectively the number of dimensions and the size of each dimensions. The total of dimensions must be equal to the element count.

The vacq_control.p_u8 is used to hold the array.

enumerator VACQ_CONTROL_TYPE_U16#

Unsigned 16 bits array.

This type can be used to handle an array of 16 bits values.

The vacq_control_desc.elem_size and vacq_control_desc.elem_count fields must be defined. If the array have multiple dimensions, the vacq_control_desc.dim_count and vacq_control_desc.dim_list can be used to specify respectively the number of dimensions and the size of each dimensions. The total of dimensions must be equal to the element count.

The vacq_control.p_u16 is used to hold the array.

enumerator VACQ_CONTROL_TYPE_U32#

Unsigned 32 bits array.

This type can be used to handle an array of 32 bits values.

The vacq_control_desc.elem_size and vacq_control_desc.elem_count fields must be defined. If the array have multiple dimensions, the vacq_control_desc.dim_count and vacq_control_desc.dim_list can be used to specify respectively the number of dimensions and the size of each dimensions. The total of dimensions must be equal to the element count.

The vacq_control.p_u32 is used to hold the array.

enumerator VACQ_CONTROL_TYPE_BUTTON#

Button type.

This type can be used to trigger an action.

No additional vacq_control_desc field need to be set.

No value is set in the vacq_control structure.

enumerator VACQ_CONTROL_TYPE_MENU#

Menu type.

This type can be used to propose multiple value choice. It can be very useful to handle enumerator members.

The vacq_control_desc.item_count and vacq_control_desc.item_list fields must be defined.

The index of the item chosen from the menu is set in the vacq_control.value field.

enumerator VACQ_CONTROL_TYPE_COUNT#
enum vacq_control_class#

Device / pad control classes.

Device and pad controls are grouped by classes to differentiate easily the controls and their meanings. For custom controls (not defined in general API) the VACQ_CONTROL_CLASS_CUSTOM can be used.

Values:

enumerator VACQ_CONTROL_CLASS_UNKNOWN#

Unknown / undefined controls.

enumerator VACQ_CONTROL_CLASS_PROC#

Processor / IP specific controls.

enumerator VACQ_CONTROL_CLASS_CAM#

Camera device specific controls.

enumerator VACQ_CONTROL_CLASS_ISP#

Image Signal Processor (ISP) specific controls.

enumerator VACQ_CONTROL_CLASS_IMG#

Image / Video processor specific controls.

enumerator VACQ_CONTROL_CLASS_DBG#

Debug specific controls.

enumerator VACQ_CONTROL_CLASS_CUSTOM#

Custom controls.

This class can be used to add custom controls for specific implementation.

enumerator VACQ_CONTROL_CLASS_COUNT#
enum vacq_control_class_cam#

Controls for camera class (see VACQ_CONTROL_CLASS_CAM).

Values:

enumerator VACQ_CONTROL_CLASS_CAM_UNKNOWN#
enumerator VACQ_CONTROL_CLASS_CAM_MODE#

Camera mode.

Can be an integer or a menu to select a specific mode for the camera. It should be set to 0 by default.

enumerator VACQ_CONTROL_CLASS_CAM_TRIGGER#

Trigger camera capture.

This control is used to trigger one or multiple frame capture on the camera sensor. Depending on the camera sensor, this control should be a boolean or a button type.

enumerator VACQ_CONTROL_CLASS_CAM_EXPOSURE#

Exposure (in line count).

enumerator VACQ_CONTROL_CLASS_CAM_FINE_EXPOSURE#

Fine exposure (in pixel count).

enumerator VACQ_CONTROL_CLASS_CAM_EXPOSURE_TIME#

Exposure time (in us).

enumerator VACQ_CONTROL_CLASS_CAM_ANALOG_GAIN#

Analogue gain.

enumerator VACQ_CONTROL_CLASS_CAM_DIGITAL_GAIN#

Digital gain.

enumerator VACQ_CONTROL_CLASS_CAM_GAIN#

Analogue and/or digital gain.

When the value is a mix between the analogue and digital gain, it should be like: value = analog_gain * digital_gain, where analogue gain is increased to its maximal value, then the digital gain is increased.

enumerator VACQ_CONTROL_CLASS_CAM_BINNING_FACTOR_H#

Horizontal binning factor.

enumerator VACQ_CONTROL_CLASS_CAM_BINNING_FACTOR_V#

Vertical binning factor.

enumerator VACQ_CONTROL_CLASS_CAM_BINNING_METHOD#

Binning method to use.

This control should be a menu. Please consider usage of vacq_ctrl_binning_method and its associated macros to define menu items.

enumerator VACQ_CONTROL_CLASS_CAM_SKIPPING_H#

Horizontal skipping / sub-sampling mode.

enumerator VACQ_CONTROL_CLASS_CAM_SKIPPING_V#

Vertical skipping / sub-sampling mode.

enumerator VACQ_CONTROL_CLASS_CAM_LINE_LENGTH#

Number of pixels by line (including horizontal / line blanking)

enumerator VACQ_CONTROL_CLASS_CAM_FRAME_LENGTH#

Number of lines per frame (including vertical blanking)

enumerator VACQ_CONTROL_CLASS_CAM_READOUT_TIME#

Read-out time (in ns)

enumerator VACQ_CONTROL_CLASS_CAM_ACTIVE_PERIOD_TIME#

Active period time (in us)

enumerator VACQ_CONTROL_CLASS_CAM_STATS_ENABLE#

Statistics control.

This control is a VACQ_CONTROL_TYPE_BITMASK type and bit-fields are defined by vacq_ctrl_stats_type. It is used to enable / disable (by setting / clearing the corresponding bit) the internal statistics generation of the camera device.

enumerator VACQ_CONTROL_CLASS_CAM_STATS_OUTPUT#

Statistics output.

This control uses the same bit-field as VACQ_CONTROL_CLASS_CAM_STATS_ENABLE to control the output of the statistics data on the physical link between the camera device and the receiver device.

enumerator VACQ_CONTROL_CLASS_CAM_COUNT#
enum vacq_control_class_isp#

Controls for ISP class (see VACQ_CONTROL_CLASS_ISP).

Values:

enumerator VACQ_CONTROL_CLASS_ISP_UNKNOWN#
enumerator VACQ_CONTROL_CLASS_ISP_AE_MODE#

Auto-Exposure mode.

This control should be a menu. Please consider the vacq_ctrl_ae_mode and its associated macros to define menu items.

enumerator VACQ_CONTROL_CLASS_ISP_AE_LOCK#

Auto-Exposure lock.

enumerator VACQ_CONTROL_CLASS_ISP_AE_EV#

Auto-Exposure EV.

This control can be used to set the exposure value: the gain and exposure time will be calculated according to the internal P-chart of the AE. This value can be modified only during AE lock. It should be the product of VACQ_CONTROL_CLASS_CAM_GAIN and VACQ_CONTROL_CLASS_CAM_EXPOSURE_TIME units.

enumerator VACQ_CONTROL_CLASS_ISP_AE_EV_BIAS#

Auto-Exposure EV bias This control can be used to add a bias on the targeted exposure value of the AE.

enumerator VACQ_CONTROL_CLASS_ISP_MAX_ISO_SENSITIVITY#

Auto-Exposure maximal ISO sensitivity.

This control can be used to set a maximal ISO sensitivity for the auto exposure mode. A value of 0 reset the maximal value to default one.

enumerator VACQ_CONTROL_CLASS_ISP_FLICKER_MODE#

Anti-flickering mode.

This control should be a menu. Please consider the vacq_ctrl_flicker_mode and its associated macros to define menu items.

enumerator VACQ_CONTROL_CLASS_ISP_GAIN#

Digital gain applied by ISP.

enumerator VACQ_CONTROL_CLASS_ISP_AWB_MODE#

Auto-White-Balance mode.

This control should be a menu. Please consider the vacq_ctrl_awb_mode and its associated macros to define menu items.

enumerator VACQ_CONTROL_CLASS_ISP_AWB_LOCK#

Auto-White-Balance lock.

enumerator VACQ_CONTROL_CLASS_ISP_WB_TEMPERATURE#

White-Balance temperature.

enumerator VACQ_CONTROL_CLASS_ISP_RED_BALANCE#

Red balance (used for White balance).

enumerator VACQ_CONTROL_CLASS_ISP_BLUE_BALANCE#

Blue balance (used for White balance).

enumerator VACQ_CONTROL_CLASS_ISP_AF_LOCK#

Auto-Focus lock.

enumerator VACQ_CONTROL_CLASS_ISP_STATISTICS#

Image statistics to be fed to ISP.

This control should have an unknown type so that an undefined structure can be passed as an argument based on device implementation.

enumerator VACQ_CONTROL_CLASS_ISP_AE_WEIGHT_TABLE#

Auto-exposure weight table.

This control should be 2-dimensions matrix of integer which contains the weight value to apply for each zone on the image.

enumerator VACQ_CONTROL_CLASS_ISP_AE_LUMINANCE#

Average luminance value.

This control should be a read-only integer which reflects the current average luminance of the image, measured by the ISP.

enumerator VACQ_CONTROL_CLASS_ISP_AE_LUMINANCE_ERROR#

Auto-exposure luminance error.

This control should be a read-only integer which reflects the difference between the auto-exposure luminance target and the actual luminance measured from the input image. Closer the value is to zero, the closer the actual luminance is to the auto-exposure target. A negative value will express a higher luminance level in the image and a positive value will express a lower luminance level in the image, than the auto exposure target.

enumerator VACQ_CONTROL_CLASS_ISP_AE_TARGET#

Auto-exposure target.

This control can be used to set / get the current auto-exposure average luminance target.

enumerator VACQ_CONTROL_CLASS_ISP_IQ_FILE#

IQ tuning file path This control is used to specify a file path to use for IQ tuning.

The control must be a string type and any file format can be used (dependent from device implementation).

enumerator VACQ_CONTROL_CLASS_ISP_IQ_SCALE_FACTOR#

IQ tuning scale factor This control reflects the current scale factor (or zoom) used for IQ tuning.

The control should be an integer type.

enumerator VACQ_CONTROL_CLASS_ISP_AE_STATS_CROP#

ISP AE statistics crop.

This control reflects the crop whithin the isp image for AE statistics generation. It can be used to set a Region Of Interest (ROI) for the AE algorithm. The control should be an array of integers representing rectangle coordinates in the following order: start X, start Y, width and height.

enumerator VACQ_CONTROL_CLASS_ISP_COUNT#
enum vacq_ctrl_ae_mode#

Auto-exposure mode.

Values:

enumerator VACQ_CTRL_AE_MODE_AUTO#

Automatic exposure time / gain.

enumerator VACQ_CTRL_AE_MODE_MANUAL#

Manual exposure time / gain.

Values should be set with VACQ_CONTROL_CLASS_CAM_EXPOSURE_TIME and VACQ_CONTROL_CLASS_CAM_GAIN.

enumerator VACQ_CTRL_AE_MODE_SHUTTER_PRIORITY#

Manual exposure time / automatic gain.

The exposure time should be set with VACQ_CONTROL_CLASS_CAM_EXPOSURE_TIME.

enumerator VACQ_CTRL_AE_MODE_ISO_PRIORITY#

Automatic exposure time / manual gain.

The gain value should be set with VACQ_CONTROL_CLASS_CAM_GAIN.

enumerator VACQ_CTRL_AE_MODE_AUTO_PREFER_SHUTTER#

Automatic exposure time / gain with preference on exposure time.

The auto-exposure algorithm will increase the exposure time first and tries to keep a low gain.

enumerator VACQ_CTRL_AE_MODE_AUTO_PREFER_ISO#

Automatic exposure time / gain with preference on gain.

The auto-exposure algorithm will increase the gain first and tries to keep a low exposure time.

enum vacq_ctrl_flicker_mode#

Anti-flickering mode.

Values:

enumerator VACQ_CTRL_FLICKER_MODE_DISABLED#

Anti-flickering is disabled.

Use VACQ_CTRL_FLICKER_MODE_DISABLED_NAME for string.

enumerator VACQ_CTRL_FLICKER_MODE_50HZ#

Anti-flickering is set to 50 Hz.

Use VACQ_CTRL_FLICKER_MODE_50HZ_NAME for string.

enumerator VACQ_CTRL_FLICKER_MODE_60HZ#

Anti-flickering is set to 60 Hz.

Use VACQ_CTRL_FLICKER_MODE_60HZ_NAME for string.

enumerator VACQ_CTRL_FLICKER_MODE_AUTO#

Anti-flickering is set to auto.

Use VACQ_CTRL_FLICKER_MODE_AUTO_NAME for string.

enumerator VACQ_CTRL_FLICKER_MODE_COUNT#

Structures#

struct vacq_control_menu_item#

Device / pad control menu item.

This structure describe one item of a control defined as a menu with the type VACQ_CONTROL_TYPE_MENU.

A menu item can have a integer and/or a string value. At least one of the two values must be set.

Public Members

const char *name#

Name of the item.

long long value#

Value of the item.

void *priv#

Private data (used for device implementation).

struct vacq_control_desc#

Device / pad control descriptor.

This structure describes a control, by presenting its class, ID and type.

Some additional data are present in the structure to provide the range, element size or element / item count, according to the defined type.

Public Members

enum vacq_control_class ctrl_class#

Control class (see vacq_control_class for more details).

unsigned int id#

Control ID.

This field should have one of the controls defined by class, or a custom value depending on the device implementation for a control of type VACQ_CONTROL_TYPE_UNKNOWN.

enum vacq_control_type type#

Control type (see vacq_control_type for more details).

const char *name#

Name of the control (optional).

long long minimum#

Minimum value, inclusive.

This field is used for integer / bit-mask / compound controls.

long long maximum#

Maximum value, inclusive.

This field is used for integer / bit-mask / compound controls.

unsigned long long step#

Step value.

This field provides the step size for a control (optional).

long long default_value#

Default value.

This field provides the default value to be set if application wants to restore default configuration (optional).

size_t elem_size#

Element size.

This field is used only when control value is an array: it is the element size in bytes (1 for VACQ_CONTROL_TYPE_U8, 2 for VACQ_CONTROL_TYPE_U16, 4 for VACQ_CONTROL_TYPE_U32 and any for VACQ_CONTROL_TYPE_UNKNOWN).

unsigned int elem_count#

Element count.

This field is used only when control value is an array: it is the element count in the array. If dim_count is set, this value must be equal to the sum of all dimensions sizes.

unsigned int item_count#

Menu item count.

This field is set when type is VACQ_CONTROL_TYPE_MENU and it contains the number of items.

const struct vacq_control_menu_item *item_list#

Menu item list.

This field is set when type is VACQ_CONTROL_TYPE_MENU and it provides the menu item list (see vacq_control_menu_item for more details).

unsigned int dim_count#

Dimension count.

This field is optional and can be used when the control value is an array, to specify how much dimensions are available.

unsigned int dim_list[VACQ_CTRL_DIM_MAX_COUNT]#

Dimension list.

This field must be set when dim_count is defined and it must contains a list of the dimension sizes.

enum vacq_control_flags flags#

Control flags (see vacq_control_flags for more details).

void *priv#

Private data (used for device implementation).

struct vacq_control#

Device / pad control.

This structure is used to read / write a device or a pad control, respectively with vacq_device_get_control() / vacq_device_set_control() or vacq_device_get_pad_control() / vacq_device_set_pad_control().

The control is identified with the ctrl_class and id fields.

The union must be set only when a write is attempted, according to the control type defined in the corresponding vacq_control_desc entry.

Public Members

enum vacq_control_class ctrl_class#

Control class (see vacq_control_class for more details).

unsigned int id#

Control ID (one of the control IDs defined for the class).

size_t size#

Size of the array.

If the control has an array type, the size of the array pointed by p_u8, p_u16, p_u32 or ptr mst be provided with this field.

int value#

Boolean / integer / bit-mask / menu item value.

This field should be used when control type is:

long long value64#

Integer 64-bits value.

This field should be used when control type is VACQ_CONTROL_TYPE_INTEGER_64.

char *string#

String value.

This field should be used when control type is VACQ_CONTROL_TYPE_STRING.

unsigned char *p_u8#

8-bits array.

This field should be used when control type is VACQ_CONTROL_TYPE_U8.

unsigned short *p_u16#

16-bits array.

This field should be used when control type is VACQ_CONTROL_TYPE_U16.

unsigned int *p_u32#

32-bits array.

This field should be used when control type is VACQ_CONTROL_TYPE_U32.

void *ptr#

Unknown value / array.

This field should be used when control type is VACQ_CONTROL_TYPE_UNKNOWN.

union vacq_control::[anonymous] [anonymous]#

Functions#

VACQ_API int vacq_init(void)#

Global API.

Initialize video-acquisition library context.

This function must be called before any call to other functions of the library.

During its call, the global context is initialized, then the configuration file is parsed and medias are populated. The required plugins are loaded and initialized, according to the media types.

This function can be called multiple times. The first call will initialize a reference count. On next calls, the refcount will be incremented.

Returns:

0 if the initialization succeed, -1 otherwise.

VACQ_API int vacq_exit(void)#

Free video-acquisition library context and resources.

This function must be called after all other pending calls to video-acquisition library have finished and any further call is prohibited. This function should be called at program exit.

During its call, all plugins are exited and unloaded, and the global context is freed.

This function can be called multiple times. For each vacq_init() call, a vacq_exit() must be called to decrement the reference count. Once the refcount reaches zero, the global context is released.

Returns:

0 if the resources and context have been released, -1 otherwise.

VACQ_API struct vacq_media *vacq_media_open(unsigned int media_id)#

Open a media.

This function opens a media from its ID. The range of media ID is from 0 to the value returned by vacq_media_get_count() minus 1. So, for a media count of N, media ID range is from 0 to (N - 1).

Parameters:

media_id[in] is the ID of the media

Returns:

a vacq_media if the media has been opened successfully or NULL.

VACQ_API int vacq_media_close(struct vacq_media *media)#

Close a media.

This function closes a media opened with vacq_media_open().

Parameters:

media[in] is a valid vacq_media to close

Returns:

0 if the media has been closed successfully, -1 otherwise.

VACQ_API int vacq_media_get_device_id_by_name(struct vacq_media *media, const char *name)#

Get a device ID from a device name.

The device ID used to open a device with vacq_device_open() can be retrieved from the media it belongs by a name.

Parameters:
  • media[in] is a valid vacq_media

  • name[in] is the device name to use

Returns:

the device ID corresponding to the name provided, -1 otherwise.

VACQ_API struct vacq_device *vacq_device_open(unsigned int media_id, unsigned int device_id)#

Open a device.

This function opens a device from a media with their respective IDs. The device ID is get from the media by calling vacq_media_get_topology() or vacq_media_get_device_id_by_name(). The range ID should be from 0 to the count of device in the media minus 1. To get the device count, you can use vacq_topology_get_device_list().

Parameters:
  • media_id[in] is the ID of the media

  • device_id[in] is the ID of the device to open

Returns:

a vacq_device if the device has been opened successfully or NULL.

VACQ_API int vacq_device_close(struct vacq_device *device)#

Close a device.

This function closes a device opened with vacq_device_open().

Parameters:

device[in] is a valid vacq_device to close

Returns:

0 if the device has been closed successfully, -1 otherwise.

VACQ_API int vacq_device_list_control(struct vacq_device *device, int pad_id, const struct vacq_control_desc **desc, unsigned int *count)#

Get control list of a device / device pad.

This function provides the control list available for the device or the device pad.

Parameters:
  • device[in] is a valid vacq_device

  • pad_id[in] is the pad ID of the device, or VACQ_PAD_NONE for device

  • desc[out] is a pointer to the returned list

  • count[out] is a pointer to the control count

Returns:

0 if the list has been generated successfully, -1 otherwise.

VACQ_API int vacq_device_get_control(struct vacq_device *device, int pad_id, struct vacq_control *control, unsigned int count)#

Get device / device pad control value(s).

This function can be used to get the value for one or more device or device pad control(s).

The control list must be filled with a valid control class and ID, and a size if the control holds an array. The function will set one of the value fields of the control structure with the actual control value.

Parameters:
  • device[in] is a valid vacq_device

  • pad_id[in] is the pad ID of the device, or VACQ_PAD_NONE for device

  • control[inout] is the control array to get

  • count[in] is the count of controls to get

Returns:

0 if the control(s) have been got, -1 otherwise.

VACQ_API int vacq_device_set_control(struct vacq_device *device, int pad_id, struct vacq_control *control, unsigned int count)#

Set device / device pad control value(s).

This function can be used to set a value for one or more device or device pad control(s).

The control list must be filled with a valid control class and ID, the value to set in the appropriate field, and a size if the control holds an array. The function will update the control structure value with the actual set value.

Parameters:
  • device[in] is a valid vacq_device

  • pad_id[in] is the pad ID of the device, or VACQ_PAD_NONE for device

  • control[inout] is the control array to set

  • count[in] is the count of controls to set

Returns:

0 if the control(s) have been set, -1 otherwise.