summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPaul Elder <paul.elder@ideasonboard.com>2020-07-04 17:51:27 +0900
committerPaul Elder <paul.elder@ideasonboard.com>2020-07-10 16:10:59 +0900
commitf1b449476cd82dd391bd8e078fb93181e2ec881c (patch)
tree11374600563ac1f652781f85796304ec29eb296f /include
parent5791fdc1cb98b7c1e7ef9cce3405d5e6013fa832 (diff)
libcamera: V4L2VideoDevice: Add tryFormat
Add tryFormat and its variations (meta, single-plane, multi-plane) to V4L2VideoDevice. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/internal/v4l2_videodevice.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/libcamera/internal/v4l2_videodevice.h b/include/libcamera/internal/v4l2_videodevice.h
index 4d21f5a0..fb4c0aab 100644
--- a/include/libcamera/internal/v4l2_videodevice.h
+++ b/include/libcamera/internal/v4l2_videodevice.h
@@ -186,6 +186,7 @@ public:
const V4L2Capability &caps() const { return caps_; }
int getFormat(V4L2DeviceFormat *format);
+ int tryFormat(V4L2DeviceFormat *format);
int setFormat(V4L2DeviceFormat *format);
std::map<V4L2PixelFormat, std::vector<SizeRange>> formats(uint32_t code = 0);
@@ -217,13 +218,13 @@ protected:
private:
int getFormatMeta(V4L2DeviceFormat *format);
- int setFormatMeta(V4L2DeviceFormat *format);
+ int trySetFormatMeta(V4L2DeviceFormat *format, bool set);
int getFormatMultiplane(V4L2DeviceFormat *format);
- int setFormatMultiplane(V4L2DeviceFormat *format);
+ int trySetFormatMultiplane(V4L2DeviceFormat *format, bool set);
int getFormatSingleplane(V4L2DeviceFormat *format);
- int setFormatSingleplane(V4L2DeviceFormat *format);
+ int trySetFormatSingleplane(V4L2DeviceFormat *format, bool set);
std::vector<V4L2PixelFormat> enumPixelformats(uint32_t code);
std::vector<SizeRange> enumSizes(V4L2PixelFormat pixelFormat);