summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHirokazu Honda <hiroh@chromium.org>2021-04-03 22:10:14 +0900
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-04-04 04:02:18 +0300
commitac209efabf44827eb73f7f4d8baaffa9c1a58665 (patch)
tree3528b622e062182f4a7f2d9365df0d9d9fafb830 /src
parent4ae2a75200e0062ecade3634c43d5d6266fc179f (diff)
android: CameraDevice: Log rotation variables in camera3_stream
|rotation| and |crop_rotate_scale_degrees| are important info of a configuration. They should be logged. Signed-off-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r--src/android/camera_device.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
index 249fd8cc..6e003b9d 100644
--- a/src/android/camera_device.cpp
+++ b/src/android/camera_device.cpp
@@ -298,6 +298,21 @@ bool isValidRequest(camera3_capture_request_t *camera3Request)
return true;
}
+const char *rotationToString(int rotation)
+{
+ switch (rotation) {
+ case CAMERA3_STREAM_ROTATION_0:
+ return "0";
+ case CAMERA3_STREAM_ROTATION_90:
+ return "90";
+ case CAMERA3_STREAM_ROTATION_180:
+ return "180";
+ case CAMERA3_STREAM_ROTATION_270:
+ return "270";
+ }
+ return "INVALID";
+}
+
#if defined(OS_CHROMEOS)
/*
* Check whether the crop_rotate_scale_degrees values for all streams in
@@ -1678,6 +1693,11 @@ int CameraDevice::configureStreams(camera3_stream_configuration_t *stream_list)
<< ", width: " << stream->width
<< ", height: " << stream->height
<< ", format: " << utils::hex(stream->format)
+ << ", rotation: " << rotationToString(stream->rotation)
+#if defined(OS_CHROMEOS)
+ << ", crop_rotate_scale_degrees: "
+ << rotationToString(stream->crop_rotate_scale_degrees)
+#endif
<< " (" << format.toString() << ")";
if (!format.isValid())