libcamera: ProcessManager: make ProcessManager lifetime explicitly managed
If any Process instances are destroyed after the ProcessManager is destroyed, then a segfault will occur. Fix this by making the lifetime of the ProcessManager explicit, and make the CameraManager construct and deconstruct (automatically, via a member variable) the ProcessManager. Update the tests accordingly. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include "libcamera/internal/ipa_manager.h"
|
||||
#include "libcamera/internal/log.h"
|
||||
#include "libcamera/internal/pipeline_handler.h"
|
||||
#include "libcamera/internal/process.h"
|
||||
#include "libcamera/internal/thread.h"
|
||||
#include "libcamera/internal/utils.h"
|
||||
|
||||
@@ -67,6 +68,7 @@ private:
|
||||
std::unique_ptr<DeviceEnumerator> enumerator_;
|
||||
|
||||
IPAManager ipaManager_;
|
||||
ProcessManager processManager_;
|
||||
};
|
||||
|
||||
CameraManager::Private::Private(CameraManager *cm)
|
||||
|
||||
Reference in New Issue
Block a user