summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/libcamera/internal/pipeline_handler.h26
-rw-r--r--src/libcamera/pipeline/ipu3/ipu3.cpp2
-rw-r--r--src/libcamera/pipeline/raspberrypi/raspberrypi.cpp2
-rw-r--r--src/libcamera/pipeline/rkisp1/rkisp1.cpp2
-rw-r--r--src/libcamera/pipeline/simple/simple.cpp2
-rw-r--r--src/libcamera/pipeline/uvcvideo/uvcvideo.cpp2
-rw-r--r--src/libcamera/pipeline/vimc/vimc.cpp2
-rw-r--r--src/libcamera/pipeline_handler.cpp94
8 files changed, 9 insertions, 123 deletions
diff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h
index 24b0c5ca..1e48f707 100644
--- a/include/libcamera/internal/pipeline_handler.h
+++ b/include/libcamera/internal/pipeline_handler.h
@@ -7,14 +7,12 @@
#ifndef __LIBCAMERA_INTERNAL_PIPELINE_HANDLER_H__
#define __LIBCAMERA_INTERNAL_PIPELINE_HANDLER_H__
-#include <map>
#include <memory>
#include <set>
#include <string>
#include <sys/types.h>
#include <vector>
-#include <libcamera/base/class.h>
#include <libcamera/base/object.h>
#include <libcamera/controls.h>
@@ -34,23 +32,6 @@ class MediaDevice;
class PipelineHandler;
class Request;
-class CameraData
-{
-public:
- explicit CameraData(PipelineHandler *pipe)
- : pipe_(pipe)
- {
- }
- virtual ~CameraData() = default;
-
- PipelineHandler *pipe_;
- ControlInfoMap controlInfo_;
- ControlList properties_;
-
-private:
- LIBCAMERA_DISABLE_COPY(CameraData)
-};
-
class PipelineHandler : public std::enable_shared_from_this<PipelineHandler>,
public Object
{
@@ -87,15 +68,11 @@ public:
const char *name() const { return name_; }
protected:
- void registerCamera(std::shared_ptr<Camera> camera,
- std::unique_ptr<CameraData> data);
+ void registerCamera(std::shared_ptr<Camera> camera);
void hotplugMediaDevice(MediaDevice *media);
virtual int queueRequestDevice(Camera *camera, Request *request) = 0;
- CameraData *cameraData(const Camera *camera);
- const CameraData *cameraData(const Camera *camera) const;
-
CameraManager *manager_;
private:
@@ -104,7 +81,6 @@ private:
std::vector<std::shared_ptr<MediaDevice>> mediaDevices_;
std::vector<std::weak_ptr<Camera>> cameras_;
- std::map<const Camera *, std::unique_ptr<CameraData>> cameraData_;
const char *name_;
diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
index e0dc0f3d..e4d44b4d 100644
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
@@ -1166,7 +1166,7 @@ int PipelineHandlerIPU3::registerCameras()
std::shared_ptr<Camera> camera =
Camera::create(std::move(data), cameraId, streams);
- registerCamera(std::move(camera), nullptr);
+ registerCamera(std::move(camera));
LOG(IPU3, Info)
<< "Registered Camera[" << numCameras << "] \""
diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
index b615e4fa..b2674ac0 100644
--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
@@ -1108,7 +1108,7 @@ bool PipelineHandlerRPi::match(DeviceEnumerator *enumerator)
const std::string &id = data->sensor_->id();
std::shared_ptr<Camera> camera =
Camera::create(std::move(data), id, streams);
- registerCamera(std::move(camera), nullptr);
+ registerCamera(std::move(camera));
return true;
}
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
index 519abc7c..0bbe9ed8 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
@@ -974,7 +974,7 @@ int PipelineHandlerRkISP1::createCamera(MediaEntity *sensor)
const std::string &id = data->sensor_->id();
std::shared_ptr<Camera> camera =
Camera::create(std::move(data), id, streams);
- registerCamera(std::move(camera), nullptr);
+ registerCamera(std::move(camera));
return 0;
}
diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp
index 947f3f1f..ef7687ea 100644
--- a/src/libcamera/pipeline/simple/simple.cpp
+++ b/src/libcamera/pipeline/simple/simple.cpp
@@ -1050,7 +1050,7 @@ bool SimplePipelineHandler::match(DeviceEnumerator *enumerator)
const std::string &id = data->sensor_->id();
std::shared_ptr<Camera> camera =
Camera::create(std::move(data), id, streams);
- registerCamera(std::move(camera), nullptr);
+ registerCamera(std::move(camera));
registered = true;
}
diff --git a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
index b6b1fd35..973ecd5b 100644
--- a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
+++ b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
@@ -472,7 +472,7 @@ bool PipelineHandlerUVC::match(DeviceEnumerator *enumerator)
std::set<Stream *> streams{ &data->stream_ };
std::shared_ptr<Camera> camera =
Camera::create(std::move(data), id, streams);
- registerCamera(std::move(camera), nullptr);
+ registerCamera(std::move(camera));
/* Enable hot-unplug notifications. */
hotplugMediaDevice(media);
diff --git a/src/libcamera/pipeline/vimc/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp
index 1181806b..baeb6a7e 100644
--- a/src/libcamera/pipeline/vimc/vimc.cpp
+++ b/src/libcamera/pipeline/vimc/vimc.cpp
@@ -477,7 +477,7 @@ bool PipelineHandlerVimc::match(DeviceEnumerator *enumerator)
const std::string &id = data->sensor_->id();
std::shared_ptr<Camera> camera =
Camera::create(std::move(data), id, streams);
- registerCamera(std::move(camera), nullptr);
+ registerCamera(std::move(camera));
return true;
}
diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp
index 0e571d89..62d29cbe 100644
--- a/src/libcamera/pipeline_handler.cpp
+++ b/src/libcamera/pipeline_handler.cpp
@@ -40,55 +40,6 @@ namespace libcamera {
LOG_DEFINE_CATEGORY(Pipeline)
/**
- * \class CameraData
- * \brief Base class for platform-specific data associated with a camera
- *
- * The CameraData base abstract class represents platform specific-data
- * a pipeline handler might want to associate with a Camera to access them
- * at a later time.
- *
- * Pipeline handlers are expected to extend this base class with platform
- * specific implementation, associate instances of the derived classes
- * using the registerCamera() function, and access them at a later time
- * with cameraData().
- */
-
-/**
- * \fn CameraData::CameraData(PipelineHandler *pipe)
- * \brief Construct a CameraData instance for the given pipeline handler
- * \param[in] pipe The pipeline handler
- *
- * The reference to the pipeline handler is stored internally, the caller shall
- * guarantee that the pointer remains valid as long as the CameraData instance
- * exists.
- */
-
-/**
- * \var CameraData::pipe_
- * \brief The pipeline handler related to this CameraData instance
- *
- * The pipe_ pointer provides access to the PipelineHandler object that this
- * instance is related to. It is set when the CameraData instance is created
- * and remains valid until the instance is destroyed.
- */
-
-/**
- * \var CameraData::controlInfo_
- * \brief The set of controls supported by the camera
- *
- * The control information shall be initialised by the pipeline handler when
- * creating the camera, and shall not be modified afterwards.
- */
-
-/**
- * \var CameraData::properties_
- * \brief The list of properties supported by the camera
- *
- * The list of camera properties shall be initialised by the pipeline handler
- * when creating the camera, and shall not be modified afterwards.
- */
-
-/**
* \class PipelineHandler
* \brief Create and manage cameras based on a set of media devices
*
@@ -471,28 +422,14 @@ void PipelineHandler::completeRequest(Request *request)
/**
* \brief Register a camera to the camera manager and pipeline handler
* \param[in] camera The camera to be added
- * \param[in] data Pipeline-specific data for the camera
*
* This function is called by pipeline handlers to register the cameras they
- * handle with the camera manager. It associates the pipeline-specific \a data
- * with the camera, for later retrieval with cameraData(). Ownership of \a data
- * is transferred to the PipelineHandler.
+ * handle with the camera manager.
*
* \context This function shall be called from the CameraManager thread.
*/
-void PipelineHandler::registerCamera(std::shared_ptr<Camera> camera,
- std::unique_ptr<CameraData> data)
+void PipelineHandler::registerCamera(std::shared_ptr<Camera> camera)
{
- /*
- * To be removed once all pipeline handlers will have migrated from
- * CameraData to Camera::Private.
- */
- if (data) {
- camera->_d()->controlInfo_ = std::move(data->controlInfo_);
- camera->_d()->properties_ = std::move(data->properties_);
- }
-
- cameraData_[camera.get()] = std::move(data);
cameras_.push_back(camera);
if (mediaDevices_.empty())
@@ -587,33 +524,6 @@ void PipelineHandler::disconnect()
}
/**
- * \brief Retrieve the pipeline-specific data associated with a Camera
- * \param[in] camera The camera whose data to retrieve
- * \return A pointer to the pipeline-specific data passed to registerCamera().
- * The returned pointer is a borrowed reference and is guaranteed to remain
- * valid until the pipeline handler is destroyed. It shall not be deleted
- * manually by the caller.
- */
-CameraData *PipelineHandler::cameraData(const Camera *camera)
-{
- ASSERT(cameraData_.count(camera));
- return cameraData_[camera].get();
-}
-
-/**
- * \brief Retrieve the pipeline-specific data associated with a Camera
- * \param[in] camera The camera whose data to retrieve
- * \sa cameraData()
- * \return A const pointer to the pipeline-specific data passed to
- * registerCamera().
- */
-const CameraData *PipelineHandler::cameraData(const Camera *camera) const
-{
- ASSERT(cameraData_.count(camera));
- return cameraData_.at(camera).get();
-}
-
-/**
* \var PipelineHandler::manager_
* \brief The Camera manager associated with the pipeline handler
*