Camera3Device: Add dumpsys monitoring of request/result metadata
Add new -m dumpsys option to cameraservice dump for monitoring
changes in selected metadata values in requests and results.
This option takes a comma-separated list of metadata keys, or the
shortcut value "3a", which expands to all the "android.control" tags.
In subsequent dumpsys calls, the last 100 changes to the tags being
monitored are listed.
The monitoring must be turned on once the camera device is running.
Bug:
Change-Id: If8938b30611ccafa86c2c4a06e57fc72680f827b
diff --git a/services/camera/libcameraservice/device3/Camera3Device.h b/services/camera/libcameraservice/device3/Camera3Device.h
index fe5f217..bbb6563 100644
--- a/services/camera/libcameraservice/device3/Camera3Device.h
+++ b/services/camera/libcameraservice/device3/Camera3Device.h
@@ -30,6 +30,7 @@
#include "common/CameraDeviceBase.h"
#include "device3/StatusTracker.h"
#include "device3/Camera3BufferManager.h"
+#include "utils/TagMonitor.h"
/**
* Function pointer types with C calling convention to
@@ -855,6 +856,16 @@
/**** End scope for mInFlightLock ****/
+ // Debug tracker for metadata tag value changes
+ // - Enabled with the -m <taglist> option to dumpsys, such as
+ // dumpsys -m android.control.aeState,android.control.aeMode
+ // - Disabled with -m off
+ // - dumpsys -m 3a is a shortcut for ae/af/awbMode, State, and Triggers
+ TagMonitor mTagMonitor;
+
+ void monitorMetadata(TagMonitor::eventSource source, int64_t frameNumber,
+ nsecs_t timestamp, const CameraMetadata& metadata);
+
/**
* Static callback forwarding methods from HAL to instance
*/