summaryrefslogtreecommitdiff
path: root/src/android/camera_buffer.h
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2021-02-25 17:51:54 +0100
committerJacopo Mondi <jacopo@jmondi.org>2021-03-03 09:50:28 +0100
commit1223da76a2671e9bbe05e286fb0ce8b29b55b529 (patch)
treebfb210f8a3da0b06fc42848c761199cbc52e2500 /src/android/camera_buffer.h
parenteba862b0e30e73d1e1b05845a8c932bc0ff576ee (diff)
android: camera_buffer: Add method to get the JPEG blob size
To maintain compatibility with platforms that do not provide a memory backend implementation add a method to be return the size of the buffer used for JPEG encoding capped to a maximum size. Platforms that implement a memory backend will always calculate the correct buffer size. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/android/camera_buffer.h')
-rw-r--r--src/android/camera_buffer.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/android/camera_buffer.h b/src/android/camera_buffer.h
index 2311cdaf..784fbd50 100644
--- a/src/android/camera_buffer.h
+++ b/src/android/camera_buffer.h
@@ -26,6 +26,8 @@ public:
libcamera::Span<const uint8_t> plane(unsigned int plane) const;
libcamera::Span<uint8_t> plane(unsigned int plane);
+
+ size_t jpegBufferSize(size_t maxJpegBufferSize) const;
};
#endif /* __ANDROID_CAMERA_BUFFER_H__ */