summaryrefslogtreecommitdiff
path: root/src/libcamera/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcamera/include')
-rw-r--r--src/libcamera/include/v4l2_subdevice.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/libcamera/include/v4l2_subdevice.h b/src/libcamera/include/v4l2_subdevice.h
index 9c077674..4a04eadf 100644
--- a/src/libcamera/include/v4l2_subdevice.h
+++ b/src/libcamera/include/v4l2_subdevice.h
@@ -32,6 +32,11 @@ struct V4L2SubdeviceFormat {
class V4L2Subdevice : public V4L2Device
{
public:
+ enum Whence {
+ ActiveFormat,
+ TryFormat,
+ };
+
explicit V4L2Subdevice(const MediaEntity *entity);
V4L2Subdevice(const V4L2Subdevice &) = delete;
V4L2Subdevice &operator=(const V4L2Subdevice &) = delete;
@@ -46,8 +51,10 @@ public:
ImageFormats formats(unsigned int pad);
- int getFormat(unsigned int pad, V4L2SubdeviceFormat *format);
- int setFormat(unsigned int pad, V4L2SubdeviceFormat *format);
+ int getFormat(unsigned int pad, V4L2SubdeviceFormat *format,
+ Whence whence = ActiveFormat);
+ int setFormat(unsigned int pad, V4L2SubdeviceFormat *format,
+ Whence whence = ActiveFormat);
static V4L2Subdevice *fromEntityName(const MediaDevice *media,
const std::string &entity);