[libcamera-devel] [PATCH v4 05/12] libcamera: request: Expose the Stream to Buffers map

Niklas Söderlund niklas.soderlund at ragnatech.se
Sun Apr 14 21:57:55 CEST 2019


Hi Jacopo,

Thanks for your work.

On 2019-04-09 21:25:41 +0200, Jacopo Mondi wrote:
> Add to the Request class a method to access the map to Stream to Buffer.
> 
> Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>

Reviewed-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>

> ---
>  include/libcamera/request.h |  2 ++
>  src/libcamera/request.cpp   | 10 ++++++++++
>  2 files changed, 12 insertions(+)
> 
> diff --git a/include/libcamera/request.h b/include/libcamera/request.h
> index 0dbd425115e8..2004312a2233 100644
> --- a/include/libcamera/request.h
> +++ b/include/libcamera/request.h
> @@ -37,6 +37,8 @@ public:
>  
>  	Status status() const { return status_; }
>  
> +	const std::map<Stream *, Buffer *> &bufferMap() const { return bufferMap_; }
> +
>  private:
>  	friend class Camera;
>  	friend class PipelineHandler;
> diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp
> index e0e77e972411..46f9add98fde 100644
> --- a/src/libcamera/request.cpp
> +++ b/src/libcamera/request.cpp
> @@ -106,6 +106,16 @@ Buffer *Request::findBuffer(Stream *stream) const
>   * \return The request completion status
>   */
>  
> +/**
> + * \fn Request::bufferMap()
> + * \brief Retrieve the request' stream to buffer map
> + *
> + * Return a reference to the map that associates each Stream part of the
> + * request to the Buffer the Stream output should be directed to.
> + *
> + * \return The map of Stream to Buffers
> + */
> +
>  /**
>   * \brief Prepare the resources for the completion handler
>   */
> -- 
> 2.21.0
> 
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel

-- 
Regards,
Niklas Söderlund


More information about the libcamera-devel mailing list