[libcamera-devel] [RFC PATCH 1/5] android: post_processor: Inherit from libcamera::Object
Umang Jain
umang.jain at ideasonboard.com
Thu Aug 26 23:30:12 CEST 2021
Currently, the post processing of a stream happens synchronously in
CameraStream::process(). There is a plan to offload this processing to
a separate worker thread. In order to achieve that, we need to move
the post processor to a separate thread and invoke methods on it from
the CameraStream's thread. Object::moveToThread() and
Object::invokeMethod() shall be used respectively, to achieve that
goal. Hence, inherit the PostProcessor interface from libcamera::object.
Signed-off-by: Umang Jain <umang.jain at ideasonboard.com>
---
src/android/post_processor.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/android/post_processor.h b/src/android/post_processor.h
index ab2b2c60..b2b5bd55 100644
--- a/src/android/post_processor.h
+++ b/src/android/post_processor.h
@@ -7,6 +7,8 @@
#ifndef __ANDROID_POST_PROCESSOR_H__
#define __ANDROID_POST_PROCESSOR_H__
+#include <libcamera/base/object.h>
+
#include <libcamera/framebuffer.h>
#include <libcamera/stream.h>
@@ -14,7 +16,7 @@
class CameraMetadata;
-class PostProcessor
+class PostProcessor : public libcamera::Object
{
public:
virtual ~PostProcessor() = default;
--
2.31.1
More information about the libcamera-devel
mailing list