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:
@@ -7,11 +7,11 @@
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include <libcamera/camera_manager.h>
|
||||
#include <libcamera/event_dispatcher.h>
|
||||
#include <libcamera/timer.h>
|
||||
|
||||
#include "test.h"
|
||||
#include "thread.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace libcamera;
|
||||
@@ -62,7 +62,7 @@ protected:
|
||||
|
||||
int run()
|
||||
{
|
||||
EventDispatcher *dispatcher = CameraManager::instance()->eventDispatcher();
|
||||
EventDispatcher *dispatcher = Thread::current()->eventDispatcher();
|
||||
ManagedTimer timer;
|
||||
ManagedTimer timer2;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user