libcamera/src/gstreamer
Laurent Pinchart fa63d428ae gstreamer: libcamerasrc: Delete configuration before stopping camera manager
When closing the libcamerasrc, the reference to camera is released and
the camera manager is stopped. However, the camera configuration still
exists at that point, and holds a reference to the camera. This leads to
a warning from the device enumerator complaining that the media devices
are still in use:

[1:53:48.792327560] [408] ERROR DeviceEnumerator device_enumerator.cpp:165 Removing media device /dev/media1 while still in use
[1:53:48.792354022] [408] ERROR DeviceEnumerator device_enumerator.cpp:165 Removing media device /dev/media0 while still in use

A crash follows when the libcamerasrc is finalized, as deleting the
camera configuration will then release the last reference to the camera,
which attempts to delete the camera object with deleteLater() without an
event dispatcher.

Fix it by deleting the camera configuration before stopping the camera
manager.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
2020-11-07 20:24:31 +02:00
..
gstlibcamera-utils.cpp gst: Replace explicit DRM FourCCs with libcamera formats 2020-06-18 13:26:43 +03:00
gstlibcamera-utils.h gst: utils: Factor-out the task resume helper 2020-03-07 01:58:08 +02:00
gstlibcamera.cpp gstreamer: Omit extra semicolons 2020-10-20 13:15:47 +03:00
gstlibcameraallocator.cpp gstreamer: Omit extra semicolons 2020-10-20 13:15:47 +03:00
gstlibcameraallocator.h gst: Add getters for Stream and FrameBuffer 2020-03-07 01:58:08 +02:00
gstlibcamerapad.cpp gstreamer: Omit extra semicolons 2020-10-20 13:15:47 +03:00
gstlibcamerapad.h gst: libcamerasrc: Implement timestamp support 2020-03-07 01:58:08 +02:00
gstlibcamerapool.cpp gstreamer: Omit extra semicolons 2020-10-20 13:15:47 +03:00
gstlibcamerapool.h gst: Add getters for Stream and FrameBuffer 2020-03-07 01:58:08 +02:00
gstlibcameraprovider.cpp gstreamer: Omit extra semicolons 2020-10-20 13:15:47 +03:00
gstlibcameraprovider.h gst: Add initial device provider 2020-03-07 01:57:45 +02:00
gstlibcamerasrc.cpp gstreamer: libcamerasrc: Delete configuration before stopping camera manager 2020-11-07 20:24:31 +02:00
gstlibcamerasrc.h Add GStreamer plugin and element skeleton 2020-03-07 01:57:42 +02:00
meson.build licenses: License all meson files under CC0-1.0 2020-05-13 16:46:24 +03:00