summaryrefslogtreecommitdiff
path: root/src/v4l2/v4l2_camera.h
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-01-09 15:20:44 +0100
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-01-12 16:10:37 +0100
commit3c4b87244352552cce8d7a9c7b97ff85b39b3d58 (patch)
treee59a72b49992ac75b612e60bff14986c588c4d9a /src/v4l2/v4l2_camera.h
parent35ac23dca19ea31f17a526679a697e3e327e6af1 (diff)
v4l2: camera: Handle memory mapping of buffers directly
In the upcoming FrameBuffer API the memory mapping of buffers will be left to the user of the FrameBuffer objects. Prepare the V4L2 compatibility layer to this upcoming change to ease conversion to the new API. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/v4l2/v4l2_camera.h')
-rw-r--r--src/v4l2/v4l2_camera.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/v4l2/v4l2_camera.h b/src/v4l2/v4l2_camera.h
index 81f7908e..f760316c 100644
--- a/src/v4l2/v4l2_camera.h
+++ b/src/v4l2/v4l2_camera.h
@@ -14,6 +14,7 @@
#include <libcamera/buffer.h>
#include <libcamera/camera.h>
+#include <libcamera/file_descriptor.h>
#include "semaphore.h"
@@ -53,14 +54,14 @@ public:
void getStreamConfig(StreamConfiguration *streamConfig);
std::vector<V4L2FrameMetadata> completedBuffers();
- void *mmap(unsigned int index);
-
int configure(StreamConfiguration *streamConfigOut,
const Size &size, PixelFormat pixelformat,
unsigned int bufferCount);
int allocBuffers(unsigned int count);
void freeBuffers();
+ FileDescriptor getBufferFd(unsigned int index);
+
int streamOn();
int streamOff();