summaryrefslogtreecommitdiff
path: root/src/cam/capture.cpp
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-01-10 18:41:30 +0100
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-01-12 16:10:38 +0100
commitc89cfa534ba1d35e35de7d33c57a6c2906a5b11f (patch)
tree750a2919d7f91405407474bd3e9aaebff1867403 /src/cam/capture.cpp
parent164fbf17ff4f9798b4d43606d7cd70578ed46747 (diff)
cam: Cache buffer memory mapping
With the buffer allocator in use it's possible to cache the dmabuf memory mappings when starting the camera instead of mapping and unmapping them each time. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/cam/capture.cpp')
-rw-r--r--src/cam/capture.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cam/capture.cpp b/src/cam/capture.cpp
index dd078eb0..738fa1c2 100644
--- a/src/cam/capture.cpp
+++ b/src/cam/capture.cpp
@@ -116,6 +116,9 @@ int Capture::capture(EventLoop *loop, FrameBufferAllocator *allocator)
<< std::endl;
return ret;
}
+
+ if (writer_)
+ writer_->mapBuffer(buffer.get());
}
requests.push_back(request);