libcamera: pipeline_handler: Pass a non-const Camera to methods
The start(), stop() and queueRequest() methods receive a const pointer to the related Camera object. The stop() request will need to modify the state of the camera, in order to report completion of pending requests. Un-constify the Camera pointer to that method, and update the start() and queueRequest() methods similarly for coherency. Signed-off-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:
parent
fedad60b76
commit
40439a933f
4 changed files with 21 additions and 21 deletions
|
@ -35,10 +35,10 @@ public:
|
|||
int allocateBuffers(Camera *camera, Stream *stream) override;
|
||||
int freeBuffers(Camera *camera, Stream *stream) override;
|
||||
|
||||
int start(const Camera *camera) override;
|
||||
void stop(const Camera *camera) override;
|
||||
int start(Camera *camera) override;
|
||||
void stop(Camera *camera) override;
|
||||
|
||||
int queueRequest(const Camera *camera, Request *request) override;
|
||||
int queueRequest(Camera *camera, Request *request) override;
|
||||
|
||||
bool match(DeviceEnumerator *enumerator);
|
||||
|
||||
|
@ -142,19 +142,19 @@ int PipelineHandlerVimc::freeBuffers(Camera *camera, Stream *stream)
|
|||
return data->video_->releaseBuffers();
|
||||
}
|
||||
|
||||
int PipelineHandlerVimc::start(const Camera *camera)
|
||||
int PipelineHandlerVimc::start(Camera *camera)
|
||||
{
|
||||
VimcCameraData *data = cameraData(camera);
|
||||
return data->video_->streamOn();
|
||||
}
|
||||
|
||||
void PipelineHandlerVimc::stop(const Camera *camera)
|
||||
void PipelineHandlerVimc::stop(Camera *camera)
|
||||
{
|
||||
VimcCameraData *data = cameraData(camera);
|
||||
data->video_->streamOff();
|
||||
}
|
||||
|
||||
int PipelineHandlerVimc::queueRequest(const Camera *camera, Request *request)
|
||||
int PipelineHandlerVimc::queueRequest(Camera *camera, Request *request)
|
||||
{
|
||||
VimcCameraData *data = cameraData(camera);
|
||||
Buffer *buffer = request->findBuffer(&data->stream_);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue