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:
parent
8c9deeb30f
commit
fd0087b5d8
11 changed files with 24 additions and 25 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue