| Message ID | 20251028160453.3802642-2-antoine.bouyer@nxp.com |
|---|---|
| State | New |
| Headers | show |
| Series |
|
| Related | show |
Quoting Antoine Bouyer (2025-10-28 16:04:52) > Move the useCount_ parameter to protected instead of private, so that > PipelineHandler child classes could access it to verify whether the > media device is already locked or not. > > Signed-off-by: Antoine Bouyer <antoine.bouyer@nxp.com> > --- > include/libcamera/internal/pipeline_handler.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h > index e89d6a33e398..4cefa3c7aba2 100644 > --- a/include/libcamera/internal/pipeline_handler.h > +++ b/include/libcamera/internal/pipeline_handler.h > @@ -82,6 +82,7 @@ protected: > > CameraManager *manager_; > const unsigned int maxQueuedRequestsDevice_; > + unsigned int useCount_; Part of me wonders if we should have an accessor instead but I don't think that's completley required. Though I can't imagine why a derived pipeline handler should ever modify this value ... So for now: Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > > private: > void unlockMediaDevices(); > @@ -96,7 +97,6 @@ private: > std::vector<std::weak_ptr<Camera>> cameras_; > > const char *name_; > - unsigned int useCount_; > > friend class PipelineHandlerFactoryBase; > }; > -- > 2.34.1 >
diff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h index e89d6a33e398..4cefa3c7aba2 100644 --- a/include/libcamera/internal/pipeline_handler.h +++ b/include/libcamera/internal/pipeline_handler.h @@ -82,6 +82,7 @@ protected: CameraManager *manager_; const unsigned int maxQueuedRequestsDevice_; + unsigned int useCount_; private: void unlockMediaDevices(); @@ -96,7 +97,6 @@ private: std::vector<std::weak_ptr<Camera>> cameras_; const char *name_; - unsigned int useCount_; friend class PipelineHandlerFactoryBase; };
Move the useCount_ parameter to protected instead of private, so that PipelineHandler child classes could access it to verify whether the media device is already locked or not. Signed-off-by: Antoine Bouyer <antoine.bouyer@nxp.com> --- include/libcamera/internal/pipeline_handler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)