[libcamera-devel] libcamera: pipeline: vimc: fix name of pipeline handler class

Message ID 20190208124100.7498-1-niklas.soderlund@ragnatech.se
State Accepted
Commit fd38fa66c38e80ca0974ca9aba2a0009f886028f
Headers show
Series
  • [libcamera-devel] libcamera: pipeline: vimc: fix name of pipeline handler class
Related show

Commit Message

Niklas Söderlund Feb. 8, 2019, 12:41 p.m. UTC
Rename the VIMC pipeline handler to match the naming convection.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
---
 src/libcamera/pipeline/vimc.cpp | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

Comments

Laurent Pinchart Feb. 8, 2019, 2:35 p.m. UTC | #1
Hi Niklas,

Thank you for the patch.

On Fri, Feb 08, 2019 at 01:41:00PM +0100, Niklas Söderlund wrote:
> Rename the VIMC pipeline handler to match the naming convection.
> 
> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>

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

> ---
>  src/libcamera/pipeline/vimc.cpp | 28 ++++++++++++++--------------
>  1 file changed, 14 insertions(+), 14 deletions(-)
> 
> diff --git a/src/libcamera/pipeline/vimc.cpp b/src/libcamera/pipeline/vimc.cpp
> index 0e9ad7b59ee57574..46840a4f410456d2 100644
> --- a/src/libcamera/pipeline/vimc.cpp
> +++ b/src/libcamera/pipeline/vimc.cpp
> @@ -19,11 +19,11 @@ namespace libcamera {
>  
>  LOG_DEFINE_CATEGORY(VIMC)
>  
> -class PipeHandlerVimc : public PipelineHandler
> +class PipelineHandlerVimc : public PipelineHandler
>  {
>  public:
> -	PipeHandlerVimc(CameraManager *manager);
> -	~PipeHandlerVimc();
> +	PipelineHandlerVimc(CameraManager *manager);
> +	~PipelineHandlerVimc();
>  
>  	std::map<Stream *, StreamConfiguration>
>  	streamConfiguration(Camera *camera,
> @@ -47,12 +47,12 @@ private:
>  	Stream stream_;
>  };
>  
> -PipeHandlerVimc::PipeHandlerVimc(CameraManager *manager)
> +PipelineHandlerVimc::PipelineHandlerVimc(CameraManager *manager)
>  	: PipelineHandler(manager), media_(nullptr), video_(nullptr)
>  {
>  }
>  
> -PipeHandlerVimc::~PipeHandlerVimc()
> +PipelineHandlerVimc::~PipelineHandlerVimc()
>  {
>  	delete video_;
>  
> @@ -61,7 +61,7 @@ PipeHandlerVimc::~PipeHandlerVimc()
>  }
>  
>  std::map<Stream *, StreamConfiguration>
> -PipeHandlerVimc::streamConfiguration(Camera *camera,
> +PipelineHandlerVimc::streamConfiguration(Camera *camera,
>  				     std::vector<Stream *> &streams)
>  {
>  	std::map<Stream *, StreamConfiguration> configs;
> @@ -79,7 +79,7 @@ PipeHandlerVimc::streamConfiguration(Camera *camera,
>  	return configs;
>  }
>  
> -int PipeHandlerVimc::configureStreams(Camera *camera,
> +int PipelineHandlerVimc::configureStreams(Camera *camera,
>  				      std::map<Stream *, StreamConfiguration> &config)
>  {
>  	StreamConfiguration *cfg = &config[&stream_];
> @@ -95,7 +95,7 @@ int PipeHandlerVimc::configureStreams(Camera *camera,
>  	return video_->setFormat(&format);
>  }
>  
> -int PipeHandlerVimc::allocateBuffers(Camera *camera, Stream *stream)
> +int PipelineHandlerVimc::allocateBuffers(Camera *camera, Stream *stream)
>  {
>  	const StreamConfiguration &cfg = stream->configuration();
>  
> @@ -104,22 +104,22 @@ int PipeHandlerVimc::allocateBuffers(Camera *camera, Stream *stream)
>  	return video_->exportBuffers(cfg.bufferCount, &stream->bufferPool());
>  }
>  
> -int PipeHandlerVimc::freeBuffers(Camera *camera, Stream *stream)
> +int PipelineHandlerVimc::freeBuffers(Camera *camera, Stream *stream)
>  {
>  	return video_->releaseBuffers();
>  }
>  
> -int PipeHandlerVimc::start(const Camera *camera)
> +int PipelineHandlerVimc::start(const Camera *camera)
>  {
>  	return video_->streamOn();
>  }
>  
> -void PipeHandlerVimc::stop(const Camera *camera)
> +void PipelineHandlerVimc::stop(const Camera *camera)
>  {
>  	video_->streamOff();
>  }
>  
> -int PipeHandlerVimc::queueRequest(const Camera *camera, Request *request)
> +int PipelineHandlerVimc::queueRequest(const Camera *camera, Request *request)
>  {
>  	Buffer *buffer = request->findBuffer(&stream_);
>  	if (!buffer) {
> @@ -134,7 +134,7 @@ int PipeHandlerVimc::queueRequest(const Camera *camera, Request *request)
>  	return 0;
>  }
>  
> -bool PipeHandlerVimc::match(DeviceEnumerator *enumerator)
> +bool PipelineHandlerVimc::match(DeviceEnumerator *enumerator)
>  {
>  	DeviceMatch dm("vimc");
>  
> @@ -169,6 +169,6 @@ bool PipeHandlerVimc::match(DeviceEnumerator *enumerator)
>  	return true;
>  }
>  
> -REGISTER_PIPELINE_HANDLER(PipeHandlerVimc);
> +REGISTER_PIPELINE_HANDLER(PipelineHandlerVimc);
>  
>  } /* namespace libcamera */
Niklas Söderlund Feb. 8, 2019, 2:42 p.m. UTC | #2
Hi Laurent,

Thanks for your feedback.

On 2019-02-08 16:35:01 +0200, Laurent Pinchart wrote:
> Hi Niklas,
> 
> Thank you for the patch.
> 
> On Fri, Feb 08, 2019 at 01:41:00PM +0100, Niklas Söderlund wrote:
> > Rename the VIMC pipeline handler to match the naming convection.
> > 
> > Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

As to not cause future conflicts on names I have now pushed this with 
your tag.

> 
> > ---
> >  src/libcamera/pipeline/vimc.cpp | 28 ++++++++++++++--------------
> >  1 file changed, 14 insertions(+), 14 deletions(-)
> > 
> > diff --git a/src/libcamera/pipeline/vimc.cpp b/src/libcamera/pipeline/vimc.cpp
> > index 0e9ad7b59ee57574..46840a4f410456d2 100644
> > --- a/src/libcamera/pipeline/vimc.cpp
> > +++ b/src/libcamera/pipeline/vimc.cpp
> > @@ -19,11 +19,11 @@ namespace libcamera {
> >  
> >  LOG_DEFINE_CATEGORY(VIMC)
> >  
> > -class PipeHandlerVimc : public PipelineHandler
> > +class PipelineHandlerVimc : public PipelineHandler
> >  {
> >  public:
> > -	PipeHandlerVimc(CameraManager *manager);
> > -	~PipeHandlerVimc();
> > +	PipelineHandlerVimc(CameraManager *manager);
> > +	~PipelineHandlerVimc();
> >  
> >  	std::map<Stream *, StreamConfiguration>
> >  	streamConfiguration(Camera *camera,
> > @@ -47,12 +47,12 @@ private:
> >  	Stream stream_;
> >  };
> >  
> > -PipeHandlerVimc::PipeHandlerVimc(CameraManager *manager)
> > +PipelineHandlerVimc::PipelineHandlerVimc(CameraManager *manager)
> >  	: PipelineHandler(manager), media_(nullptr), video_(nullptr)
> >  {
> >  }
> >  
> > -PipeHandlerVimc::~PipeHandlerVimc()
> > +PipelineHandlerVimc::~PipelineHandlerVimc()
> >  {
> >  	delete video_;
> >  
> > @@ -61,7 +61,7 @@ PipeHandlerVimc::~PipeHandlerVimc()
> >  }
> >  
> >  std::map<Stream *, StreamConfiguration>
> > -PipeHandlerVimc::streamConfiguration(Camera *camera,
> > +PipelineHandlerVimc::streamConfiguration(Camera *camera,
> >  				     std::vector<Stream *> &streams)
> >  {
> >  	std::map<Stream *, StreamConfiguration> configs;
> > @@ -79,7 +79,7 @@ PipeHandlerVimc::streamConfiguration(Camera *camera,
> >  	return configs;
> >  }
> >  
> > -int PipeHandlerVimc::configureStreams(Camera *camera,
> > +int PipelineHandlerVimc::configureStreams(Camera *camera,
> >  				      std::map<Stream *, StreamConfiguration> &config)
> >  {
> >  	StreamConfiguration *cfg = &config[&stream_];
> > @@ -95,7 +95,7 @@ int PipeHandlerVimc::configureStreams(Camera *camera,
> >  	return video_->setFormat(&format);
> >  }
> >  
> > -int PipeHandlerVimc::allocateBuffers(Camera *camera, Stream *stream)
> > +int PipelineHandlerVimc::allocateBuffers(Camera *camera, Stream *stream)
> >  {
> >  	const StreamConfiguration &cfg = stream->configuration();
> >  
> > @@ -104,22 +104,22 @@ int PipeHandlerVimc::allocateBuffers(Camera *camera, Stream *stream)
> >  	return video_->exportBuffers(cfg.bufferCount, &stream->bufferPool());
> >  }
> >  
> > -int PipeHandlerVimc::freeBuffers(Camera *camera, Stream *stream)
> > +int PipelineHandlerVimc::freeBuffers(Camera *camera, Stream *stream)
> >  {
> >  	return video_->releaseBuffers();
> >  }
> >  
> > -int PipeHandlerVimc::start(const Camera *camera)
> > +int PipelineHandlerVimc::start(const Camera *camera)
> >  {
> >  	return video_->streamOn();
> >  }
> >  
> > -void PipeHandlerVimc::stop(const Camera *camera)
> > +void PipelineHandlerVimc::stop(const Camera *camera)
> >  {
> >  	video_->streamOff();
> >  }
> >  
> > -int PipeHandlerVimc::queueRequest(const Camera *camera, Request *request)
> > +int PipelineHandlerVimc::queueRequest(const Camera *camera, Request *request)
> >  {
> >  	Buffer *buffer = request->findBuffer(&stream_);
> >  	if (!buffer) {
> > @@ -134,7 +134,7 @@ int PipeHandlerVimc::queueRequest(const Camera *camera, Request *request)
> >  	return 0;
> >  }
> >  
> > -bool PipeHandlerVimc::match(DeviceEnumerator *enumerator)
> > +bool PipelineHandlerVimc::match(DeviceEnumerator *enumerator)
> >  {
> >  	DeviceMatch dm("vimc");
> >  
> > @@ -169,6 +169,6 @@ bool PipeHandlerVimc::match(DeviceEnumerator *enumerator)
> >  	return true;
> >  }
> >  
> > -REGISTER_PIPELINE_HANDLER(PipeHandlerVimc);
> > +REGISTER_PIPELINE_HANDLER(PipelineHandlerVimc);
> >  
> >  } /* namespace libcamera */
> 
> -- 
> Regards,
> 
> Laurent Pinchart

Patch

diff --git a/src/libcamera/pipeline/vimc.cpp b/src/libcamera/pipeline/vimc.cpp
index 0e9ad7b59ee57574..46840a4f410456d2 100644
--- a/src/libcamera/pipeline/vimc.cpp
+++ b/src/libcamera/pipeline/vimc.cpp
@@ -19,11 +19,11 @@  namespace libcamera {
 
 LOG_DEFINE_CATEGORY(VIMC)
 
-class PipeHandlerVimc : public PipelineHandler
+class PipelineHandlerVimc : public PipelineHandler
 {
 public:
-	PipeHandlerVimc(CameraManager *manager);
-	~PipeHandlerVimc();
+	PipelineHandlerVimc(CameraManager *manager);
+	~PipelineHandlerVimc();
 
 	std::map<Stream *, StreamConfiguration>
 	streamConfiguration(Camera *camera,
@@ -47,12 +47,12 @@  private:
 	Stream stream_;
 };
 
-PipeHandlerVimc::PipeHandlerVimc(CameraManager *manager)
+PipelineHandlerVimc::PipelineHandlerVimc(CameraManager *manager)
 	: PipelineHandler(manager), media_(nullptr), video_(nullptr)
 {
 }
 
-PipeHandlerVimc::~PipeHandlerVimc()
+PipelineHandlerVimc::~PipelineHandlerVimc()
 {
 	delete video_;
 
@@ -61,7 +61,7 @@  PipeHandlerVimc::~PipeHandlerVimc()
 }
 
 std::map<Stream *, StreamConfiguration>
-PipeHandlerVimc::streamConfiguration(Camera *camera,
+PipelineHandlerVimc::streamConfiguration(Camera *camera,
 				     std::vector<Stream *> &streams)
 {
 	std::map<Stream *, StreamConfiguration> configs;
@@ -79,7 +79,7 @@  PipeHandlerVimc::streamConfiguration(Camera *camera,
 	return configs;
 }
 
-int PipeHandlerVimc::configureStreams(Camera *camera,
+int PipelineHandlerVimc::configureStreams(Camera *camera,
 				      std::map<Stream *, StreamConfiguration> &config)
 {
 	StreamConfiguration *cfg = &config[&stream_];
@@ -95,7 +95,7 @@  int PipeHandlerVimc::configureStreams(Camera *camera,
 	return video_->setFormat(&format);
 }
 
-int PipeHandlerVimc::allocateBuffers(Camera *camera, Stream *stream)
+int PipelineHandlerVimc::allocateBuffers(Camera *camera, Stream *stream)
 {
 	const StreamConfiguration &cfg = stream->configuration();
 
@@ -104,22 +104,22 @@  int PipeHandlerVimc::allocateBuffers(Camera *camera, Stream *stream)
 	return video_->exportBuffers(cfg.bufferCount, &stream->bufferPool());
 }
 
-int PipeHandlerVimc::freeBuffers(Camera *camera, Stream *stream)
+int PipelineHandlerVimc::freeBuffers(Camera *camera, Stream *stream)
 {
 	return video_->releaseBuffers();
 }
 
-int PipeHandlerVimc::start(const Camera *camera)
+int PipelineHandlerVimc::start(const Camera *camera)
 {
 	return video_->streamOn();
 }
 
-void PipeHandlerVimc::stop(const Camera *camera)
+void PipelineHandlerVimc::stop(const Camera *camera)
 {
 	video_->streamOff();
 }
 
-int PipeHandlerVimc::queueRequest(const Camera *camera, Request *request)
+int PipelineHandlerVimc::queueRequest(const Camera *camera, Request *request)
 {
 	Buffer *buffer = request->findBuffer(&stream_);
 	if (!buffer) {
@@ -134,7 +134,7 @@  int PipeHandlerVimc::queueRequest(const Camera *camera, Request *request)
 	return 0;
 }
 
-bool PipeHandlerVimc::match(DeviceEnumerator *enumerator)
+bool PipelineHandlerVimc::match(DeviceEnumerator *enumerator)
 {
 	DeviceMatch dm("vimc");
 
@@ -169,6 +169,6 @@  bool PipeHandlerVimc::match(DeviceEnumerator *enumerator)
 	return true;
 }
 
-REGISTER_PIPELINE_HANDLER(PipeHandlerVimc);
+REGISTER_PIPELINE_HANDLER(PipelineHandlerVimc);
 
 } /* namespace libcamera */