[libcamera-devel,v4,0/3] MediaDevice class and MediaObject classes
mbox series

Message ID 20181231092752.5018-1-jacopo@jmondi.org
Headers show
Series
  • MediaDevice class and MediaObject classes
Related show

Message

Jacopo Mondi Dec. 31, 2018, 9:27 a.m. UTC
Hello
   this is 4th version of MediaDevice and associated MediaObject classes.

v1 available for reference here:
https://lists.libcamera.org/pipermail/libcamera-devel/2018-December/000120.html
v2 available for reference here:
https://lists.libcamera.org/pipermail/libcamera-devel/2018-December/000181.html
v3 available for reference here:
https://lists.libcamera.org/pipermail/libcamera-devel/2018-December/000239.html

I have addressed here comments on Niklas and Laurent on v3. Most notable changes
are:

- Simplified destructors, and have all object destroyed by the MediaDevice
  iterating over the global pool of objects. MediaPad and MediaEntity
  destructors only clear the list containers and do not delete objects they
  are associated with (thanks Laurent)
- Simplified the populate() function clean up (thanks Niklas)
- Polish and use \return everywhere in comments (thanks Niklas)

Tested locally using the printout test on VIMC and integrated webcam media
devices.

Valgrind does not report memory leaks.

I consider this version ready to be pushed, even if only 1/3 has received
a reviewed-by tag by Laurent.

Thanks
   j

Jacopo Mondi (3):
  libcamera: Add MediaObject class hierarchy
  libcamera: Add MediaDevice class
  test: Add media device test

 src/libcamera/include/media_device.h    |  61 ++++
 src/libcamera/include/media_object.h    | 106 +++++++
 src/libcamera/media_device.cpp          | 362 ++++++++++++++++++++++++
 src/libcamera/media_object.cpp          | 279 ++++++++++++++++++
 src/libcamera/meson.build               |   4 +
 test/media_device/media_device_test.cpp | 175 ++++++++++++
 test/media_device/meson.build           |   5 +
 test/meson.build                        |   4 +
 8 files changed, 996 insertions(+)
 create mode 100644 src/libcamera/include/media_device.h
 create mode 100644 src/libcamera/include/media_object.h
 create mode 100644 src/libcamera/media_device.cpp
 create mode 100644 src/libcamera/media_object.cpp
 create mode 100644 test/media_device/media_device_test.cpp
 create mode 100644 test/media_device/meson.build

--
2.20.1