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>
This commit is contained in:
@@ -9,12 +9,12 @@
|
||||
#include <unistd.h>
|
||||
#include <vector>
|
||||
|
||||
#include <libcamera/camera_manager.h>
|
||||
#include <libcamera/event_dispatcher.h>
|
||||
#include <libcamera/timer.h>
|
||||
|
||||
#include "process.h"
|
||||
#include "test.h"
|
||||
#include "thread.h"
|
||||
#include "utils.h"
|
||||
|
||||
using namespace std;
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
protected:
|
||||
int run()
|
||||
{
|
||||
EventDispatcher *dispatcher = CameraManager::instance()->eventDispatcher();
|
||||
EventDispatcher *dispatcher = Thread::current()->eventDispatcher();
|
||||
Timer timeout;
|
||||
|
||||
int exitCode = 42;
|
||||
|
||||
Reference in New Issue
Block a user