Camera: re-space camera output for hardware texture target
2 issues with overriding presentation timestamp for SurfaceTexture:
- We cannot override timestamp for SurfaceTexture, because the timestamp
may be used for AV sync.
- TextureView always picks the latest buffer and display it right away
without using the presentation timestamp.
Due to these reasons, the cameraservice re-spaces queuing of the buffer
based on capture time intervals rather than overriding timestamps.
The buffer timestamp is left untouched.
Test: Run Instagram, Snapchat, and Tiktok and observe improved preview
Test: Camera CTS
Bug: 195025014
Change-Id: I28b23d9f2b39b6a289b6d9f87968e4bc667870a4
diff --git a/services/camera/libcameraservice/device3/Camera3SharedOutputStream.cpp b/services/camera/libcameraservice/device3/Camera3SharedOutputStream.cpp
index d24b527..82958a2 100644
--- a/services/camera/libcameraservice/device3/Camera3SharedOutputStream.cpp
+++ b/services/camera/libcameraservice/device3/Camera3SharedOutputStream.cpp
@@ -251,7 +251,7 @@
return res;
}
- res = configureConsumerQueueLocked(false/*allowDisplaySync*/);
+ res = configureConsumerQueueLocked(false/*allowPreviewRespace*/);
if (res != OK) {
ALOGE("Failed to configureConsumerQueueLocked: %s(%d)", strerror(-res), res);
return res;