Add timestamp control to camera preview stream operations.
At higher levels, SurfaceTextures include timestamp information in their buffers. For accurate timestamps, they need to be set by the driver code. This change adds the needed method into preview_stream_ops. Timestamp behavior is documented in SurfaceTexture.java, and system/core/include/window.h, as well as here. Bug-Id: 5081132 Change-Id: Id285f8e26edecf605444bc4b9e6eea9b224f9d31
This commit is contained in:
parent
080a80212b
commit
7c50e9bad4
1 changed files with 5 additions and 0 deletions
|
@ -109,6 +109,11 @@ typedef struct preview_stream_ops {
|
|||
int *count);
|
||||
int (*lock_buffer)(struct preview_stream_ops* w,
|
||||
buffer_handle_t* buffer);
|
||||
// Timestamps are measured in nanoseconds, and must be comparable
|
||||
// and monotonically increasing between two frames in the same
|
||||
// preview stream. They do not need to be comparable between
|
||||
// consecutive or parallel preview streams, cameras, or app runs.
|
||||
int (*set_timestamp)(struct preview_stream_ops *w, int64_t timestamp);
|
||||
} preview_stream_ops_t;
|
||||
|
||||
struct camera_device;
|
||||
|
|
Loading…
Reference in a new issue