[libcamera-devel] [PATCH v2 06/11] libcamera: pipeline: rpi_stream: Explicitly name requestBuffer
Niklas Söderlund
niklas.soderlund at ragnatech.se
Fri Oct 16 01:21:24 CEST 2020
Hi Kieran,
On 2020-10-15 23:37:45 +0100, Kieran Bingham wrote:
> The FrameBuffer used to track any addition to the reqeust in an
> under-run event was aliased against the returned buffer, being placed
> back on the availableBuffers_ queue.
>
> Rename the aliased variable to be more explicit that it is a separate
> Buffer.
>
> Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
> ---
> src/libcamera/pipeline/raspberrypi/rpi_stream.cpp | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp
> index 1a42cc17bcba..3a5dadab81e0 100644
> --- a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp
> +++ b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp
> @@ -163,9 +163,9 @@ void Stream::returnBuffer(FrameBuffer *buffer)
> * If so, do it now as availableBuffers_ will not be empty.
> */
> while (!requestBuffers_.empty()) {
> - FrameBuffer *buffer = requestBuffers_.front();
> + FrameBuffer *requestBuffer = requestBuffers_.front();
>
> - if (!buffer) {
> + if (!requestBuffer) {
> /*
> * We want to queue an internal buffer, but none
> * are available. Can't do anything, quit the loop.
> @@ -177,12 +177,12 @@ void Stream::returnBuffer(FrameBuffer *buffer)
> * We want to queue an internal buffer, and at least one
> * is available.
> */
> - buffer = availableBuffers_.front();
> + requestBuffer = availableBuffers_.front();
> availableBuffers_.pop();
> }
>
> requestBuffers_.pop();
> - queueToDevice(buffer);
> + queueToDevice(requestBuffer);
> }
> }
>
> --
> 2.25.1
>
> _______________________________________________
> 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