summaryrefslogtreecommitdiff
path: root/src/libcamera/include
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2019-05-01 01:36:36 +0200
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2019-06-19 11:54:30 +0200
commit87e46f7f594ec9e1e4873df43807e66fc407c6a9 (patch)
treed81c801553662926e0b05637a599bd905c52f993 /src/libcamera/include
parentce02ea29cda94f065d857ae00101e2fef5467a40 (diff)
libcamera: v4l2_device: Add enumeration of pixelformats and frame sizes
Add methods to enumerate pixelformats and frame sizes from a V4L2 device. The interface is similar to how V4L2Subdevice enumerates mbus codes and frame sizes. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/libcamera/include')
-rw-r--r--src/libcamera/include/v4l2_device.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libcamera/include/v4l2_device.h b/src/libcamera/include/v4l2_device.h
index bdecc087..1a67850a 100644
--- a/src/libcamera/include/v4l2_device.h
+++ b/src/libcamera/include/v4l2_device.h
@@ -16,6 +16,7 @@
#include <libcamera/geometry.h>
#include <libcamera/signal.h>
+#include "formats.h"
#include "log.h"
namespace libcamera {
@@ -132,6 +133,7 @@ public:
int getFormat(V4L2DeviceFormat *format);
int setFormat(V4L2DeviceFormat *format);
+ ImageFormats formats();
int exportBuffers(BufferPool *pool);
int importBuffers(BufferPool *pool);
@@ -163,6 +165,9 @@ private:
int createPlane(Buffer *buffer, unsigned int plane,
unsigned int length);
+ std::vector<unsigned int> enumPixelformats();
+ std::vector<SizeRange> enumSizes(unsigned int pixelFormat);
+
Buffer *dequeueBuffer();
void bufferAvailable(EventNotifier *notifier);