[libcamera-devel] [PATCH v2 10/12] libcamera: camera_manager: add CameraManager class
Niklas Söderlund
niklas.soderlund at ragnatech.se
Mon Dec 31 00:22:00 CET 2018
Hi Laurent,
Thanks for your feedback.
On 2018-12-31 01:04:08 +0200, Laurent Pinchart wrote:
[snip]
> > +/**
> > + * \brief List all detected cameras
> > + *
> > + * Before calling this function the caller is responsible to make sure
> > + * the camera manger is running.
> > + *
> > + * \return List of names for all detected cameras
> > + */
> > +std::vector<std::string> CameraManager::list() const
> > +{
> > + std::vector<std::string> list;
> > +
> > + for (PipelineHandler *pipe : pipes_) {
> > + for (unsigned int i = 0; i < pipe->count(); i++) {
> > + Camera *cam = pipe->camera(i);
>
> I still think accessing cameras from the pipeline by index isn't a good API,
> but it can be changed later.
I agree. As the interface between a Camera and the MediaDevice and/or
pipeline manager is not yet defined I thought I keep this dead simple
for now as to not create a CameraManager requirement that would take a
lot of time to change.
As previously discussed I agree that the best solution would probably be
for the Camera to register itself with the CameraManager. Lets see how
it plays out.
--
Regards,
Niklas Söderlund
More information about the libcamera-devel
mailing list