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

Niklas Söderlund niklas.soderlund at ragnatech.se
Wed Aug 7 22:47:12 CEST 2019


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.

-- 
Regards,
Niklas Söderlund


More information about the libcamera-devel mailing list