summaryrefslogtreecommitdiff
path: root/test/ipc
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-08-18 03:11:27 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-08-19 19:06:37 +0300
commitfd0087b5d8608eb1dc1e1a3da5ddafd83d43fc79 (patch)
treeddaeac42ef501be42b40ab8cd40714cf107cfc0d /test/ipc
parent8c9deeb30fa6930019788b619ad9081d30c6a6e2 (diff)
test: Get event dispatcher from current thread
For all tests that don't otherwise require access to the camera manager, get the event dispatcher from the current thread instead of the camera manager. This prepares for the removal of CameraManager::instance(). Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'test/ipc')
-rw-r--r--test/ipc/unixsocket.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/ipc/unixsocket.cpp b/test/ipc/unixsocket.cpp
index 40a3a84a..f53042b8 100644
--- a/test/ipc/unixsocket.cpp
+++ b/test/ipc/unixsocket.cpp
@@ -15,12 +15,12 @@
#include <sys/wait.h>
#include <unistd.h>
-#include <libcamera/camera_manager.h>
#include <libcamera/event_dispatcher.h>
#include <libcamera/timer.h>
#include "ipc_unixsocket.h"
#include "test.h"
+#include "thread.h"
#include "utils.h"
#define CMD_CLOSE 0
@@ -47,7 +47,7 @@ public:
UnixSocketTestSlave()
: exitCode_(EXIT_FAILURE), exit_(false)
{
- dispatcher_ = CameraManager::instance()->eventDispatcher();
+ dispatcher_ = Thread::current()->eventDispatcher();
ipc_.readyRead.connect(this, &UnixSocketTestSlave::readyRead);
}
@@ -436,7 +436,7 @@ private:
return -ETIMEDOUT;
}
- CameraManager::instance()->eventDispatcher()->processEvents();
+ Thread::current()->eventDispatcher()->processEvents();
}
callResponse_ = nullptr;