diff options
author | maxwen <max.weninger@gmail.com> | 2018-10-09 13:52:55 +0200 |
---|---|---|
committer | Sebastiano Barezzi <barezzisebastiano@gmail.com> | 2021-06-14 16:23:36 +0200 |
commit | 41f3df68de3b2075027070a7555679ad004794fb (patch) | |
tree | 5cd8cac8a950c2fe8b136426122b8767822305d6 | |
parent | 1540b08640dd983312db0c1f6e1a72e6909a44f6 (diff) |
camera: Allow to use boottime as timestamp reference
* Some /mad/ HALs use boottime clock without reporting
timestamp source as realtime
-> Add a flag to force boottime offset calculation
[SebaUbuntu] Edit for Soong conditional
Change-Id: I56b623a1c2b58ca8a6287783d938fb665de201df
-rw-r--r-- | services/camera/libcameraservice/Android.bp | 1 | ||||
-rw-r--r-- | services/camera/libcameraservice/device3/Camera3Device.cpp | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/services/camera/libcameraservice/Android.bp b/services/camera/libcameraservice/Android.bp index 53fc1be7eb..92e9817e16 100644 --- a/services/camera/libcameraservice/Android.bp +++ b/services/camera/libcameraservice/Android.bp @@ -21,6 +21,7 @@ cc_library_shared { defaults: [ "no_cameraserver_defaults", "qti_camera_device_defaults", + "needs_camera_boottime_defaults", ], // Camera service source diff --git a/services/camera/libcameraservice/device3/Camera3Device.cpp b/services/camera/libcameraservice/device3/Camera3Device.cpp index d5f136b84d..fc3a5b4901 100644 --- a/services/camera/libcameraservice/device3/Camera3Device.cpp +++ b/services/camera/libcameraservice/device3/Camera3Device.cpp @@ -321,6 +321,11 @@ status_t Camera3Device::initializeCommonLocked() { mTimestampOffset = getMonoToBoottimeOffset(); } +#ifdef TARGET_CAMERA_BOOTTIME_TIMESTAMP + // Always calculate the offset if requested + mTimestampOffset = getMonoToBoottimeOffset(); +#endif + // Will the HAL be sending in early partial result metadata? camera_metadata_entry partialResultsCount = mDeviceInfo.find(ANDROID_REQUEST_PARTIAL_RESULT_COUNT); |