[libcamera-devel,0/8] android: Implament format translation
mbox series

Message ID 20200526142237.407557-1-jacopo@jmondi.org
Headers show
Series
  • android: Implament format translation
Related show

Message

Jacopo Mondi May 26, 2020, 2:22 p.m. UTC
Hello,
   this series implements a few things, the most relevant of which is the
collection and translation of Android supported image formats to libcamera
formats.

The series begins by providing a camera-identifying log prefix to the
CameraDevice class.

It then fixes the reported API version, which was curiously hard-coded to 0.

Patch 3 replaces the orientation and facing camera side hard-coded information
with the actual values reported by the libcamera::Camera instance the
CameraDevice wraps. In order to do so, a new CameraDevice::initialize() method
is provided, where the collection and inspection of all Camera static properties
happens before the CameraDevice::open() method gets called.

Building on this foundations, patch 4 builds the image format translation
map and the available stream configuration map by testing a set of required
and optional image resolutions against the wrapped libcamera::Camera instace.
The patch produces an android-format to libcamera-format map and a list of
available stream configuration items, to be reported to the Android framework
through static metadata.

Patch 5 makes the metadata buffer size calculation 'dynamic', by inspecting
the number of elements which have been collected in the stream configuration
map.

Patch 6 and 7 make use of the information collected in patch 5 to, respectively,
report to the framework the available stream configuration map, and to translate
from Android format to libcamera format at processCaptureRequest time.

While I was reading the camera documentation, I spotted a rougue full stop
in a \return statement in documentation, and while at there I removed it.


Jacopo Mondi (8):
  android: camera_device: Provide log prefix
  android: hal_manager: Report supported API version
  android: hal_manager: Do not hardcode properties
  android: camera_device: Build stream configuration
  android: camera_device: Calculate metadata size
  android: camera_manager: Replace hardcoded stream configuration
  android: camera_device: Translate Android format
  libcamera: camera: Drop full stop from \return

 src/android/camera_device.cpp      | 375 ++++++++++++++++++++++++-----
 src/android/camera_device.h        |  29 ++-
 src/android/camera_hal_manager.cpp |  12 +-
 src/libcamera/camera.cpp           |   2 +-
 4 files changed, 352 insertions(+), 66 deletions(-)

--
2.26.2