File: dvr_vsync.h

package info (click to toggle)
android-platform-tools 34.0.5-12
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 150,900 kB
  • sloc: cpp: 805,786; java: 293,500; ansic: 128,288; xml: 127,491; python: 41,481; sh: 14,245; javascript: 9,665; cs: 3,846; asm: 2,049; makefile: 1,917; yacc: 440; awk: 368; ruby: 183; sql: 140; perl: 88; lex: 67
file content (32 lines) | stat: -rw-r--r-- 839 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef ANDROID_DVR_VSYNC_H_
#define ANDROID_DVR_VSYNC_H_

#include <stdint.h>
#include <sys/cdefs.h>

__BEGIN_DECLS

// Represents a vsync sample. The size of this struct is 32 bytes.
typedef struct __attribute__((packed, aligned(16))) DvrVsync {
  // The timestamp for the last vsync in nanoseconds.
  uint64_t vsync_timestamp_ns;

  // The index of the last vsync.
  uint32_t vsync_count;

  // Scan out for the left eye = vsync_timestamp_ns + vsync_left_eye_offset_ns.
  int32_t vsync_left_eye_offset_ns;

  // Scan out for the right eye = vsync_timestamp_ns + vsync_right_eye_offset_ns
  int32_t vsync_right_eye_offset_ns;

  // The period of a vsync in nanoseconds.
  uint32_t vsync_period_ns;

  // Padding to 32 bytes so the size is a multiple of 16.
  uint8_t padding[8];
} DvrVsync;

__END_DECLS

#endif  // ANDROID_DVR_VSYNC_H_