| Message ID | 20251104134927.318841-2-antoine.bouyer@nxp.com |
|---|---|
| State | New |
| Headers | show |
| Series |
|
| Related | show |
Quoting Antoine Bouyer (2025-11-04 13:49:26) > Add an accessor for useCount_ parameter, so that PipelineHandler > child classes can access it to verify whether the media device > is already locked or not. > > Signed-off-by: Antoine Bouyer <antoine.bouyer@nxp.com> > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> > --- > include/libcamera/internal/pipeline_handler.h | 1 + > src/libcamera/pipeline_handler.cpp | 6 ++++++ > 2 files changed, 7 insertions(+) > > diff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h > index e89d6a33e398..2ca210d0ae4f 100644 > --- a/include/libcamera/internal/pipeline_handler.h > +++ b/include/libcamera/internal/pipeline_handler.h > @@ -73,6 +73,7 @@ public: > protected: > void registerCamera(std::shared_ptr<Camera> camera); > void hotplugMediaDevice(MediaDevice *media); > + unsigned int useCount() const { return useCount_; }; This is failing on CI here I'm afraid: In file included from src/libcamera/proxy/vimc_ipa_proxy.cpp:25: In file included from ../include/libcamera/internal/ipa_module.h:19: ../include/libcamera/internal/pipeline_handler.h:76:53: error: extra ';' after member function definition [-Werror,-Wextra-semi] 76 | unsigned int useCount() const { return useCount_; }; > > virtual int queueRequestDevice(Camera *camera, Request *request) = 0; > virtual void stopDevice(Camera *camera) = 0; > diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp > index e5f9e55c9783..15fb32566543 100644 > --- a/src/libcamera/pipeline_handler.cpp > +++ b/src/libcamera/pipeline_handler.cpp > @@ -811,6 +811,12 @@ void PipelineHandler::disconnect() > * \return The pipeline handler name > */ > > +/** > + * \fn PipelineHandler::useCount() > + * \brief Retrieve the pipeline handler's used camera count > + * \return The number of acquired cameras of the pipeline handler > + */ > + > /** > * \fn PipelineHandler::cameraManager() const > * \brief Retrieve the CameraManager that this pipeline handler belongs to > -- > 2.34.1 >
Hi Kieran Thanks for your review On 11/4/25 4:55 PM, Kieran Bingham wrote: > Caution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button > > > Quoting Antoine Bouyer (2025-11-04 13:49:26) >> Add an accessor for useCount_ parameter, so that PipelineHandler >> child classes can access it to verify whether the media device >> is already locked or not. >> >> Signed-off-by: Antoine Bouyer <antoine.bouyer@nxp.com> >> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> >> Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> >> --- >> include/libcamera/internal/pipeline_handler.h | 1 + >> src/libcamera/pipeline_handler.cpp | 6 ++++++ >> 2 files changed, 7 insertions(+) >> >> diff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h >> index e89d6a33e398..2ca210d0ae4f 100644 >> --- a/include/libcamera/internal/pipeline_handler.h >> +++ b/include/libcamera/internal/pipeline_handler.h >> @@ -73,6 +73,7 @@ public: >> protected: >> void registerCamera(std::shared_ptr<Camera> camera); >> void hotplugMediaDevice(MediaDevice *media); >> + unsigned int useCount() const { return useCount_; }; > > This is failing on CI here I'm afraid: > > In file included from src/libcamera/proxy/vimc_ipa_proxy.cpp:25: > In file included from ../include/libcamera/internal/ipa_module.h:19: > ../include/libcamera/internal/pipeline_handler.h:76:53: error: extra ';' after member function definition [-Werror,-Wextra-semi] > 76 | unsigned int useCount() const { return useCount_; }; > I really need to enable all these error flags to prevent such error in future :( Should I submit a v7 for it ? or can you handle it while applying the patch ? Thanks Antoine > >> >> virtual int queueRequestDevice(Camera *camera, Request *request) = 0; >> virtual void stopDevice(Camera *camera) = 0; >> diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp >> index e5f9e55c9783..15fb32566543 100644 >> --- a/src/libcamera/pipeline_handler.cpp >> +++ b/src/libcamera/pipeline_handler.cpp >> @@ -811,6 +811,12 @@ void PipelineHandler::disconnect() >> * \return The pipeline handler name >> */ >> >> +/** >> + * \fn PipelineHandler::useCount() >> + * \brief Retrieve the pipeline handler's used camera count >> + * \return The number of acquired cameras of the pipeline handler >> + */ >> + >> /** >> * \fn PipelineHandler::cameraManager() const >> * \brief Retrieve the CameraManager that this pipeline handler belongs to >> -- >> 2.34.1 >>
Quoting Antoine Bouyer (2025-11-04 16:18:40) > Hi Kieran > Thanks for your review > > On 11/4/25 4:55 PM, Kieran Bingham wrote: > > Caution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button > > > > > > Quoting Antoine Bouyer (2025-11-04 13:49:26) > >> Add an accessor for useCount_ parameter, so that PipelineHandler > >> child classes can access it to verify whether the media device > >> is already locked or not. > >> > >> Signed-off-by: Antoine Bouyer <antoine.bouyer@nxp.com> > >> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > >> Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> > >> --- > >> include/libcamera/internal/pipeline_handler.h | 1 + > >> src/libcamera/pipeline_handler.cpp | 6 ++++++ > >> 2 files changed, 7 insertions(+) > >> > >> diff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h > >> index e89d6a33e398..2ca210d0ae4f 100644 > >> --- a/include/libcamera/internal/pipeline_handler.h > >> +++ b/include/libcamera/internal/pipeline_handler.h > >> @@ -73,6 +73,7 @@ public: > >> protected: > >> void registerCamera(std::shared_ptr<Camera> camera); > >> void hotplugMediaDevice(MediaDevice *media); > >> + unsigned int useCount() const { return useCount_; }; > > > > This is failing on CI here I'm afraid: > > > > In file included from src/libcamera/proxy/vimc_ipa_proxy.cpp:25: > > In file included from ../include/libcamera/internal/ipa_module.h:19: > > ../include/libcamera/internal/pipeline_handler.h:76:53: error: extra ';' after member function definition [-Werror,-Wextra-semi] > > 76 | unsigned int useCount() const { return useCount_; }; > > > > I really need to enable all these error flags to prevent such error in > future :( > Should I submit a v7 for it ? or can you handle it while applying the > patch ? I think if it's just that it can be fixed while applying. > > Thanks > Antoine > > > > >> > >> virtual int queueRequestDevice(Camera *camera, Request *request) = 0; > >> virtual void stopDevice(Camera *camera) = 0; > >> diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp > >> index e5f9e55c9783..15fb32566543 100644 > >> --- a/src/libcamera/pipeline_handler.cpp > >> +++ b/src/libcamera/pipeline_handler.cpp > >> @@ -811,6 +811,12 @@ void PipelineHandler::disconnect() > >> * \return The pipeline handler name > >> */ > >> > >> +/** > >> + * \fn PipelineHandler::useCount() > >> + * \brief Retrieve the pipeline handler's used camera count > >> + * \return The number of acquired cameras of the pipeline handler > >> + */ > >> + > >> /** > >> * \fn PipelineHandler::cameraManager() const > >> * \brief Retrieve the CameraManager that this pipeline handler belongs to > >> -- > >> 2.34.1 > >> >
diff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h index e89d6a33e398..2ca210d0ae4f 100644 --- a/include/libcamera/internal/pipeline_handler.h +++ b/include/libcamera/internal/pipeline_handler.h @@ -73,6 +73,7 @@ public: protected: void registerCamera(std::shared_ptr<Camera> camera); void hotplugMediaDevice(MediaDevice *media); + unsigned int useCount() const { return useCount_; }; virtual int queueRequestDevice(Camera *camera, Request *request) = 0; virtual void stopDevice(Camera *camera) = 0; diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp index e5f9e55c9783..15fb32566543 100644 --- a/src/libcamera/pipeline_handler.cpp +++ b/src/libcamera/pipeline_handler.cpp @@ -811,6 +811,12 @@ void PipelineHandler::disconnect() * \return The pipeline handler name */ +/** + * \fn PipelineHandler::useCount() + * \brief Retrieve the pipeline handler's used camera count + * \return The number of acquired cameras of the pipeline handler + */ + /** * \fn PipelineHandler::cameraManager() const * \brief Retrieve the CameraManager that this pipeline handler belongs to