summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorUmang Jain <email@uajain.com>2020-07-31 18:14:14 +0000
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-07-31 23:33:23 +0300
commit3fe7c1cdb4e14aa4da0681103a33912f962c5cc8 (patch)
tree7e745dd645fe797851773b69a0059cb5b444008f /include
parent6042ded8e7ffb7c2d3bf02cfb5fd25f255abdfa3 (diff)
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 <email@uajain.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/internal/thread.h3
1 files changed, 2 insertions, 1 deletions
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 <libcamera/signal.h>
+#include "libcamera/internal/message.h"
#include "libcamera/internal/utils.h"
namespace libcamera {
@@ -47,7 +48,7 @@ public:
EventDispatcher *eventDispatcher();
void setEventDispatcher(std::unique_ptr<EventDispatcher> dispatcher);
- void dispatchMessages();
+ void dispatchMessages(Message::Type type = Message::Type::None);
protected:
int exec();