summaryrefslogtreecommitdiff
path: root/include/libcamera/buffer.h
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2019-06-28 15:11:34 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-07-14 16:01:09 +0300
commit9ed9d9b3c1a5e6a51e1aa869c758458c57c1a0f1 (patch)
tree88b7d397bcbded92bfda1d11e43a42cf191a02e0 /include/libcamera/buffer.h
parent689e8916caf11942286a1f1264e55dcb709d3939 (diff)
libcamera: stream: Map external buffers to indexes
Add and use an operation to assign to Buffer representing external memory locations an index at queueRequest() time. The index is used to identify the memory buffer to be queued to the video device once the buffer will be queued in a Request. In order to minimize relocations in the V4L2 backend, this method provides a best-effort caching mechanisms that attempts to reuse BufferMemory previously mapped to the buffer's dmabuf file descriptors, if any. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'include/libcamera/buffer.h')
-rw-r--r--include/libcamera/buffer.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/libcamera/buffer.h b/include/libcamera/buffer.h
index fc5c7d4c..7b657509 100644
--- a/include/libcamera/buffer.h
+++ b/include/libcamera/buffer.h
@@ -30,6 +30,8 @@ public:
unsigned int length() const { return length_; }
private:
+ friend class Stream;
+
int mmap();
int munmap();