From 8702b9dac7bc3785102153a3b95085db01df17f9 Mon Sep 17 00:00:00 2001 From: Harvey Yang Date: Wed, 8 Feb 2023 03:33:18 +0000 Subject: android: jpeg: Pass StreamBuffer to Encoder::encoder To prepare for support of the JEA encoder in a following commit, which will need to access the buffer_handle_t of the destination buffer, pass the StreamBuffer to the Encoder::encoder() function. As the StreamBuffer contains the source FrameBuffer and the destination Span, drop them from the function arguments and access them directly from the StreamBuffer. Signed-off-by: Harvey Yang Reviewed-by: Laurent Pinchart Reviewed-by: Han-Lin Chen Signed-off-by: Laurent Pinchart --- src/android/jpeg/encoder.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/android/jpeg/encoder.h') diff --git a/src/android/jpeg/encoder.h b/src/android/jpeg/encoder.h index b974d367..31f26895 100644 --- a/src/android/jpeg/encoder.h +++ b/src/android/jpeg/encoder.h @@ -12,14 +12,15 @@ #include #include +#include "../camera_request.h" + class Encoder { public: virtual ~Encoder() = default; virtual int configure(const libcamera::StreamConfiguration &cfg) = 0; - virtual int encode(const libcamera::FrameBuffer &source, - libcamera::Span destination, + virtual int encode(Camera3RequestDescriptor::StreamBuffer *buffer, libcamera::Span exifData, unsigned int quality) = 0; }; -- cgit v1.2.1