libcamera: pipeline_handler: Add createIPA() function
IPA proxies are created with a call to IPAManager::createIPA(), which is a static member function. This requires a complicated dance in the createIPA() function to retrieve the IPAManager instance through the camera manager, itself retrieved from the pipeline handler. Simplify the code by turning IPAManager::createIPA() into a non-static member function, and providing a wrapper in the PipelineHandler class to keep instantiation of IPA proxies easy in pipeline handlers. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>
This commit is contained in:
@@ -17,11 +17,13 @@
|
||||
#include <libcamera/controls.h>
|
||||
#include <libcamera/stream.h>
|
||||
|
||||
#include "libcamera/internal/camera_manager.h"
|
||||
#include "libcamera/internal/ipa_manager.h"
|
||||
|
||||
namespace libcamera {
|
||||
|
||||
class Camera;
|
||||
class CameraConfiguration;
|
||||
class CameraManager;
|
||||
class DeviceEnumerator;
|
||||
class DeviceMatch;
|
||||
class FrameBuffer;
|
||||
@@ -70,6 +72,13 @@ public:
|
||||
|
||||
CameraManager *cameraManager() const { return manager_; }
|
||||
|
||||
template<typename T>
|
||||
std::unique_ptr<T> createIPA(uint32_t minVersion, uint32_t maxVersion)
|
||||
{
|
||||
IPAManager *ipaManager = manager_->_d()->ipaManager();
|
||||
return ipaManager->createIPA<T>(this, minVersion, maxVersion);
|
||||
}
|
||||
|
||||
protected:
|
||||
void registerCamera(std::shared_ptr<Camera> camera);
|
||||
void hotplugMediaDevice(std::shared_ptr<MediaDevice> media);
|
||||
|
||||
Reference in New Issue
Block a user