[libcamera-devel] [PATCH 2/5] test: camera: Add read default format test
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Mon Mar 11 09:21:28 CET 2019
Hi Niklas,
On Mon, Mar 11, 2019 at 02:52:56AM +0100, Niklas Söderlund wrote:
> 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.
I suspected that. Let's keep it then, and see if we can improve the
situation when creating the camera facade object.
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list