libcamera: v4l2_device: Replace V4L2ControlList with ControlList

The V4L2Device class uses V4L2ControlList as a controls container for
the getControls() and setControls() operations. Having a distinct
container from ControlList will makes the IPA API more complex, as it
needs to explicitly transport both types of lists. This will become even
more painful when implementing serialisation and deserialisation.

To simplify the IPA API and ease the implementation of serialisation and
deserialisation, replace usage of V4L2ControlList with ControlList in
the V4L2Device (and thus CameraSensor) API. The V4L2ControlList class
becomes a thin wrapper around ControlList that slightly simplifies the
creation of control lists for V4L2 controls, and may be removed in the
future.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Tested-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
Laurent Pinchart
2019-10-07 22:31:59 +03:00
parent 2fe723440a
commit 343978af0b
11 changed files with 128 additions and 289 deletions
+4 -3
View File
@@ -13,11 +13,12 @@
#include <libcamera/geometry.h>
#include "log.h"
#include "v4l2_controls.h"
namespace libcamera {
class ControlList;
class MediaEntity;
class V4L2ControlInfoMap;
class V4L2Subdevice;
struct V4L2SubdeviceFormat;
@@ -43,8 +44,8 @@ public:
int setFormat(V4L2SubdeviceFormat *format);
const V4L2ControlInfoMap &controls() const;
int getControls(V4L2ControlList *ctrls);
int setControls(V4L2ControlList *ctrls);
int getControls(ControlList *ctrls);
int setControls(ControlList *ctrls);
protected:
std::string logPrefix() const;