mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-23 08:35:07 +03:00
libcamera: controls: Expose raw data in ControlValue
Add a data() function to the ControlValue class to expose the raw data stored by the class as a Span<const uint8_t>. This will be useful to simplify the serialization of ControlValue instances. The size computation for the raw data is moved from the ControlSerializer, which is updated accordingly to use the data() function in order to access the size. Simplification of the ControlSerializer will happen in a subsequent change. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
954bf1f656
commit
cd0f7929ec
3 changed files with 27 additions and 12 deletions
|
@ -12,6 +12,8 @@
|
|||
#include <string>
|
||||
#include <unordered_map>
|
||||
|
||||
#include <libcamera/span.h>
|
||||
|
||||
namespace libcamera {
|
||||
|
||||
class ControlValidator;
|
||||
|
@ -65,6 +67,7 @@ public:
|
|||
|
||||
ControlType type() const { return type_; }
|
||||
bool isNone() const { return type_ == ControlTypeNone; }
|
||||
Span<const uint8_t> data() const;
|
||||
|
||||
std::string toString() const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue