libcamera: pipeline: Introduce stopDevice()
Since a queue of waiting Requests has been introduced, not all Requests queued to the PipelineHandler are immediately queued to the device. As a Camera can be stopped at any time, it is required to complete the waiting requests after the ones queued to the device had been completed. Introduce a pure virtual PipelineHandler::stopDevice() function to be implemented by pipeline handlers and make the PipelineHandler::stop() function call it before completing pending requests. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
@@ -298,7 +298,7 @@ public:
|
||||
std::vector<std::unique_ptr<FrameBuffer>> *buffers) override;
|
||||
|
||||
int start(Camera *camera, const ControlList *controls) override;
|
||||
void stop(Camera *camera) override;
|
||||
void stopDevice(Camera *camera) override;
|
||||
|
||||
int queueRequestDevice(Camera *camera, Request *request) override;
|
||||
|
||||
@@ -943,7 +943,7 @@ int PipelineHandlerRPi::start(Camera *camera, const ControlList *controls)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void PipelineHandlerRPi::stop(Camera *camera)
|
||||
void PipelineHandlerRPi::stopDevice(Camera *camera)
|
||||
{
|
||||
RPiCameraData *data = cameraData(camera);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user