libcamera: include/libcamera/controls.h Source File

libcamera v0.7.1 Supporting cameras in Linux since 2019

Loading...
Searching...
No Matches
controls.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: LGPL-2.1-or-later */
2/*
3 * Copyright (C) 2019, Google Inc.
4 *
5 * Control handling
6 */
7
8#pragma once
9
10#include <assert.h>
11#include <map>
12#include <optional>
13#include <stdint.h>
14#include <string>
15#include <string_view>
16#include <unordered_map>
17#include <vector>
18
19#include <libcamera/base/class.h>
20#include <libcamera/base/flags.h>
21#include <libcamera/base/span.h>
22
23#include <libcamera/geometry.h>
24
25namespace libcamera {
26
27class ControlValidator;
28
29 enum ControlType {
30 ControlTypeNone,
31 ControlTypeBool,
32 ControlTypeByte,
33 ControlTypeUnsigned16,
34 ControlTypeUnsigned32,
35 ControlTypeInteger32,
36 ControlTypeInteger64,
37 ControlTypeFloat,
38 ControlTypeString,
39 ControlTypeRectangle,
40 ControlTypeSize,
41 ControlTypePoint,
42};
43
44namespace details {
45
46template<typename T, typename = void>
47struct control_type {
48};
49
50template<>
51struct control_type<void> {
52 static constexpr ControlType value = ControlTypeNone;
53 static constexpr std::size_t size = 0;
54};
55
56template<>
57struct control_type<bool> {
58 static constexpr ControlType value = ControlTypeBool;
59 static constexpr std::size_t size = 0;
60};
61
62template<>
63struct control_type<uint8_t> {
64 static constexpr ControlType value = ControlTypeByte;
65 static constexpr std::size_t size = 0;
66};
67
68template<>
69struct control_type<uint16_t> {
70 static constexpr ControlType value = ControlTypeUnsigned16;
71 static constexpr std::size_t size = 0;
72};
73
74template<>
75struct control_type<uint32_t> {
76 static constexpr ControlType value = ControlTypeUnsigned32;
77 static constexpr std::size_t size = 0;
78};
79
80template<>
81struct control_type<int32_t> {
82 static constexpr ControlType value = ControlTypeInteger32;
83 static constexpr std::size_t size = 0;
84};
85
86template<>
87struct control_type<int64_t> {
88 static constexpr ControlType value = ControlTypeInteger64;
89 static constexpr std::size_t size = 0;
90};
91
92template<>
93struct control_type<float> {
94 static constexpr ControlType value = ControlTypeFloat;
95 static constexpr std::size_t size = 0;
96};
97
98template<>
99struct control_type<std::string_view> {
100 static constexpr ControlType value = ControlTypeString;
101 static constexpr std::size_t size = 0;
102};
103
104template<>
105struct control_type<Rectangle> {
106 static constexpr ControlType value = ControlTypeRectangle;
107 static constexpr std::size_t size = 0;
108};
109
110template<>
111struct control_type<Size> {
112 static constexpr ControlType value = ControlTypeSize;
113 static constexpr std::size_t size = 0;
114};
115
116template<>
117struct control_type<Point> {
118 static constexpr ControlType value = ControlTypePoint;
119 static constexpr std::size_t size = 0;
120};
121
122template<typename T, std::size_t N>
123struct control_type<Span<T, N>, std::enable_if_t<control_type<std::remove_cv_t<T>>::size == 0>> : public control_type<std::remove_cv_t<T>> {
124 static constexpr std::size_t size = N;
125};
126
127template<typename T>
128struct control_type<T, std::enable_if_t<std::is_enum_v<T> && sizeof(T) == sizeof(int32_t)>> : public control_type<int32_t> {
129};
130
131} /* namespace details */
132
133 class ControlValue
134{
135public:
136 ControlValue();
137
138#ifndef __DOXYGEN__
139 template<typename T, std::enable_if_t<!details::is_span<T>::value &&
140 details::control_type<T>::value &&
141 !std::is_same<std::string_view, std::remove_cv_t<T>>::value,
142 std::nullptr_t> = nullptr>
143 ControlValue(const T &value)
144 : type_(ControlTypeNone), numElements_(0)
145 {
146 set(details::control_type<std::remove_cv_t<T>>::value, false,
147 &value, 1, sizeof(T));
148 }
149
150 template<typename T, std::enable_if_t<details::is_span<T>::value ||
151 std::is_same<std::string_view, std::remove_cv_t<T>>::value,
152 std::nullptr_t> = nullptr>
153#else
154 template<typename T>
155#endif
156 ControlValue(const T &value)
157 : type_(ControlTypeNone), numElements_(0)
158 {
159 set(details::control_type<std::remove_cv_t<T>>::value, true,
160 value.data(), value.size(), sizeof(typename T::value_type));
161 }
162
163 ~ControlValue();
164
165 ControlValue(const ControlValue &other);
166 ControlValue &operator=(const ControlValue &other);
167
168 ControlType type() const { return type_; }
169 bool isNone() const { return type_ == ControlTypeNone; }
170 bool isArray() const { return isArray_; }
171 std::size_t numElements() const { return numElements_; }
172 Span<const uint8_t> data() const;
173 Span<uint8_t> data();
174
175 std::string toString() const;
176
177 bool operator==(const ControlValue &other) const;
178 bool operator!=(const ControlValue &other) const
179 {
180 return !(*this == other);
181 }
182
183#ifndef __DOXYGEN__
184 template<typename T, std::enable_if_t<!details::is_span<T>::value &&
185 !std::is_same<std::string_view, std::remove_cv_t<T>>::value,
186 std::nullptr_t> = nullptr>
187 T get() const
188 {
189 assert(type_ == details::control_type<std::remove_cv_t<T>>::value);
190 assert(!isArray_);
191
192 return *reinterpret_cast<const T *>(data().data());
193 }
194
195 template<typename T, std::enable_if_t<details::is_span<T>::value ||
196 std::is_same<std::string_view, std::remove_cv_t<T>>::value,
197 std::nullptr_t> = nullptr>
198#else
199 template<typename T>
200#endif
201 T get() const
202 {
203 assert(type_ == details::control_type<std::remove_cv_t<T>>::value);
204 assert(isArray_);
205
206 using V = typename T::value_type;
207 const V *value = reinterpret_cast<const V *>(data().data());
208 return T{ value, numElements_ };
209 }
210
211#ifndef __DOXYGEN__
212 template<typename T, std::enable_if_t<!details::is_span<T>::value &&
213 !std::is_same<std::string_view, std::remove_cv_t<T>>::value,
214 std::nullptr_t> = nullptr>
215 void set(const T &value)
216 {
217 set(details::control_type<std::remove_cv_t<T>>::value, false,
218 reinterpret_cast<const void *>(&value), 1, sizeof(T));
219 }
220
221 template<typename T, std::enable_if_t<details::is_span<T>::value ||
222 std::is_same<std::string_view, std::remove_cv_t<T>>::value,
223 std::nullptr_t> = nullptr>
224#else
225 template<typename T>
226#endif
227 void set(const T &value)
228 {
229 set(details::control_type<std::remove_cv_t<T>>::value, true,
230 value.data(), value.size(), sizeof(typename T::value_type));
231 }
232
233 void reserve(ControlType type, bool isArray = false,
234 std::size_t numElements = 1);
235
236private:
237 ControlType type_ : 8;
238 bool isArray_;
239 std::size_t numElements_ : 32;
240 union {
241 uint64_t value_;
242 void *storage_;
243 };
244
245 void release();
246 void set(ControlType type, bool isArray, const void *data,
247 std::size_t numElements, std::size_t elementSize);
248};
249
250 class ControlId
251{
252public:
253 enum class Direction {
254 In = (1 << 0),
255 Out = (1 << 1),
256 };
257
258 using DirectionFlags = Flags<Direction>;
259
260 ControlId(unsigned int id, const std::string &name, const std::string &vendor,
261 ControlType type, DirectionFlags direction,
262 std::size_t size = 0,
263 const std::map<std::string, int32_t> &enumStrMap = {});
264
265 unsigned int id() const { return id_; }
266 const std::string &name() const { return name_; }
267 const std::string &vendor() const { return vendor_; }
268 ControlType type() const { return type_; }
269 DirectionFlags direction() const { return direction_; }
270 bool isInput() const { return !!(direction_ & Direction::In); }
271 bool isOutput() const { return !!(direction_ & Direction::Out); }
272 bool isArray() const { return size_ > 0; }
273 std::size_t size() const { return size_; }
274 const std::map<int32_t, std::string> &enumerators() const { return reverseMap_; }
275
276private:
277 LIBCAMERA_DISABLE_COPY_AND_MOVE(ControlId)
278
279 unsigned int id_;
280 std::string name_;
281 std::string vendor_;
282 ControlType type_;
283 DirectionFlags direction_;
284 std::size_t size_;
285 std::map<std::string, int32_t> enumStrMap_;
286 std::map<int32_t, std::string> reverseMap_;
287};
288
289 LIBCAMERA_FLAGS_ENABLE_OPERATORS(ControlId::Direction)
290
291static inline bool operator==(unsigned int lhs, const ControlId &rhs)
292{
293 return lhs == rhs.id();
294}
295
296static inline bool operator!=(unsigned int lhs, const ControlId &rhs)
297{
298 return !(lhs == rhs);
299}
300
301static inline bool operator==(const ControlId &lhs, unsigned int rhs)
302{
303 return lhs.id() == rhs;
304}
305
306static inline bool operator!=(const ControlId &lhs, unsigned int rhs)
307{
308 return !(lhs == rhs);
309}
310
311template<typename T>
312 class Control : public ControlId
313{
314public:
315 using type = T;
316
317 Control(unsigned int id, const char *name, const char *vendor,
318 ControlId::DirectionFlags direction,
319 const std::map<std::string, int32_t> &enumStrMap = {})
320 : ControlId(id, name, vendor, details::control_type<std::remove_cv_t<T>>::value,
321 direction, details::control_type<std::remove_cv_t<T>>::size, enumStrMap)
322 {
323 }
324
325private:
326 LIBCAMERA_DISABLE_COPY_AND_MOVE(Control)
327};
328
329 class ControlInfo
330{
331public:
332 explicit ControlInfo(const ControlValue &min = {},
333 const ControlValue &max = {},
334 const ControlValue &def = {});
335 explicit ControlInfo(Span<const ControlValue> values,
336 const ControlValue &def = {});
337
338 const ControlValue &min() const { return min_; }
339 const ControlValue &max() const { return max_; }
340 const ControlValue &def() const { return def_; }
341 const std::vector<ControlValue> &values() const { return values_; }
342
343 std::string toString() const;
344
345 bool operator==(const ControlInfo &other) const
346 {
347 return min_ == other.min_ && max_ == other.max_;
348 }
349
350 bool operator!=(const ControlInfo &other) const
351 {
352 return !(*this == other);
353 }
354
355private:
356 ControlValue min_;
357 ControlValue max_;
358 ControlValue def_;
359 std::vector<ControlValue> values_;
360};
361
362 using ControlIdMap = std::unordered_map<unsigned int, const ControlId *>;
363
364 class ControlInfoMap : private std::unordered_map<const ControlId *, ControlInfo>
365{
366public:
367 using Map = std::unordered_map<const ControlId *, ControlInfo>;
368
369 ControlInfoMap() = default;
370 ControlInfoMap(const ControlInfoMap &other) = default;
371 ControlInfoMap(std::initializer_list<Map::value_type> init,
372 const ControlIdMap &idmap);
373 ControlInfoMap(Map &&info, const ControlIdMap &idmap);
374
375 ControlInfoMap &operator=(const ControlInfoMap &other) = default;
376
377 using Map::key_type;
378 using Map::mapped_type;
379 using Map::value_type;
380 using Map::size_type;
381 using Map::iterator;
382 using Map::const_iterator;
383
384 using Map::begin;
385 using Map::cbegin;
386 using Map::end;
387 using Map::cend;
388 using Map::at;
389 using Map::empty;
390 using Map::size;
391 using Map::count;
392 using Map::find;
393
394 mapped_type &at(unsigned int key);
395 const mapped_type &at(unsigned int key) const;
396 size_type count(unsigned int key) const;
397 iterator find(unsigned int key);
398 const_iterator find(unsigned int key) const;
399
400 const ControlIdMap &idmap() const { return *idmap_; }
401
402private:
403 bool validate();
404
405 const ControlIdMap *idmap_ = nullptr;
406};
407
408 class ControlList
409{
410private:
411 using ControlListMap = std::unordered_map<unsigned int, ControlValue>;
412
413public:
414 enum class MergePolicy {
415 KeepExisting = 0,
416 OverwriteExisting,
417 };
418
419 ControlList();
420 ControlList(const ControlIdMap &idmap, const ControlValidator *validator = nullptr);
421 ControlList(const ControlInfoMap &infoMap, const ControlValidator *validator = nullptr);
422
423 using iterator = ControlListMap::iterator;
424 using const_iterator = ControlListMap::const_iterator;
425
426 iterator begin() { return controls_.begin(); }
427 iterator end() { return controls_.end(); }
428 const_iterator begin() const { return controls_.begin(); }
429 const_iterator end() const { return controls_.end(); }
430
431 bool empty() const { return controls_.empty(); }
432 std::size_t size() const { return controls_.size(); }
433
434 void clear() { controls_.clear(); }
435 void merge(const ControlList &source, MergePolicy policy = MergePolicy::KeepExisting);
436
437 bool contains(unsigned int id) const;
438
439 template<typename T>
440 std::optional<T> get(const Control<T> &ctrl) const
441 {
442 const auto entry = controls_.find(ctrl.id());
443 if (entry == controls_.end())
444 return std::nullopt;
445
446 const ControlValue &val = entry->second;
447 return val.get<T>();
448 }
449
450 template<typename T, typename V>
451 void set(const Control<T> &ctrl, const V &value)
452 {
453 ControlValue *val = find(ctrl.id());
454 if (!val)
455 return;
456
457 val->set<T>(value);
458 }
459
460 template<typename T, typename V, size_t Size>
461 void set(const Control<Span<T, Size>> &ctrl, const std::initializer_list<V> &value)
462 {
463 ControlValue *val = find(ctrl.id());
464 if (!val)
465 return;
466
467 val->set(Span<const typename std::remove_cv_t<V>, Size>{ value.begin(), value.size() });
468 }
469
470 const ControlValue &get(unsigned int id) const;
471 void set(unsigned int id, const ControlValue &value);
472
473 const ControlInfoMap *infoMap() const { return infoMap_; }
474 const ControlIdMap *idMap() const { return idmap_; }
475
476private:
477 const ControlValue *find(unsigned int id) const;
478 ControlValue *find(unsigned int id);
479
480 const ControlValidator *validator_;
481 const ControlIdMap *idmap_;
482 const ControlInfoMap *infoMap_;
483
484 ControlListMap controls_;
485};
486
487} /* namespace libcamera */
class.h
Utilities to help constructing class interfaces.
LIBCAMERA_DISABLE_COPY_AND_MOVE
#define LIBCAMERA_DISABLE_COPY_AND_MOVE(klass)
Disable copy and move construction and assignment of the klass.
Definition class.h:29
libcamera::ControlId
Control static metadata.
Definition controls.h:251
libcamera::ControlId::enumerators
const std::map< int32_t, std::string > & enumerators() const
Retrieve the map of enum values to enum names.
Definition controls.h:274
libcamera::ControlId::type
ControlType type() const
Retrieve the control data type.
Definition controls.h:268
libcamera::ControlId::name
const std::string & name() const
Retrieve the control name.
Definition controls.h:266
libcamera::ControlId::ControlId
ControlId(unsigned int id, const std::string &name, const std::string &vendor, ControlType type, DirectionFlags direction, std::size_t size=0, const std::map< std::string, int32_t > &enumStrMap={})
Construct a ControlId instance.
Definition controls.cpp:419
libcamera::ControlId::isOutput
bool isOutput() const
Determine if the control is available to be used in output metadata.
Definition controls.h:271
libcamera::ControlId::isInput
bool isInput() const
Determine if the control is available to be used as an input control.
Definition controls.h:270
libcamera::ControlId::DirectionFlags
Flags< Direction > DirectionFlags
A wrapper for ControlId::Direction so that it can be used as flags.
Definition controls.h:258
libcamera::ControlId::Direction
Direction
The direction the control is capable of being passed from/to.
Definition controls.h:253
libcamera::ControlId::Direction::Out
@ Out
The control can be returned as output in metadata.
Definition controls.h:255
libcamera::ControlId::Direction::In
@ In
The control can be passed as input in controls.
Definition controls.h:254
libcamera::ControlId::vendor
const std::string & vendor() const
Retrieve the vendor name.
Definition controls.h:267
libcamera::ControlId::isArray
bool isArray() const
Determine if the control is an array control.
Definition controls.h:272
libcamera::ControlId::direction
DirectionFlags direction() const
Return the direction that the control can be used in.
Definition controls.h:269
libcamera::ControlId::size
std::size_t size() const
Retrieve the size of the control if it is an array control.
Definition controls.h:273
libcamera::ControlId::id
unsigned int id() const
Retrieve the control numerical ID.
Definition controls.h:265
libcamera::ControlInfoMap
A map of ControlId to ControlInfo.
Definition controls.h:365
libcamera::ControlInfoMap::at
mapped_type & at(unsigned int key)
Access specified element by numerical ID.
Definition controls.cpp:805
libcamera::ControlInfoMap::idmap
const ControlIdMap & idmap() const
Retrieve the ControlId map.
Definition controls.h:400
libcamera::ControlInfoMap::operator=
ControlInfoMap & operator=(const ControlInfoMap &other)=default
Copy assignment operator, replace the contents with a copy of other.
libcamera::ControlInfoMap::find
iterator find(unsigned int key)
Find the element matching a numerical ID.
Definition controls.cpp:840
libcamera::ControlInfoMap::ControlInfoMap
ControlInfoMap(const ControlInfoMap &other)=default
Copy constructor, construct a ControlInfoMap from a copy of other.
libcamera::ControlInfoMap::count
size_type count(unsigned int key) const
Count the number of elements matching a numerical ID.
Definition controls.cpp:829
libcamera::ControlInfoMap::Map
std::unordered_map< const ControlId *, ControlInfo > Map
The base std::unsorted_map<> container.
Definition controls.h:367
libcamera::ControlInfo::values
const std::vector< ControlValue > & values() const
Retrieve the list of valid values.
Definition controls.h:341
libcamera::ControlInfo::toString
std::string toString() const
Provide a string representation of the ControlInfo.
Definition controls.cpp:670
libcamera::ControlInfo::ControlInfo
ControlInfo(const ControlValue &min={}, const ControlValue &max={}, const ControlValue &def={})
Construct a ControlInfo with minimum and maximum range parameters.
Definition controls.cpp:599
libcamera::ControlInfo::max
const ControlValue & max() const
Retrieve the maximum value of the control.
Definition controls.h:339
libcamera::ControlInfo::def
const ControlValue & def() const
Retrieve the default value of the control.
Definition controls.h:340
libcamera::ControlInfo::operator==
bool operator==(const ControlInfo &other) const
Compare ControlInfo instances for equality.
Definition controls.h:345
libcamera::ControlInfo::operator!=
bool operator!=(const ControlInfo &other) const
Compare ControlInfo instances for non equality.
Definition controls.h:350
libcamera::ControlInfo::min
const ControlValue & min() const
Retrieve the minimum value of the control.
Definition controls.h:338
libcamera::ControlList
Associate a list of ControlId with their values for an object.
Definition controls.h:409
libcamera::ControlList::empty
bool empty() const
Identify if the list is empty.
Definition controls.h:431
libcamera::ControlList::merge
void merge(const ControlList &source, MergePolicy policy=MergePolicy::KeepExisting)
Merge the source into the ControlList.
Definition controls.cpp:1012
libcamera::ControlList::iterator
ControlListMap::iterator iterator
Iterator for the controls contained within the list.
Definition controls.h:423
libcamera::ControlList::infoMap
const ControlInfoMap * infoMap() const
Retrieve the ControlInfoMap used to construct the ControlList.
Definition controls.h:473
libcamera::ControlList::end
iterator end()
Retrieve an iterator pointing to the past-the-end control in the list.
Definition controls.h:427
libcamera::ControlList::MergePolicy
MergePolicy
The policy used by the merge function.
Definition controls.h:414
libcamera::ControlList::MergePolicy::OverwriteExisting
@ OverwriteExisting
Existing controls in the target list are updated.
Definition controls.h:416
libcamera::ControlList::MergePolicy::KeepExisting
@ KeepExisting
Existing controls in the target list are kept.
Definition controls.h:415
libcamera::ControlList::size
std::size_t size() const
Retrieve the number of controls in the list.
Definition controls.h:432
libcamera::ControlList::set
void set(const Control< Span< T, Size > > &ctrl, const std::initializer_list< V > &value)
Set the control ctrl value to value.
Definition controls.h:461
libcamera::ControlList::set
void set(const Control< T > &ctrl, const V &value)
Set the control ctrl value to value.
Definition controls.h:451
libcamera::ControlList::clear
void clear()
Removes all controls from the list.
Definition controls.h:434
libcamera::ControlList::get
std::optional< T > get(const Control< T > &ctrl) const
Get the value of control ctrl.
Definition controls.h:440
libcamera::ControlList::begin
iterator begin()
Retrieve an iterator to the first Control in the list.
Definition controls.h:426
libcamera::ControlList::const_iterator
ControlListMap::const_iterator const_iterator
Const iterator for the controls contained within the list.
Definition controls.h:424
libcamera::ControlList::contains
bool contains(unsigned int id) const
Check if the list contains a control with the specified id.
Definition controls.cpp:1044
libcamera::ControlList::idMap
const ControlIdMap * idMap() const
Retrieve the ControlId map used to construct the ControlList.
Definition controls.h:474
libcamera::ControlList::begin
const_iterator begin() const
Retrieve a const_iterator to the first Control in the list.
Definition controls.h:428
libcamera::ControlList::ControlList
ControlList()
Construct a ControlList not associated with any object.
Definition controls.cpp:900
libcamera::ControlList::end
const_iterator end() const
Retrieve a const iterator pointing to the past-the-end control in the list.
Definition controls.h:429
libcamera::ControlValidator
Interface for the control validator.
Definition control_validator.h:17
libcamera::ControlValue
Abstract type representing the value of a control.
Definition controls.h:134
libcamera::ControlValue::ControlValue
ControlValue(const T &value)
Construct a ControlValue of type T.
Definition controls.h:156
libcamera::ControlValue::isArray
bool isArray() const
Determine if the value stores an array.
Definition controls.h:170
libcamera::ControlValue::numElements
std::size_t numElements() const
Retrieve the number of elements stored in the ControlValue.
Definition controls.h:171
libcamera::ControlValue::isNone
bool isNone() const
Determine if the value is not initialised.
Definition controls.h:169
libcamera::ControlValue::operator=
ControlValue & operator=(const ControlValue &other)
Replace the content of the ControlValue with a copy of the content of other.
Definition controls.cpp:152
libcamera::ControlValue::reserve
void reserve(ControlType type, bool isArray=false, std::size_t numElements=1)
Set the control type and reserve memory.
Definition controls.cpp:376
libcamera::ControlValue::operator==
bool operator==(const ControlValue &other) const
Compare ControlValue instances for equality.
Definition controls.cpp:300
libcamera::ControlValue::ControlValue
ControlValue()
Construct an empty ControlValue.
Definition controls.cpp:104
libcamera::ControlValue::operator!=
bool operator!=(const ControlValue &other) const
Compare ControlValue instances for non equality.
Definition controls.h:178
libcamera::ControlValue::toString
std::string toString() const
Assemble and return a string describing the value.
Definition controls.cpp:214
libcamera::ControlValue::set
void set(const T &value)
Set the control value to value.
Definition controls.h:227
libcamera::ControlValue::get
T get() const
Get the control value.
Definition controls.h:201
libcamera::ControlValue::type
ControlType type() const
Retrieve the data type of the value.
Definition controls.h:168
libcamera::ControlValue::data
Span< const uint8_t > data() const
Retrieve the raw data of a control value.
Definition controls.cpp:192
libcamera::Control
Describe a control and its intrinsic properties.
Definition controls.h:313
libcamera::Control::Control
Control(unsigned int id, const char *name, const char *vendor, ControlId::DirectionFlags direction, const std::map< std::string, int32_t > &enumStrMap={})
Construct a Control instance.
Definition controls.h:317
libcamera::Control::type
T type
The Control template type T.
Definition controls.h:315
libcamera::Flags
Type-safe container for enum-based bitfields.
Definition flags.h:16
libcamera::Size
Describe a two-dimensional size.
Definition geometry.h:51
flags.h
Enum-based bit fields.
LIBCAMERA_FLAGS_ENABLE_OPERATORS
#define LIBCAMERA_FLAGS_ENABLE_OPERATORS(_enum)
Enable bitwise operations on the enum enumeration.
Definition flags.h:189
geometry.h
Data structures related to geometric objects.
libcamera
Top-level libcamera namespace.
Definition backtrace.h:17
libcamera::ControlType
ControlType
Define the data type of a Control.
Definition controls.h:29
libcamera::ControlTypeUnsigned16
@ ControlTypeUnsigned16
Definition controls.h:33
libcamera::ControlTypeInteger32
@ ControlTypeInteger32
Definition controls.h:35
libcamera::ControlTypeBool
@ ControlTypeBool
Definition controls.h:31
libcamera::ControlTypeString
@ ControlTypeString
Definition controls.h:38
libcamera::ControlTypeUnsigned32
@ ControlTypeUnsigned32
Definition controls.h:34
libcamera::ControlTypeFloat
@ ControlTypeFloat
Definition controls.h:37
libcamera::ControlTypeByte
@ ControlTypeByte
Definition controls.h:32
libcamera::ControlTypeInteger64
@ ControlTypeInteger64
Definition controls.h:36
libcamera::ControlTypeNone
@ ControlTypeNone
Definition controls.h:30
libcamera::ControlIdMap
std::unordered_map< unsigned int, const ControlId * > ControlIdMap
A map of numerical control ID to ControlId.
Definition controls.h:362