[libcamera-devel] [PATCH 2/5] test: camera: Add read default format test
Niklas Söderlund
niklas.soderlund at ragnatech.se
Mon Mar 11 02:52:56 CET 2019
Hi again,
On 2019-03-11 01:43:23 +0100, Niklas Söderlund wrote:
[snip]
> > > +void CameraTest::cleanup()
> > > +{
> > > + if (camera_) {
> > > + camera_->release();
> > > + camera_.reset();
> >
> > Is the reset needed ?
>
> No it's not, will remove for v2.
I take this back, it is needed.
Without this running a test results in an error being printed
ERR DeviceEnumerator device_enumerator.cpp:173 Removing media device while still in use
This is because the shard_ptr design as we call CameraManager::stop()
while we still hold a reference to a camera. Maybe we could improve this
design somehow? For now I will keep this in v2 as it works with our
current design.
--
Regards,
Niklas Söderlund
More information about the libcamera-devel
mailing list