From 83ae84eb13a2e057fd28f14300b57ff99544084c Mon Sep 17 00:00:00 2001 From: Kieran Bingham Date: Fri, 3 Jul 2020 12:34:59 +0100 Subject: android: camera_device: Support MJPEG stream construction MJPEG streams must be created referencing a libcamera stream. This stream may already be provided by the request configuration, in which case the existing stream is utilised. If no compatible stream is available to encode, a new stream is requested from the libcamera configuration. Reviewed-by: Jacopo Mondi Signed-off-by: Kieran Bingham --- src/android/camera_device.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/android/camera_device.h') diff --git a/src/android/camera_device.h b/src/android/camera_device.h index 4e5fb98c..7be9e119 100644 --- a/src/android/camera_device.h +++ b/src/android/camera_device.h @@ -23,15 +23,25 @@ #include "libcamera/internal/log.h" #include "libcamera/internal/message.h" +#include "jpeg/encoder.h" + class CameraMetadata; struct CameraStream { + CameraStream(libcamera::PixelFormat, libcamera::Size); + ~CameraStream(); + /* * The index of the libcamera StreamConfiguration as added during * configureStreams(). A single libcamera Stream may be used to deliver * one or more streams to the Android framework. */ unsigned int index; + + libcamera::PixelFormat format; + libcamera::Size size; + + Encoder *jpeg; }; class CameraDevice : protected libcamera::Loggable @@ -105,6 +115,8 @@ private: int facing_; int orientation_; + + unsigned int maxJpegBufferSize_; }; #endif /* __ANDROID_CAMERA_DEVICE_H__ */ -- cgit v1.2.1