|
libcamera v0.7.0+1-4ceceb68
Supporting cameras in Linux since 2019
|
Type definitions for serialized controls. More...
#include <stdint.h>
Go to the source code of this file.
Classes | |
| struct | libcamera::ipa_controls_header |
| Serialized control packet header. More... | |
| struct | libcamera::ipa_control_value_entry |
| Description of a serialized ControlValue entry. More... | |
| struct | libcamera::ipa_control_list_entry |
| Description of a serialized ControlList entry. More... | |
| struct | libcamera::ipa_control_info_entry |
| Description of a serialized ControlInfo entry. More... | |
Namespaces | |
| namespace | libcamera |
| Top-level libcamera namespace. | |
Macros | |
| #define | IPA_CONTROLS_FORMAT_VERSION 2 |
| The current control serialization format version. | |
Enumerations | |
| enum | libcamera::ipa_controls_id_map_type { libcamera::IPA_CONTROL_ID_MAP_CONTROLS , libcamera::IPA_CONTROL_ID_MAP_PROPERTIES , libcamera::IPA_CONTROL_ID_MAP_V4L2 } |
| Enumerates the different control id map types. More... | |
Type definitions for serialized controls.
This file defines binary formats to store ControlList and ControlInfoMap instances in contiguous, self-contained memory areas called control packets. It describes the layout of the packets through a set of C structures. These formats shall be used when serializing ControlList and ControlInfoMap to transfer them through the IPA C interface and IPA IPC transports.
A control packet contains a list of entries, each of them describing a single control info or control value. The packet starts with a fixed-size header described by the ipa_controls_header structure, followed by an array of fixed-size entries. Each entry is associated with data, stored either directly in the entry, or in a data section after the entries array.
The following diagram describes the layout of the ControlList packet.
The packet header contains the size of the packet, the number of entries, and the offset from the beginning of the packet to the data section. The packet entries array immediately follows the header. The data section starts at the offset ipa_controls_header::data_offset from the beginning of the packet, and shall be aligned to a multiple of 8 bytes.
Entries are described by the ipa_control_list_entry structure. They contain the numerical ID of the control and an ipa_control_value_entry structure, which contains the type and the number of control values.
The control values are stored (as ipa_control_list_entry) in the data section in the platform's native format. The ipa_control_value_entry::offset field stores the offset from the beginning of the data section to the values.
All control values in the data section shall be stored in the same order as the respective control entries, shall be aligned to a multiple of 8 bytes, and shall be contiguous in memory.
Empty spaces may be present between the end of the entries array and the data section, and after the data section. They shall be ignored when parsing the packet.
The following diagram describes the layout of the ControlInfoMap packet.
The packet header is identical to the ControlList packet header.
Entries are described by the ipa_control_info_entry structure. They contain the numerical ID, direction (in/out) of the control, and three ipa_control_value_entry structures for the min, max, and def ControlValues that make up the ControlInfo.
The control info has no associated data in the data section; instead the three control values for min, max, and def are stored in the data section
The control values are stored (as ipa_control_list_entry) in the data section in the platform's native format. The ipa_control_value_entry::offset field stores the offset from the beginning of the data section to the values.
ipa_control_value_entry structures contain the relevant ControlValue information for the ControlInfo's min, max, and def respectively, and their associated data is stored in the data section.
The control info has no associated data in the data section. Instead the minimum, maximum, and default control values of the control info are stored n the data section in the platform's native data format. The ipa_control_value_entry::offset field stores the offset from the beginning of the data section to the control value data.
All control values in the data section shall be stored in the same order as the respective control info entries, in the order of min, max, def, and shall be aligned to a multiple of 8 bytes, and shall be contiguous in memory.
As with the ControlList packet, empty spaces may be present between the end of the entries array and the data section, and after the data section. They shall be ignored when parsing the packet.