summaryrefslogtreecommitdiff
path: root/src/android/camera_stream.h
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2020-10-03 11:28:47 +0200
committerJacopo Mondi <jacopo@jmondi.org>2020-10-07 16:07:44 +0200
commit9e95d5e4531039f8e21c65ea88be9ad6aaa1ced0 (patch)
treeddfafef1ab03c7fe27e181233a8ccd4e9ea56f63 /src/android/camera_stream.h
parent160bb0998bc47abefeb876be1ecbff9534960dbc (diff)
android: camera_device: Move processing to CameraStream
Move the JPEG processing procedure to the individual CameraStream by augmenting the class with a CameraStream::process() method. This allows removing the CameraStream::encoder() method. Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/android/camera_stream.h')
-rw-r--r--src/android/camera_stream.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/android/camera_stream.h b/src/android/camera_stream.h
index ccc822b4..d95c2a38 100644
--- a/src/android/camera_stream.h
+++ b/src/android/camera_stream.h
@@ -11,12 +11,15 @@
#include <hardware/camera3.h>
+#include <libcamera/buffer.h>
#include <libcamera/camera.h>
#include <libcamera/geometry.h>
#include <libcamera/pixel_format.h>
-class CameraDevice;
class Encoder;
+class CameraDevice;
+class CameraMetadata;
+class MappedCamera3Buffer;
class CameraStream
{
@@ -113,9 +116,10 @@ public:
const libcamera::Size &size() const { return size_; }
Type type() const { return type_; }
unsigned int index() const { return index_; }
- Encoder *encoder() const { return encoder_.get(); }
int configure(const libcamera::StreamConfiguration &cfg);
+ int process(const libcamera::FrameBuffer &source,
+ MappedCamera3Buffer *dest, CameraMetadata *metadata);
private:
CameraDevice *cameraDevice_;