diff options
author | Jacopo Mondi <jacopo@jmondi.org> | 2019-01-21 17:27:55 +0100 |
---|---|---|
committer | Jacopo Mondi <jacopo@jmondi.org> | 2019-01-29 15:36:38 +0100 |
commit | ba8da0f2fcd087ac7a132eaa12d2ffc4083eb591 (patch) | |
tree | b7a6e7cf4a82d0913f5960097d05dfb76552818c /src/libcamera/include | |
parent | 267b91373b86f070b3b19ed1dd5c27d26261e277 (diff) |
libcamera: v4l2_device: Add methods to get/set format
Add methods to set and get the image format programmed on a V4L2Device
for both the single and multi planar use case.
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/libcamera/include')
-rw-r--r-- | src/libcamera/include/v4l2_device.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libcamera/include/v4l2_device.h b/src/libcamera/include/v4l2_device.h index c70959e6..f68b2b1d 100644 --- a/src/libcamera/include/v4l2_device.h +++ b/src/libcamera/include/v4l2_device.h @@ -86,10 +86,20 @@ public: const char *deviceName() const { return caps_.card(); } const char *busName() const { return caps_.bus_info(); } + int format(V4L2DeviceFormat *fmt); + int setFormat(V4L2DeviceFormat *fmt); + private: + int getFormatSingleplane(V4L2DeviceFormat *fmt); + int setFormatSingleplane(V4L2DeviceFormat *fmt); + + int getFormatMultiplane(V4L2DeviceFormat *fmt); + int setFormatMultiplane(V4L2DeviceFormat *fmt); + std::string deviceNode_; int fd_; V4L2Capability caps_; + enum v4l2_buf_type bufferType_; }; } /* namespace libcamera */ |