-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathidl.proto
123 lines (101 loc) · 2.41 KB
/
idl.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
/***********************************************************
** Copyright (C), 2020-2021, OPPO Mobile Comm Corp., Ltd.
** VENDOR_EDIT
** File: - VirtualCamera.proto
** Description: define the Virtual Camera rpc message for VDM
** Version: 1.0
** Date : 2021/01/04
** Author: [email protected]
**
** ----------------------Revision History: --------------------
** <author> <date> <version > <desc>
** chenguangming 2021/01/04 1.0 first add
****************************************************************/
syntax = "proto3";
package camera;
option java_multiple_files = true;
option java_package = "com.oplus.vd.camera.rpc";
enum Result {
OK = 0;
FAILED = 1;
}
message DeviceId {
int64 value = 1;
}
message Session {
int32 accessoryId = 1;
DeviceId deviceId = 2;
}
message DeviceCharacter {
int32 max_width = 1;
int32 max_height = 2;
int32 max_fps = 3;
int32 min_fps = 4;
}
message BasicDevice {
string name = 1;
DeviceId id = 2;
int32 direction = 3;
int32 type = 4;
DeviceCharacter character = 5;
}
message BasicHolder {
int32 holder_type = 1;
int64 holder_id = 2;
string holder_name = 3;
}
message Size {
int32 width = 1;
int32 height = 2;
}
message Range {
int32 lower = 1;
int32 upper = 2;
}
message CameraSession {
DeviceId id = 1;
Size size = 2;
Range fpsRange = 3;
}
message VirtualCameraDevice {
BasicDevice basic = 1;
string characteristics = 2;
}
message CameraInfoRequest {
int32 accessory_id = 1;
}
message CameraInfoResult {
BasicHolder holder = 1;
repeated VirtualCameraDevice devices = 2;
}
enum DataType {
TYPE_CSD = 0;
TYPE_DATA = 1;
}
message RawData {
bytes data = 1;
}
message CaptureRequest {
DeviceId id = 1;
string metadata = 2;
}
message CaptureResult {
DeviceId id = 1;
DataType type = 2;
int64 frameNumber = 3;
RawData raw = 4;
}
message CameraResult {
Result result = 1;
}
message RtspUrl{
string url = 1;
}
service VirtualCamera {
rpc getCameraInfo(CameraInfoRequest) returns (CameraInfoResult) {}
rpc open(CameraSession) returns (CameraResult) {}
rpc close(DeviceId) returns (CameraResult) {}
rpc capture (CaptureRequest) returns (stream CaptureResult) {}
rpc configure(CameraSession) returns (CameraResult) {}
rpc startRtsp(CaptureRequest) returns (RtspUrl){}
}