libcamera/test
Laurent Pinchart 4f043b05e7 libcamera: device_enumerator: Reference-count MediaDevice instances
The MediaDevice class will be the entry point to hot-unplug, as it
corresponds to the kernel devices that will report device removal
events. The class will signal media device disconnection to pipeline
handlers, which will clean up resources as a result.

This can't be performed synchronously as references may exist to the
related Camera objects in applications. The MediaDevice object thus
needs to be reference-counted in order to support unplugging, as
otherwise pipeline handlers would be required to drop all the references
to the media device they have borrowed synchronously with the
disconnection signal handler, which would be very error prone (if even
possible at all in a sane way).

Handle MedieDevice instances with std::shared_ptr<> to support this.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2019-01-24 22:24:11 +02:00
..
libtest test: Move include definitions to libtest 2019-01-02 11:08:20 +02:00
media_device libcamera: device_enumerator: Reference-count MediaDevice instances 2019-01-24 22:24:11 +02:00
pipeline libcamera: device_enumerator: Reference-count MediaDevice instances 2019-01-24 22:24:11 +02:00
v4l2_device test: v4l2_device: Add test suite and initial test 2019-01-17 21:55:27 +00:00
event-dispatcher.cpp tests: event-dispatcher: Add processEvents() interruption test 2019-01-23 18:51:56 +02:00
event.cpp test: Add event notifier test 2019-01-08 16:23:16 +02:00
list-cameras.cpp libcamera: camera: Handle camera objects through shared pointers 2019-01-21 11:13:53 +02:00
meson.build tests: Test event dispatcher interruption by signal 2019-01-23 18:51:56 +02:00
signal.cpp test: Add signal/slot test 2019-01-08 16:23:16 +02:00
timer.cpp test: timer: Add a 32 bit wraparound test 2019-01-17 21:31:33 +00:00