summaryrefslogtreecommitdiff
path: root/src/android/camera_device.h
diff options
context:
space:
mode:
authorHirokazu Honda <hiroh@chromium.org>2021-08-26 20:25:38 +0900
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-08-30 18:59:10 +0300
commitdde91916f16e7836d28ad4c394678f82c86dcc4b (patch)
tree63dfb2daa2fcbf874cd8fbfe85bfd2914e7fb01a /src/android/camera_device.h
parent94fb6b2f4d02707cac2a1c5c1a9d622eeaeb4c04 (diff)
android: camera_device: Fill offset and right length in CreateFrameBuffer()
CameraDevice::CreateFrameBuffer() fills the length of the buffer to each FrameBuffer::Plane::length. It should rather be the length of plane. This also changes CreateFrameBuffer() to fill offset of FrameBuffer::Plane. Signed-off-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/android/camera_device.h')
-rw-r--r--src/android/camera_device.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/android/camera_device.h b/src/android/camera_device.h
index dd9aebba..a5576927 100644
--- a/src/android/camera_device.h
+++ b/src/android/camera_device.h
@@ -21,6 +21,8 @@
#include <libcamera/camera.h>
#include <libcamera/framebuffer.h>
+#include <libcamera/geometry.h>
+#include <libcamera/pixel_format.h>
#include <libcamera/request.h>
#include <libcamera/stream.h>
@@ -91,7 +93,9 @@ private:
void stop();
- libcamera::FrameBuffer *createFrameBuffer(const buffer_handle_t camera3buffer);
+ libcamera::FrameBuffer *createFrameBuffer(const buffer_handle_t camera3buffer,
+ libcamera::PixelFormat pixelFormat,
+ const libcamera::Size &size);
void abortRequest(camera3_capture_request_t *request);
bool isValidRequest(camera3_capture_request_t *request) const;
void notifyShutter(uint32_t frameNumber, uint64_t timestamp);