[PATCH v2 5/6] libcamera: Add CameraSensor implementation for raw V4L2 sensors
Kieran Bingham
kieran.bingham at ideasonboard.com
Wed Jan 8 11:23:49 CET 2025
Quoting Jacopo Mondi (2025-01-08 09:28:45)
> Hi Kieran
>
> On Wed, Jan 08, 2025 at 09:01:34AM +0100, Jacopo Mondi wrote:
> > Hi Kieran
> >
> > On Tue, Jan 07, 2025 at 11:41:00PM +0000, Kieran Bingham wrote:
> > > Hi Jacopo,
> > >
> > > Quoting Jacopo Mondi (2024-11-08 13:27:04)
> > > > Hi Naush
> > > >
> > > > > > > +/**
> > > > > > > + * \class CameraSensorRaw
> > > > > > > + * \brief A camera sensor based on V4L2 subdevices
> > > > > > > + *
> > > > > > > + * This class supports single-subdev sensors with a single source pad and one
> > > > > > > + * or two internal sink pads (for the image and embedded data streams).
> > > > > > > + */
> > > > > > > +
> > > > > > > +CameraSensorRaw::CameraSensorRaw(const MediaEntity *entity)
> > > > > > > + : entity_(entity), staticProps_(nullptr), supportFlips_(false),
> > > > > > > + flipsAlterBayerOrder_(false), properties_(properties::properties)
> > > > > > > +{
> > > > > > > +}
> > > > > > > +
> > > > > > > +CameraSensorRaw::~CameraSensorRaw() = default;
> > > > > > > +
> > > > > > > +std::variant<std::unique_ptr<CameraSensor>, int>
> > > > > > > +CameraSensorRaw::match(MediaEntity *entity)
> > > > > > > +{
> > > > > > > + /* Check the entity type. */
> > > > > > > + if (entity->type() != MediaEntity::Type::V4L2Subdevice ||
> > > > > > > + entity->function() != MEDIA_ENT_F_CAM_SENSOR) {
> > > > > > > + libcamera::LOG(CameraSensor, Debug)
> > >
> > > why is there a libcamera:: prefix here? Aren't we inside the libcamera
> > > namespace?
> > >
> >
> > Good catch, I'll remove the prefix here and in other locations
> >
>
> I'll take this back, it's a static function and if I don't specify the
> full namespace name I get a compiler error. I haven't spent much time
> figuring out why to be honest
Aha, ok so that's the difference. It did stand out ... well lets keep it
like this if that's needed then.
--
Kieran
>
> Thanks
> j
More information about the libcamera-devel
mailing list