[libcamera-devel] [PATCH 1/3] libcamera: v4l2_subdevice: Implement ENUM_FRAME_SIZES
Niklas Söderlund
niklas.soderlund at ragnatech.se
Mon Feb 25 23:35:16 CET 2019
Hi Jacopo, Laurent,
> > >
> > > All V4L2Subdevice methods accepts a pad as first argument. I would
> > > keep this consistent.
> > >
> > >>> + sizeEnum.which = V4L2_SUBDEV_FORMAT_ACTIVE;
> > >>
> > >> I think this should be configurable by the caller or other way
> > >> customisable. In the not so distant future we will need to add support
> > >> for V4L2_SUBDEV_FORMAT_TRY in a lot of places better to prepare for it
> > >> :-)
> > >
> > > I'm really not sure about this one, I could add a field to
> > > V4L2SubdeviceFormatEnum for this...
> > >
> >
> > Re-thinking about this, I would leave this out until we don't define a
> > way to handle FORMAT_TRY globally, as otherwise I would have to expose
> > that flag outside of V4L2Subdevice which I would prefer not to...
>
> I think you made the right decision.
After mocking around a bit more in the code I now agree with you both.
Hard coding of V4L2_SUBDEV_FORMAT_ACTIVE is how it's done in other
places so we can change this when we add V4L2_SUBDEV_FORMAT_TRY in the
future. Sorry for not noticing this in my first review.
--
Regards,
Niklas Söderlund
More information about the libcamera-devel
mailing list