libcamera: pipeline_handler: Allow to limit the number of queued requests
Add a maxQueuedRequestsDevice constructor parameter to allow pipeline handler classes to limit the maximum number of requests that get queued to the device in queueRequestDevice(). The default value is set to an arbitrary number of 32 which is big enough for all currently known use cases. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Umang Jain <uajain@igalia.com> Tested-by: Sven Püschel <s.pueschel@pengutronix.de>
This commit is contained in:
@@ -33,7 +33,8 @@ class PipelineHandler : public std::enable_shared_from_this<PipelineHandler>,
|
||||
public Object
|
||||
{
|
||||
public:
|
||||
PipelineHandler(CameraManager *manager);
|
||||
PipelineHandler(CameraManager *manager,
|
||||
unsigned int maxQueuedRequestsDevice = 32);
|
||||
virtual ~PipelineHandler();
|
||||
|
||||
virtual bool match(DeviceEnumerator *enumerator) = 0;
|
||||
@@ -80,6 +81,7 @@ protected:
|
||||
virtual void releaseDevice(Camera *camera);
|
||||
|
||||
CameraManager *manager_;
|
||||
const unsigned int maxQueuedRequestsDevice_;
|
||||
|
||||
private:
|
||||
void unlockMediaDevices();
|
||||
|
||||
Reference in New Issue
Block a user