[libcamera-devel,00/14] Assorted fixes for Android camera HAL
mbox series

Message ID 20190818011329.14499-1-laurent.pinchart@ideasonboard.com
Headers show
Series
  • Assorted fixes for Android camera HAL
Related show

Message

Laurent Pinchart Aug. 18, 2019, 1:13 a.m. UTC
Hello,

While trying to debug an issue on a recent Chromium OS image, I noticed
that the camera service crashes when exiting. Investigating the issue
led to this patch series.

The main goal of this series is to improve destruction of resources at
cleanup time, mainly through removal of the CameraManager::instance()
method and making the CameraManager class manually constructible. The
rationale is explained in path 13/14.

Patches 01/14, 05/14, 06/14 and 09/14 are miscellaneous fixes (with
05/14 notably fixing a compilation error on Chromium OS). Patches 02/14
to 04/14, 07/14 and 08/14 then follow by preparing for the removal of
CameraManager::instance().

Patch 10/14 to 14/14 free, release or destroy resources in the camera
HAL at cleanup time, with 13/14 removing Camera::instance() tree-wide.

I would like to fast-track at least 05/14 to fix the build, reviews will
be appreciated.

Laurent Pinchart (14):
  libcamera: device_enumerator: Print media device name in error message
  libcamera: proxy: Get event dispatcher from current thread
  qcam: Remove double stop of the camera manager
  qcam: Pass camera manager to MainWindow class
  test: event-thread: Fix compilation on Chromium OS
  test: unixsocket: Fix typo in error message
  test: Get event dispatcher from current thread
  test: camera: Use the CameraManager from the CameraTest base class
  android: Pass Camera shared pointer to CameraDevice by const reference
  android: camera_hal_manager: Stop thread when destroying
  android: camera_hal_manager: Remove unused close() method
  android: camera_hal_manager: Clean up resources when terminating
  libcamera: camera_manager: Construct CameraManager instances manually
  android: camera_device: Store static metadata in cache

 include/libcamera/camera_manager.h            | 12 ++---
 src/android/camera_device.cpp                 | 44 +++++++++----------
 src/android/camera_device.h                   |  2 +-
 src/android/camera_hal_manager.cpp            | 28 +++++++-----
 src/android/camera_hal_manager.h              |  3 +-
 src/android/camera_proxy.cpp                  |  2 +-
 src/android/camera_proxy.h                    |  2 +-
 src/cam/main.cpp                              |  8 +++-
 src/libcamera/camera_manager.cpp              | 36 +++++++--------
 src/libcamera/device_enumerator.cpp           |  3 +-
 .../proxy/worker/ipa_proxy_linux_worker.cpp   |  4 +-
 src/qcam/main.cpp                             |  6 ++-
 src/qcam/main_window.cpp                      |  9 ++--
 src/qcam/main_window.h                        |  5 ++-
 test/camera/buffer_import.cpp                 |  2 +-
 test/camera/camera_test.cpp                   |  3 +-
 test/camera/camera_test.h                     |  4 +-
 test/camera/capture.cpp                       |  2 +-
 test/controls/control_list.cpp                |  3 +-
 test/event-dispatcher.cpp                     |  4 +-
 test/event-thread.cpp                         |  6 ++-
 test/event.cpp                                |  4 +-
 test/ipc/unixsocket.cpp                       |  8 ++--
 test/list-cameras.cpp                         | 11 ++---
 test/log/log_process.cpp                      |  4 +-
 test/meson.build                              |  6 +--
 test/object-invoke.cpp                        |  3 +-
 test/pipeline/ipu3/ipu3_pipeline_test.cpp     |  3 +-
 test/process/process_test.cpp                 |  4 +-
 test/timer.cpp                                |  4 +-
 test/v4l2_videodevice/buffer_sharing.cpp      |  4 +-
 test/v4l2_videodevice/capture_async.cpp       |  4 +-
 test/v4l2_videodevice/v4l2_m2mdevice.cpp      |  4 +-
 33 files changed, 132 insertions(+), 115 deletions(-)