test: Get event dispatcher from current thread

Get the event dispatcher from the current thread instead of the camera
manager. This prepares for the removal of
CameraManager::eventDispatcher().

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
Laurent Pinchart 2020-11-08 01:20:13 +02:00
parent 2d50b16645
commit a27057fc50
2 changed files with 5 additions and 2 deletions

View file

@ -17,6 +17,7 @@
#include "libcamera/internal/device_enumerator.h"
#include "libcamera/internal/media_device.h"
#include "libcamera/internal/thread.h"
#include "libcamera/internal/v4l2_videodevice.h"
#include "buffer_source.h"
@ -131,7 +132,7 @@ protected:
}
}
EventDispatcher *dispatcher = cm_->eventDispatcher();
EventDispatcher *dispatcher = Thread::current()->eventDispatcher();
Timer timer;
timer.start(1000);

View file

@ -11,6 +11,8 @@
#include <libcamera/framebuffer_allocator.h>
#include <libcamera/timer.h>
#include "libcamera/internal/thread.h"
#include "camera_test.h"
#include "test.h"
@ -131,7 +133,7 @@ protected:
}
}
EventDispatcher *dispatcher = cm_->eventDispatcher();
EventDispatcher *dispatcher = Thread::current()->eventDispatcher();
Timer timer;
timer.start(1000);