[libcamera-devel,RFC,1/5] android: post_processor: Inherit from libcamera::Object
diff mbox series

Message ID 20210826213016.1829504-2-umang.jain@ideasonboard.com
State Superseded
Delegated to: Umang Jain
Headers show
Series
  • android: Async post-processing
Related show

Commit Message

Umang Jain Aug. 26, 2021, 9:30 p.m. UTC
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@ideasonboard.com>
---
 src/android/post_processor.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Patch
diff mbox series

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;