diff options
author | Harvey Yang <chenghaoyang@chromium.org> | 2023-02-08 03:33:16 +0000 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2023-02-10 00:47:41 +0200 |
commit | b64fa1363c289936da145fb8faf474838b514854 (patch) | |
tree | 743b5d789b80a344a8dfd09ea98793ea734171eb /src/android/camera_device.cpp | |
parent | 4843bfa66dc117e94ce61d2b70b89958a7c9af3d (diff) |
android: framebuffer: Add HALFrameBuffer and replace FrameBuffer
HALFrameBuffer is derived from FrameBuffer with access to
buffer_handle_t, which is needed for JEA usage.
Signed-off-by: Harvey Yang <chenghaoyang@chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Han-Lin Chen <hanlinchen@chromium.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/android/camera_device.cpp')
-rw-r--r-- | src/android/camera_device.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp index b20e389b..1f7ce440 100644 --- a/src/android/camera_device.cpp +++ b/src/android/camera_device.cpp @@ -30,6 +30,7 @@ #include "camera_hal_config.h" #include "camera_ops.h" #include "camera_request.h" +#include "hal_framebuffer.h" using namespace libcamera; @@ -771,7 +772,7 @@ int CameraDevice::configureStreams(camera3_stream_configuration_t *stream_list) return 0; } -std::unique_ptr<FrameBuffer> +std::unique_ptr<HALFrameBuffer> CameraDevice::createFrameBuffer(const buffer_handle_t camera3buffer, PixelFormat pixelFormat, const Size &size) { @@ -794,7 +795,7 @@ CameraDevice::createFrameBuffer(const buffer_handle_t camera3buffer, planes[i].length = buf.size(i); } - return std::make_unique<FrameBuffer>(planes); + return std::make_unique<HALFrameBuffer>(planes, camera3buffer); } int CameraDevice::processControls(Camera3RequestDescriptor *descriptor) |