summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2021-08-23 15:35:52 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2021-08-25 21:39:26 +0100
commiteaf55054b5a160e263e497750e66fea4c41da0df (patch)
treebf9531bb9526905912e20edc9780cc1033e8caf6
parentc7980899237ea2b0f7dd9fa6fc2897f60adc840e (diff)
simple-cam: Fix the Buffer Allocation guidance
The Buffer Allocation notes contains a TODO. Improve the notes regarding the FrameBufferAllocation and remove the todo. Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rw-r--r--simple-cam.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/simple-cam.cpp b/simple-cam.cpp
index 2e646a5..735e6bf 100644
--- a/simple-cam.cpp
+++ b/simple-cam.cpp
@@ -274,10 +274,22 @@ int main()
* Buffer Allocation
*
* Now that a camera has been configured, it knows all about its
- * Streams sizes and formats, so we now have to ask it to reserve
- * memory for all of them.
+ * Streams sizes and formats. The captured images need to be stored in
+ * framebuffers which can either be provided by the application to the
+ * library, or allocated in the Camera and exposed to the application
+ * by libcamera.
+ *
+ * An application may decide to allocate framebuffers from elsewhere,
+ * for example in memory allocated by the display driver that will
+ * render the captured frames. The application will provide them to
+ * libcamera by constructing FrameBuffer instances to capture images
+ * directly into.
+ *
+ * Alternatively libcamera can help the application by exporting
+ * buffers allocated in the Camera using a FrameBufferAllocator
+ * instance and referencing a configured Camera to determine the
+ * appropriate buffer size and types to create.
*/
- /* TODO: Update the comment here too */
FrameBufferAllocator *allocator = new FrameBufferAllocator(camera);
for (StreamConfiguration &cfg : *config) {