[libcamera-devel,v4,5/9] libcamera: pipeline: raspberrypi: Remove const qualifier from RPiStream

Message ID 20200720091311.805092-6-naush@raspberrypi.com
State Superseded
Headers show
Series
  • Zero-copy RAW stream work
Related show

Commit Message

Naushir Patuck July 20, 2020, 9:13 a.m. UTC
For the zero-copy RAW capture feature, the RPiStream will have to be
modified. Remove the const qualifier in anticipation of the future
commits for this feature.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
---
 src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comments

Kieran Bingham July 21, 2020, 11:32 a.m. UTC | #1
Hi Naush,

On 20/07/2020 10:13, Naushir Patuck wrote:
> For the zero-copy RAW capture feature, the RPiStream will have to be
> modified. Remove the const qualifier in anticipation of the future
> commits for this feature.
> 
> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

> ---
>  src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> index 486345fa..8f6a999b 100644
> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> @@ -150,7 +150,7 @@ public:
>  	void ispOutputDequeue(FrameBuffer *buffer);
>  
>  	void clearIncompleteRequests();
> -	void handleStreamBuffer(FrameBuffer *buffer, const RPi::RPiStream *stream);
> +	void handleStreamBuffer(FrameBuffer *buffer, RPi::RPiStream *stream);
>  	void handleState();
>  
>  	CameraSensor *sensor_;
> @@ -1105,12 +1105,12 @@ done:
>  
>  void RPiCameraData::unicamBufferDequeue(FrameBuffer *buffer)
>  {
> -	const RPi::RPiStream *stream = nullptr;
> +	RPi::RPiStream *stream = nullptr;
>  
>  	if (state_ == State::Stopped)
>  		return;
>  
> -	for (RPi::RPiStream const &s : unicam_) {
> +	for (RPi::RPiStream &s : unicam_) {
>  		if (s.findFrameBuffer(buffer)) {
>  			stream = &s;
>  			break;
> @@ -1171,12 +1171,12 @@ void RPiCameraData::ispInputDequeue(FrameBuffer *buffer)
>  
>  void RPiCameraData::ispOutputDequeue(FrameBuffer *buffer)
>  {
> -	const RPi::RPiStream *stream = nullptr;
> +	RPi::RPiStream *stream = nullptr;
>  
>  	if (state_ == State::Stopped)
>  		return;
>  
> -	for (RPi::RPiStream const &s : isp_) {
> +	for (RPi::RPiStream &s : isp_) {
>  		if (s.findFrameBuffer(buffer)) {
>  			stream = &s;
>  			break;
> @@ -1257,7 +1257,7 @@ void RPiCameraData::clearIncompleteRequests()
>  	}
>  }
>  
> -void RPiCameraData::handleStreamBuffer(FrameBuffer *buffer, const RPi::RPiStream *stream)
> +void RPiCameraData::handleStreamBuffer(FrameBuffer *buffer, RPi::RPiStream *stream)
>  {
>  	if (stream->isExternal()) {
>  		if (!dropFrameCount_) {
>
Laurent Pinchart July 22, 2020, 3:02 p.m. UTC | #2
Hi Naush,

Thank you for the patch.

On Mon, Jul 20, 2020 at 10:13:07AM +0100, Naushir Patuck wrote:
> For the zero-copy RAW capture feature, the RPiStream will have to be
> modified. Remove the const qualifier in anticipation of the future
> commits for this feature.
> 
> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> index 486345fa..8f6a999b 100644
> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> @@ -150,7 +150,7 @@ public:
>  	void ispOutputDequeue(FrameBuffer *buffer);
>  
>  	void clearIncompleteRequests();
> -	void handleStreamBuffer(FrameBuffer *buffer, const RPi::RPiStream *stream);
> +	void handleStreamBuffer(FrameBuffer *buffer, RPi::RPiStream *stream);
>  	void handleState();
>  
>  	CameraSensor *sensor_;
> @@ -1105,12 +1105,12 @@ done:
>  
>  void RPiCameraData::unicamBufferDequeue(FrameBuffer *buffer)
>  {
> -	const RPi::RPiStream *stream = nullptr;
> +	RPi::RPiStream *stream = nullptr;
>  
>  	if (state_ == State::Stopped)
>  		return;
>  
> -	for (RPi::RPiStream const &s : unicam_) {
> +	for (RPi::RPiStream &s : unicam_) {
>  		if (s.findFrameBuffer(buffer)) {
>  			stream = &s;
>  			break;
> @@ -1171,12 +1171,12 @@ void RPiCameraData::ispInputDequeue(FrameBuffer *buffer)
>  
>  void RPiCameraData::ispOutputDequeue(FrameBuffer *buffer)
>  {
> -	const RPi::RPiStream *stream = nullptr;
> +	RPi::RPiStream *stream = nullptr;
>  
>  	if (state_ == State::Stopped)
>  		return;
>  
> -	for (RPi::RPiStream const &s : isp_) {
> +	for (RPi::RPiStream &s : isp_) {
>  		if (s.findFrameBuffer(buffer)) {
>  			stream = &s;
>  			break;
> @@ -1257,7 +1257,7 @@ void RPiCameraData::clearIncompleteRequests()
>  	}
>  }
>  
> -void RPiCameraData::handleStreamBuffer(FrameBuffer *buffer, const RPi::RPiStream *stream)
> +void RPiCameraData::handleStreamBuffer(FrameBuffer *buffer, RPi::RPiStream *stream)
>  {
>  	if (stream->isExternal()) {
>  		if (!dropFrameCount_) {

Patch

diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
index 486345fa..8f6a999b 100644
--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
@@ -150,7 +150,7 @@  public:
 	void ispOutputDequeue(FrameBuffer *buffer);
 
 	void clearIncompleteRequests();
-	void handleStreamBuffer(FrameBuffer *buffer, const RPi::RPiStream *stream);
+	void handleStreamBuffer(FrameBuffer *buffer, RPi::RPiStream *stream);
 	void handleState();
 
 	CameraSensor *sensor_;
@@ -1105,12 +1105,12 @@  done:
 
 void RPiCameraData::unicamBufferDequeue(FrameBuffer *buffer)
 {
-	const RPi::RPiStream *stream = nullptr;
+	RPi::RPiStream *stream = nullptr;
 
 	if (state_ == State::Stopped)
 		return;
 
-	for (RPi::RPiStream const &s : unicam_) {
+	for (RPi::RPiStream &s : unicam_) {
 		if (s.findFrameBuffer(buffer)) {
 			stream = &s;
 			break;
@@ -1171,12 +1171,12 @@  void RPiCameraData::ispInputDequeue(FrameBuffer *buffer)
 
 void RPiCameraData::ispOutputDequeue(FrameBuffer *buffer)
 {
-	const RPi::RPiStream *stream = nullptr;
+	RPi::RPiStream *stream = nullptr;
 
 	if (state_ == State::Stopped)
 		return;
 
-	for (RPi::RPiStream const &s : isp_) {
+	for (RPi::RPiStream &s : isp_) {
 		if (s.findFrameBuffer(buffer)) {
 			stream = &s;
 			break;
@@ -1257,7 +1257,7 @@  void RPiCameraData::clearIncompleteRequests()
 	}
 }
 
-void RPiCameraData::handleStreamBuffer(FrameBuffer *buffer, const RPi::RPiStream *stream)
+void RPiCameraData::handleStreamBuffer(FrameBuffer *buffer, RPi::RPiStream *stream)
 {
 	if (stream->isExternal()) {
 		if (!dropFrameCount_) {