summaryrefslogtreecommitdiffstats
path: root/services/camera
diff options
context:
space:
mode:
authorEino-Ville Talvala <etalvala@google.com>2011-07-26 14:06:07 -0700
committerEino-Ville Talvala <etalvala@google.com>2012-01-10 17:05:52 -0800
commit9f3d5919b45c360f88510f7455279aebe810d56b (patch)
treedf1a4f2627c5461d17ec2559fa524b6dcea603cb /services/camera
parent5f29ca38b71506ad7c7cb9925efbddf588e9655b (diff)
downloadframeworks_av-9f3d5919b45c360f88510f7455279aebe810d56b.zip
frameworks_av-9f3d5919b45c360f88510f7455279aebe810d56b.tar.gz
frameworks_av-9f3d5919b45c360f88510f7455279aebe810d56b.tar.bz2
Add ANativeWindow timestamp support to camera service.
This allows the camera HAL to set ANativeWindow timestamps, which are used by SurfaceTexture. Bug-Id: 5081132 Change-Id: I123ea4c9d1824fb72146fad81ad03d1491e0a7f8
Diffstat (limited to 'services/camera')
-rw-r--r--services/camera/libcameraservice/CameraHardwareInterface.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/services/camera/libcameraservice/CameraHardwareInterface.h b/services/camera/libcameraservice/CameraHardwareInterface.h
index 34087b5..2ac69f78 100644
--- a/services/camera/libcameraservice/CameraHardwareInterface.h
+++ b/services/camera/libcameraservice/CameraHardwareInterface.h
@@ -635,6 +635,12 @@ private:
return native_window_set_crop(a, &crop);
}
+ static int __set_timestamp(struct preview_stream_ops *w,
+ int64_t timestamp) {
+ ANativeWindow *a = anw(w);
+ return native_window_set_buffers_timestamp(a, timestamp);
+ }
+
static int __set_usage(struct preview_stream_ops* w, int usage)
{
ANativeWindow *a = anw(w);
@@ -664,6 +670,7 @@ private:
mHalPreviewWindow.nw.set_buffer_count = __set_buffer_count;
mHalPreviewWindow.nw.set_buffers_geometry = __set_buffers_geometry;
mHalPreviewWindow.nw.set_crop = __set_crop;
+ mHalPreviewWindow.nw.set_timestamp = __set_timestamp;
mHalPreviewWindow.nw.set_usage = __set_usage;
mHalPreviewWindow.nw.set_swap_interval = __set_swap_interval;