[libcamera-devel] [PATCH 3/4] tests: v4l2_videodevice: Propagate media bus format

Laurent Pinchart laurent.pinchart at ideasonboard.com
Wed Aug 7 23:21:50 CEST 2019


On Wed, Aug 07, 2019 at 10:47:12PM +0200, Niklas Söderlund wrote:
> Hi Laurent,
> 
> Thanks for your feedback.
> 
> On 2019-08-05 20:37:27 +0300, Laurent Pinchart wrote:
> > > @@ -35,6 +38,8 @@ protected:
> > >  	std::string entity_;
> > >  	std::unique_ptr<DeviceEnumerator> enumerator_;
> > >  	std::shared_ptr<MediaDevice> media_;
> > > +	CameraSensor *sensor_;
> > > +	V4L2Subdevice *debayer_;
> > 
> > Do you need to store these internally, can't they be local variables in
> > V4L2VideoDeviceTest::init() ?
> 
> If I store them locally in V4L2VideoDeviceTest::init() I would need to 
> handle all error cases and delete them if I don't want to leak memory 
> for valgrind, so I went for this option. I also fear they might be 
> needed outside init() soon enough once this problem is sorted out 
> upstream. I have keep this for v2.

OK, please disregard my comment on v2 then.

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list