[libcamera-devel,v1,3/4] pipeline: rpi: Rename RPi::Stream::setExternalBuffer()
diff mbox series

Message ID 20230721093759.27700-4-naush@raspberrypi.com
State Superseded
Headers show
Series
  • Raspberry Pi: External buffer handling
Related show

Commit Message

Naushir Patuck July 21, 2023, 9:37 a.m. UTC
Since we don't distinguish between externally and internally allocated
dma bufs, rename this function to setExportedBuffer() to clearer on its
function.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
---
 src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 2 +-
 src/libcamera/pipeline/rpi/common/rpi_stream.cpp    | 2 +-
 src/libcamera/pipeline/rpi/common/rpi_stream.h      | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

Comments

Jacopo Mondi July 24, 2023, 7:41 a.m. UTC | #1
Hi Naush

On Fri, Jul 21, 2023 at 10:37:58AM +0100, Naushir Patuck via libcamera-devel wrote:
> Since we don't distinguish between externally and internally allocated
> dma bufs, rename this function to setExportedBuffer() to clearer on its
> function.
>
> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>

Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>

Thanks
  j

> ---
>  src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 2 +-
>  src/libcamera/pipeline/rpi/common/rpi_stream.cpp    | 2 +-
>  src/libcamera/pipeline/rpi/common/rpi_stream.h      | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp
> index f244edc68a85..fc0c0ec3c53c 100644
> --- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp
> +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp
> @@ -764,7 +764,7 @@ int PipelineHandlerBase::queueRequestDevice(Camera *camera, Request *request)
>  			 * outside the v4l2 device. Store it in the stream buffer list
>  			 * so we can track it.
>  			 */
> -			stream->setExternalBuffer(buffer);
> +			stream->setExportedBuffer(buffer);
>  		}
>
>  		/*
> diff --git a/src/libcamera/pipeline/rpi/common/rpi_stream.cpp b/src/libcamera/pipeline/rpi/common/rpi_stream.cpp
> index 07b8de6875fe..e24531e171c8 100644
> --- a/src/libcamera/pipeline/rpi/common/rpi_stream.cpp
> +++ b/src/libcamera/pipeline/rpi/common/rpi_stream.cpp
> @@ -76,7 +76,7 @@ unsigned int Stream::getBufferId(FrameBuffer *buffer) const
>  	return it->first;
>  }
>
> -void Stream::setExternalBuffer(FrameBuffer *buffer)
> +void Stream::setExportedBuffer(FrameBuffer *buffer)
>  {
>  	bufferMap_.emplace(id_.get(), buffer);
>  }
> diff --git a/src/libcamera/pipeline/rpi/common/rpi_stream.h b/src/libcamera/pipeline/rpi/common/rpi_stream.h
> index ca591f99cc45..d1289c4679b9 100644
> --- a/src/libcamera/pipeline/rpi/common/rpi_stream.h
> +++ b/src/libcamera/pipeline/rpi/common/rpi_stream.h
> @@ -76,7 +76,7 @@ public:
>  	const BufferMap &getBuffers() const;
>  	unsigned int getBufferId(FrameBuffer *buffer) const;
>
> -	void setExternalBuffer(FrameBuffer *buffer);
> +	void setExportedBuffer(FrameBuffer *buffer);
>
>  	int prepareBuffers(unsigned int count);
>  	int queueBuffer(FrameBuffer *buffer);
> --
> 2.34.1
>

Patch
diff mbox series

diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp
index f244edc68a85..fc0c0ec3c53c 100644
--- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp
+++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp
@@ -764,7 +764,7 @@  int PipelineHandlerBase::queueRequestDevice(Camera *camera, Request *request)
 			 * outside the v4l2 device. Store it in the stream buffer list
 			 * so we can track it.
 			 */
-			stream->setExternalBuffer(buffer);
+			stream->setExportedBuffer(buffer);
 		}
 
 		/*
diff --git a/src/libcamera/pipeline/rpi/common/rpi_stream.cpp b/src/libcamera/pipeline/rpi/common/rpi_stream.cpp
index 07b8de6875fe..e24531e171c8 100644
--- a/src/libcamera/pipeline/rpi/common/rpi_stream.cpp
+++ b/src/libcamera/pipeline/rpi/common/rpi_stream.cpp
@@ -76,7 +76,7 @@  unsigned int Stream::getBufferId(FrameBuffer *buffer) const
 	return it->first;
 }
 
-void Stream::setExternalBuffer(FrameBuffer *buffer)
+void Stream::setExportedBuffer(FrameBuffer *buffer)
 {
 	bufferMap_.emplace(id_.get(), buffer);
 }
diff --git a/src/libcamera/pipeline/rpi/common/rpi_stream.h b/src/libcamera/pipeline/rpi/common/rpi_stream.h
index ca591f99cc45..d1289c4679b9 100644
--- a/src/libcamera/pipeline/rpi/common/rpi_stream.h
+++ b/src/libcamera/pipeline/rpi/common/rpi_stream.h
@@ -76,7 +76,7 @@  public:
 	const BufferMap &getBuffers() const;
 	unsigned int getBufferId(FrameBuffer *buffer) const;
 
-	void setExternalBuffer(FrameBuffer *buffer);
+	void setExportedBuffer(FrameBuffer *buffer);
 
 	int prepareBuffers(unsigned int count);
 	int queueBuffer(FrameBuffer *buffer);