• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1syntax = "proto2";
2
3package android.automotive.computepipe.proto;
4
5message ImageFileConfig {
6  enum ImageFileType {
7    JPEG = 0;
8    PNG = 1;
9  }
10
11  optional ImageFileType file_type = 1;
12
13  optional string image_dir = 2;
14}
15
16message VideoFileConfig {
17  enum VideoFileType {
18    MPEG = 0;
19  }
20
21  optional VideoFileType file_type = 1;
22
23  optional string file_path = 2;
24}
25
26message CameraConfig {
27  enum CameraType {
28    DRIVER_VIEW_CAMERA = 0;
29    OCCUPANT_VIEW_CAMERA = 1;
30    EXTERNAL_CAMERA = 2;
31    SURROUND_VIEW_CAMERA = 3;
32  };
33
34  optional CameraType camera_type = 1;
35
36  optional string cam_id = 2;
37}
38
39message InputStreamConfig {
40  enum InputType {
41    CAMERA = 1;
42    IMAGE_FILES = 2;
43    VIDEO_FILE = 3;
44  }
45
46  optional InputType type = 1;
47
48  enum FormatType {
49    RGB = 0;
50    NIR = 1;
51    NIR_DEPTH = 2;
52  }
53
54  optional FormatType format = 2;
55
56  optional int32 width = 3;
57
58  optional int32 height = 4;
59
60  optional int32 stride = 5;
61
62  // The camera id string essential to start the camera.
63  optional CameraConfig cam_config = 6;
64
65  // for image file input type the following attributes apply
66  optional ImageFileConfig image_config = 7;
67
68  // Must be present when InputType is ImageFile
69  optional VideoFileConfig video_config = 8;
70
71  optional int32 stream_id = 9;
72
73  enum PixelLayout {
74    UNKNOWN = 0;
75
76    // one byte for R, then one byte for G, then one byte for B for each pixel.
77    RGB24 = 1;
78
79    // one byte for R, one byte for G, one byte for B, one byte for alpha or
80    // unused.
81    RGBA32 = 2;
82
83    // Grayscale, one byte per pixel.
84    GRAY8 = 3;
85
86    // Grayscale, one uint16 per pixel.
87    GRAY16 = 4;
88  }
89
90  // Represent pixel layout of image expected by graph.
91  optional PixelLayout pixel_layout = 10 [default = RGB24];
92}
93
94// A graph could require streams from multiple cameras simultaneously, so each possible input
95// config could specify multiple camera configs.
96message InputConfig {
97    repeated InputStreamConfig input_stream = 1;
98
99    // config id which would be used to set the config rather than passing the entire config proto
100    optional int32 config_id = 2;
101}
102