[libcamera-devel] [PATCH v2 3/4] android: camera_device: Default the camera location to Front
Jacopo Mondi
jacopo at jmondi.org
Fri Feb 12 10:40:14 CET 2021
Hi Paul,
On Fri, Feb 12, 2021 at 02:48:15PM +0900, Paul Elder wrote:
> Since the libcamera camera now has an Unknown location, we can know if
> the camera's location is actually unknown. In this case, set the android
> camera location to front, as some systems may not support external
> cameras.
>
> This allows the following CTS test to pass:
> - android.hardware.camera2.cts.CameraManagerTest#testCameraManagerGetDeviceIdList
>
> Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
> Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
> Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
>
> ---
> No change in v2
> ---
> src/android/camera_device.cpp | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
> index 1e2a5b5f..3d815d21 100644
> --- a/src/android/camera_device.cpp
> +++ b/src/android/camera_device.cpp
> @@ -407,6 +407,9 @@ int CameraDevice::initialize()
> case properties::CameraLocationExternal:
> facing_ = CAMERA_FACING_EXTERNAL;
> break;
> + case properties::CameraLocationUnknown:
I would LOG(Warn) or Info that we are defaulting this.
Once we have support for a config file, I presume the information for
the HAL could come from there as well.
This is good in the meantime:
Reviewed-by: Jacopo Mondi <jacopo at jmondi.org>
Thanks
j
> + facing_ = CAMERA_FACING_FRONT;
> + break;
> }
> }
>
> --
> 2.27.0
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel
More information about the libcamera-devel
mailing list