[libcamera-devel] [RFC 04/12] libcamera: pipelines: Switch to helper to resolve request from buffer
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Mon Nov 18 20:16:17 CET 2019
Hi Niklas,
Thank you for the patch.
On Mon, Oct 28, 2019 at 03:25:17AM +0100, Niklas Söderlund wrote:
> Use the pipeline helper instead of the soon to be removed request
> recorded in the buffer.
>
> Signed-off-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
Assuming we really need to remove the request pointer in the Buffer
class,
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
as this patch is fine in itself, but I still have doubts.
> ---
> src/libcamera/pipeline/ipu3/ipu3.cpp | 2 +-
> src/libcamera/pipeline/rkisp1/rkisp1.cpp | 2 +-
> src/libcamera/pipeline/uvcvideo.cpp | 2 +-
> src/libcamera/pipeline/vimc.cpp | 2 +-
> 4 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
> index ff90b729e558c3a3..8aa5f34febf16585 100644
> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp
> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
> @@ -948,7 +948,7 @@ void IPU3CameraData::imguInputBufferReady(Buffer *buffer)
> */
> void IPU3CameraData::imguOutputBufferReady(Buffer *buffer)
> {
> - Request *request = buffer->request();
> + Request *request = requestFromBuffer(buffer);
>
> if (!pipe_->completeBuffer(camera_, request, buffer))
> /* Request not completed yet, return here. */
> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> index cefdb54a06d440fb..0803572754364beb 100644
> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> @@ -991,7 +991,7 @@ void PipelineHandlerRkISP1::bufferReady(Buffer *buffer)
> {
> ASSERT(activeCamera_);
> RkISP1CameraData *data = cameraData(activeCamera_);
> - Request *request = buffer->request();
> + Request *request = data->requestFromBuffer(buffer);
>
> data->timeline_.bufferReady(buffer);
>
> diff --git a/src/libcamera/pipeline/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo.cpp
> index 5aa6a8f9e0b2b7a4..679d82d38227b991 100644
> --- a/src/libcamera/pipeline/uvcvideo.cpp
> +++ b/src/libcamera/pipeline/uvcvideo.cpp
> @@ -375,7 +375,7 @@ int UVCCameraData::init(MediaEntity *entity)
>
> void UVCCameraData::bufferReady(Buffer *buffer)
> {
> - Request *request = buffer->request();
> + Request *request = requestFromBuffer(buffer);
>
> pipe_->completeBuffer(camera_, request, buffer);
> pipe_->completeRequest(camera_, request);
> diff --git a/src/libcamera/pipeline/vimc.cpp b/src/libcamera/pipeline/vimc.cpp
> index 49b850cf0153020f..56898716a8cde074 100644
> --- a/src/libcamera/pipeline/vimc.cpp
> +++ b/src/libcamera/pipeline/vimc.cpp
> @@ -460,7 +460,7 @@ int VimcCameraData::init(MediaDevice *media)
>
> void VimcCameraData::bufferReady(Buffer *buffer)
> {
> - Request *request = buffer->request();
> + Request *request = requestFromBuffer(buffer);
>
> pipe_->completeBuffer(camera_, request, buffer);
> pipe_->completeRequest(camera_, request);
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list