libcamera: camera_manager: Bind CameraManager to threads
The CameraManager class uses the event dispatcher of the current thread. This makes the CameraManager::eventDispatcher() and CameraManager::setEventDispatcher() methods inconsistent, as they access different event dispatcher instances depending on the calling thread. Fix this by inheriting from the Object class, which binds the CameraManager to a thread, and use the event dispatcher of the bound thread. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
@@ -11,6 +11,8 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <libcamera/object.h>
|
||||
|
||||
namespace libcamera {
|
||||
|
||||
class Camera;
|
||||
@@ -18,7 +20,7 @@ class DeviceEnumerator;
|
||||
class EventDispatcher;
|
||||
class PipelineHandler;
|
||||
|
||||
class CameraManager
|
||||
class CameraManager : public Object
|
||||
{
|
||||
public:
|
||||
int start();
|
||||
|
||||
Reference in New Issue
Block a user