From 3c4b87244352552cce8d7a9c7b97ff85b39b3d58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= Date: Thu, 9 Jan 2020 15:20:44 +0100 Subject: v4l2: camera: Handle memory mapping of buffers directly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Laurent Pinchart --- src/v4l2/v4l2_camera.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/v4l2/v4l2_camera.h') 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 #include +#include #include "semaphore.h" @@ -53,14 +54,14 @@ public: void getStreamConfig(StreamConfiguration *streamConfig); std::vector 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(); -- cgit v1.2.1