-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvideo.proto
105 lines (77 loc) · 2.32 KB
/
video.proto
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
// Version: 1.2
syntax = "proto3";
import "version.proto";
import "vision.proto";
enum CameraStatus {
CAMERA_STATUS_UNDEFINED = 0;
CAMERA_DISCONNECTED = 1; /// The camera is not even on the rover
CAMERA_ENABLED = 2; /// The camera is actively streaming video
CAMERA_DISABLED = 3; /// Not streaming, but it can be enabled
CAMERA_NOT_RESPONDING = 4; /// Connected but not responding
CAMERA_LOADING = 5; /// Camera is still turning on
FRAME_TOO_LARGE = 6; /// The camera is reading too many pixels
CAMERA_HAS_NO_NAME = 7; /// The camera was not assigned a name
}
enum CameraName {
CAMERA_NAME_UNDEFINED = 0;
ROVER_FRONT = 1;
ROVER_REAR = 2;
AUTONOMY_DEPTH = 3;
SUBSYSTEM1 = 4;
SUBSYSTEM2 = 5;
SUBSYSTEM3 = 6;
BOTTOM_LEFT = 7;
BOTTOM_RIGHT = 8;
}
/// Details about a specific camera.
message CameraDetails {
/// The name of the camera.
CameraName name = 1;
/// The width and height of the image frame.
int32 resolution_width = 2;
int32 resolution_height = 3;
/// The quality of the frame, as a percentage. Used for JPG compression.
int32 quality = 4;
/// The amount of frames per second. Eg, 60 FPS or 24 FPS.
int32 fps = 5;
/// The status of this camera.
CameraStatus status = 6;
bool autofocus = 7;
int32 zoom = 8;
int32 pan = 9;
int32 tilt = 10;
int32 focus = 11;
float diagonal_fov = 12;
float horizontal_fov = 13;
float vertical_fov = 14;
/// The width of the image data streamed
int32 stream_width = 15;
/// The height of the image data streamed
int32 stream_height = 16;
}
/// Reports data about a camera.
message VideoData {
/// The unique ID of this camera.
string id = 1;
/// The details for this camera.
CameraDetails details = 2;
/// The latest frame from this camera.
bytes frame = 3;
/// The version of this video data.
Version version = 4;
/// The path that a high-quality screenshot was saved to.
string imagePath = 5;
/// Any objects that were detected in the frame.
repeated DetectedObject detectedObjects = 6;
}
/// Make changes to a camera feed.
message VideoCommand {
/// The unique ID of the camera to change.
string id = 1;
/// The new details for this camera.
///
/// If changing [CameraDetails.status], you cannot set it to [CameraStatus.DISCONNECTED].
CameraDetails details = 2;
Version version = 3;
bool takeSnapshot = 4;
}