From 3fe7c1cdb4e14aa4da0681103a33912f962c5cc8 Mon Sep 17 00:00:00 2001 From: Umang Jain Date: Fri, 31 Jul 2020 18:14:14 +0000 Subject: libcamera: thread: Support selective message dispatch to thread Extend the current dispatchMessages() to support dispatching of selective messsages according to the Message::Type passed in the function argument. dispatchMessages() can now be called explicitly to force deliver selected type's message to the thread for processing (typically when event loop is not running). Signed-off-by: Umang Jain Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart --- include/libcamera/internal/thread.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/libcamera/internal/thread.h b/include/libcamera/internal/thread.h index 7b59e583..f6367a8f 100644 --- a/include/libcamera/internal/thread.h +++ b/include/libcamera/internal/thread.h @@ -14,6 +14,7 @@ #include +#include "libcamera/internal/message.h" #include "libcamera/internal/utils.h" namespace libcamera { @@ -47,7 +48,7 @@ public: EventDispatcher *eventDispatcher(); void setEventDispatcher(std::unique_ptr dispatcher); - void dispatchMessages(); + void dispatchMessages(Message::Type type = Message::Type::None); protected: int exec(); -- cgit v1.2.1