summaryrefslogtreecommitdiff
path: root/src/v4l2/v4l2_camera.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/v4l2/v4l2_camera.cpp')
-rw-r--r--src/v4l2/v4l2_camera.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/v4l2/v4l2_camera.cpp b/src/v4l2/v4l2_camera.cpp
index 2a507b9b..07f05a31 100644
--- a/src/v4l2/v4l2_camera.cpp
+++ b/src/v4l2/v4l2_camera.cpp
@@ -121,12 +121,6 @@ int V4L2Camera::configure(StreamConfiguration *streamConfigOut,
return 0;
}
-void *V4L2Camera::mmap(unsigned int index)
-{
- Stream *stream = *camera_->streams().begin();
- return stream->buffers()[index].planes()[0].mem();
-}
-
int V4L2Camera::allocBuffers(unsigned int count)
{
int ret = camera_->allocateBuffers();
@@ -138,6 +132,12 @@ void V4L2Camera::freeBuffers()
camera_->freeBuffers();
}
+FileDescriptor V4L2Camera::getBufferFd(unsigned int index)
+{
+ Stream *stream = *camera_->streams().begin();
+ return FileDescriptor(stream->buffers()[index].planes()[0].dmabuf());
+}
+
int V4L2Camera::streamOn()
{
if (isRunning_)