hi_mpi_vi_set_dev_attr

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product / Atlas A3 inference product

Atlas A2 training product / Atlas A2 inference product

Atlas 200I/500 A2 inference product

Atlas inference product

Atlas training product

Function Description

Sets the attributes of a VI device.

Before calling this API, ensure that the VI device is disabled. If the VI device is enabled, you can disable it by using hi_mpi_vi_disable_dev.

Prototype

hi_s32 hi_mpi_vi_set_dev_attr(hi_vi_dev vi_dev, const hi_vi_dev_attr *dev_attr)

Parameters

Parameter

Input/Output

Description

vi_dev

Input

VI device ID.

Value range: [0, 4)

dev_attr

Input

Pointer to the attributes of the VI device. Static attributes.

The dev_attr parameter is used to configure the attributes of a specified VI device, such as video interface mode, data type, image width, and image height, for connecting to peripheral sensors.

Returns

See Also

For details about the API call sequence, see Video Data Obtaining.