[libcamera-devel] [PATCH v2 15/20] libcamera: ipu3: Remove camera_ from IPU3CameraConfiguration
Jacopo Mondi
jacopo at jmondi.org
Thu Jul 9 10:41:23 CEST 2020
The IPU3CameraConfiguration::camera_ shared pointer is not used.
Remove it.
Reviewed-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
---
src/libcamera/pipeline/ipu3/ipu3.cpp | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
index 1c6627e561c4..9a6e71514c90 100644
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
@@ -61,19 +61,13 @@ public:
class IPU3CameraConfiguration : public CameraConfiguration
{
public:
- IPU3CameraConfiguration(Camera *camera, IPU3CameraData *data);
+ IPU3CameraConfiguration(IPU3CameraData *data);
Status validate() override;
const StreamConfiguration &cio2Format() const { return cio2Configuration_; };
private:
- /*
- * The IPU3CameraData instance is guaranteed to be valid as long as the
- * corresponding Camera instance is valid. In order to borrow a
- * reference to the camera data, store a new reference to the camera.
- */
- std::shared_ptr<Camera> camera_;
IPU3CameraData *data_;
StreamConfiguration cio2Configuration_;
@@ -123,11 +117,9 @@ private:
MediaDevice *imguMediaDev_;
};
-IPU3CameraConfiguration::IPU3CameraConfiguration(Camera *camera,
- IPU3CameraData *data)
+IPU3CameraConfiguration::IPU3CameraConfiguration(IPU3CameraData *data)
: CameraConfiguration()
{
- camera_ = camera->shared_from_this();
data_ = data;
}
@@ -289,7 +281,7 @@ CameraConfiguration *PipelineHandlerIPU3::generateConfiguration(Camera *camera,
const StreamRoles &roles)
{
IPU3CameraData *data = cameraData(camera);
- IPU3CameraConfiguration *config = new IPU3CameraConfiguration(camera, data);
+ IPU3CameraConfiguration *config = new IPU3CameraConfiguration(data);
if (roles.empty())
return config;
--
2.27.0
More information about the libcamera-devel
mailing list