Skip to content

Commit 62380e9

Browse files
committed
Fix CI
1 parent 3c58deb commit 62380e9

File tree

4 files changed

+221
-0
lines changed

4 files changed

+221
-0
lines changed

proto/common.proto

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
syntax = "proto3";
2+
3+
package vts.server;
4+
5+
message FrameFormatSetting {
6+
int32 frameWidth = 1;
7+
int32 frameHeight = 2;
8+
int32 frameRate = 3;
9+
int32 frameQuality = 4;
10+
}
11+
12+
message ReqCommon {}
13+
14+
message RspCommon {}
15+
16+
message NotifyCommon {}

proto/relay.proto

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
syntax = "proto3";
2+
import "common.proto";
3+
4+
package vts.relay;
5+
6+
message ReqRelayCreate {
7+
int32 hours = 1;
8+
int32 participants = 2;
9+
optional string roomId = 3;
10+
vts.server.FrameFormatSetting maxQuality = 4;
11+
optional string coupon = 5;
12+
}
13+
14+
message RspPrice {
15+
float price = 1;
16+
}
17+
18+
message RspBuyQrCode {
19+
string code = 1;
20+
string id = 2;
21+
}
22+
23+
message ReqBuyStatus {
24+
string id = 1;
25+
}
26+
27+
message RspBuyStatus {
28+
string status = 1;
29+
string ip = 2;
30+
string username = 3;
31+
string password = 4;
32+
}
33+
34+
message ReqRefund {
35+
string id = 1;
36+
}
37+
38+
service RelayService {
39+
rpc QueryPrice(ReqRelayCreate) returns (RspPrice);
40+
rpc StartBuyWeixin(ReqRelayCreate) returns (RspBuyQrCode);
41+
rpc QueryStatus(ReqBuyStatus) returns (RspBuyStatus);
42+
rpc Refund(ReqRefund) returns (vts.server.RspCommon);
43+
}

proto/vts.proto

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
syntax = "proto3";
2+
3+
package vts;
4+
5+
enum VtsMsgType {
6+
VTS_MSG_INVALID = 0;
7+
VTS_MSG_AVFRAME = 1;
8+
VTS_MSG_AVSTOP = 2;
9+
VTS_MSG_HEARTBEAT = 3;
10+
}
11+
12+
message AvPacket {
13+
bytes data = 1;
14+
int64 pts = 2;
15+
int64 dts = 3;
16+
int32 flags = 4;
17+
}
18+
19+
message VtsAvFrame {
20+
repeated AvPacket packets = 3;
21+
int64 pts = 4;
22+
}
23+
24+
message VtsMsg {
25+
VtsMsgType type = 2;
26+
VtsAvFrame avFrame = 3;
27+
}
28+
29+
message SmartBuf {
30+
uint32 seq = 1;
31+
uint32 part = 2;
32+
uint32 total = 3;
33+
bytes data = 4;
34+
}

proto/vts_server.proto

+128
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
syntax = "proto3";
2+
import "common.proto";
3+
4+
package vts.server;
5+
6+
message Peer {
7+
string peerId = 1;
8+
bool isServer = 2;
9+
string nick = 3;
10+
int64 rtt = 4;
11+
int32 natType = 5;
12+
int32 sortingOrder = 6;
13+
}
14+
15+
message Sdp {
16+
string sdp = 1;
17+
string type = 2;
18+
string fromPeerId = 3;
19+
string toPeerId = 4;
20+
}
21+
22+
message Candidate {
23+
string candidate = 1;
24+
string mid = 2;
25+
string fromPeerId = 3;
26+
string toPeerId = 4;
27+
}
28+
29+
message ReqCreateRoom {
30+
string peerId = 1;
31+
FrameFormatSetting format = 2;
32+
string nick = 4;
33+
string turn = 5;
34+
}
35+
36+
message ReqJoinRoom {
37+
string roomId = 1;
38+
string peerId = 2;
39+
string nick = 3;
40+
}
41+
42+
message ReqNickname {
43+
string nick = 2;
44+
}
45+
46+
message ReqNatType {
47+
int32 natType = 2;
48+
}
49+
50+
message ReqRtt {
51+
map<string, int64> rtt = 1;
52+
}
53+
54+
message StatInfo {
55+
int64 rtt = 1;
56+
uint64 txBytes = 2;
57+
uint64 rxBytes = 3;
58+
uint64 txSpeed = 4;
59+
uint64 rxSpeed = 5;
60+
}
61+
62+
message ReqStat {
63+
map<string, StatInfo> stats = 1;
64+
}
65+
66+
message RspRoomInfo {
67+
string roomId = 2;
68+
FrameFormatSetting format = 3;
69+
string hostPeerId = 4;
70+
string turn = 5;
71+
}
72+
73+
message TurnInfo {
74+
string turn = 1;
75+
}
76+
77+
message ReqShareInfo {
78+
string gpu = 1;
79+
string capture = 2;
80+
bool start = 3;
81+
bool isWireless = 4;
82+
bool is2G4 = 5;
83+
}
84+
85+
message ReqIdr {
86+
string reason = 1;
87+
uint64 timestamp = 2;
88+
string peerId = 3;
89+
}
90+
91+
message Notify {
92+
oneof notify {
93+
NotifyPeers peers = 2;
94+
Sdp sdp = 3;
95+
FrameFormatSetting frame = 4;
96+
NotifyCommon roomDestroy = 5;
97+
NotifyCommon forceIdr = 6;
98+
Candidate candidate = 7;
99+
TurnInfo turn = 8;
100+
}
101+
}
102+
103+
message NotifyPeers {
104+
repeated Peer peers = 1;
105+
}
106+
107+
service RoomService {
108+
rpc Hello(ReqCommon) returns (RspCommon);
109+
110+
rpc CreateRoom(ReqCreateRoom) returns (RspRoomInfo);
111+
rpc JoinRoom(ReqJoinRoom) returns (RspRoomInfo);
112+
113+
rpc ReceiveNotify(ReqCommon) returns (stream Notify);
114+
115+
rpc SetSdp(Sdp) returns (RspCommon);
116+
rpc SetFrameFormat(FrameFormatSetting) returns (RspCommon);
117+
rpc SetNickName(ReqNickname) returns (RspCommon);
118+
rpc SetNatType(ReqNatType) returns (RspCommon);
119+
rpc SetRtt(ReqRtt) returns (RspCommon);
120+
rpc SetStat(ReqStat) returns (RspCommon);
121+
rpc SetShareInfo(ReqShareInfo) returns (RspCommon);
122+
rpc SetCandidate(Candidate) returns (RspCommon);
123+
rpc SetTurn(TurnInfo) returns (RspCommon);
124+
125+
rpc RequestIdr(ReqIdr) returns (RspCommon);
126+
127+
rpc Exit(ReqCommon) returns (RspCommon);
128+
}

0 commit comments

Comments
 (0)