summaryrefslogtreecommitdiff
path: root/src/android/jpeg/encoder.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/android/jpeg/encoder.h')
-rw-r--r--src/android/jpeg/encoder.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/android/jpeg/encoder.h b/src/android/jpeg/encoder.h
new file mode 100644
index 00000000..f9eb88e6
--- /dev/null
+++ b/src/android/jpeg/encoder.h
@@ -0,0 +1,24 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ * Copyright (C) 2020, Google Inc.
+ *
+ * encoder.h - Image encoding interface
+ */
+#ifndef __ANDROID_JPEG_ENCODER_H__
+#define __ANDROID_JPEG_ENCODER_H__
+
+#include <libcamera/buffer.h>
+#include <libcamera/span.h>
+#include <libcamera/stream.h>
+
+class Encoder
+{
+public:
+ virtual ~Encoder() {};
+
+ virtual int configure(const libcamera::StreamConfiguration &cfg) = 0;
+ virtual int encode(const libcamera::FrameBuffer *source,
+ const libcamera::Span<uint8_t> &destination) = 0;
+};
+
+#endif /* __ANDROID_JPEG_ENCODER_H__ */