summaryrefslogtreecommitdiff
path: root/src/android/camera_device.h
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2020-07-03 12:34:59 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2020-08-06 15:46:25 +0100
commit83ae84eb13a2e057fd28f14300b57ff99544084c (patch)
treeb797401f8253222dae78e41f249db50a6b75d084 /src/android/camera_device.h
parent998f4de65ebccf638b19a90172db74b2dc469c78 (diff)
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 <jacopo@jmondi.org> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/android/camera_device.h')
-rw-r--r--src/android/camera_device.h12
1 files changed, 12 insertions, 0 deletions
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__ */