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,11 +9,11 @@
|
||||
#include <signal.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#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;
|
||||
@@ -33,7 +33,7 @@ protected:
|
||||
|
||||
int init()
|
||||
{
|
||||
dispatcher = CameraManager::instance()->eventDispatcher();
|
||||
dispatcher = Thread::current()->eventDispatcher();
|
||||
|
||||
struct sigaction sa = {};
|
||||
sa.sa_handler = &sigAlarmHandler;
|
||||
|
||||
Reference in New Issue
Block a user