4
4
"""
5
5
Payload types
6
6
"""
7
+
8
+
7
9
class PayloadType (Enum ):
8
10
MuxDCTChannelRangeDefault = 0x23
9
11
MuxDCTChannelRangeEnd = 0x3f
@@ -17,10 +19,12 @@ class PayloadType(Enum):
17
19
URCPDummyPacket = 0x68
18
20
MockUDPDctCtrl = 0x7f
19
21
22
+
20
23
"""
21
24
Video Channel
22
25
"""
23
26
27
+
24
28
class VideoControlFlags :
25
29
LAST_DISPLAYED_FRAME = 0x01
26
30
LOST_FRAMES = 0x02
@@ -31,9 +35,11 @@ class VideoControlFlags:
31
35
LAST_DISPLAYED_FRAME_RENDERED = 0x80
32
36
SMOOTH_RENDERING_SETTINGS_SENT = 0x1000
33
37
38
+
34
39
video_format = Struct (
35
40
)
36
41
42
+
37
43
video_server_handshake = Struct (
38
44
'protocol_version' / Int32ul ,
39
45
'screen_width' / Int32ul ,
@@ -42,19 +48,22 @@ class VideoControlFlags:
42
48
'formats' / PrefixedArray (Int32ul , video_format )
43
49
)
44
50
51
+
45
52
video_client_handshake = Struct (
46
53
'initial_frame_id' / Int32ul ,
47
54
'requested_format' / video_format
48
55
)
49
56
57
+
50
58
video_control = Struct (
51
- 'flags' / Int32ul , # see VideoControlFlags
52
- 'last_displayed_frame' / Int32ul , # if(flags << 31)
53
- 'last_displayed_frame_rendered' / Int32ul , # if(flags & 0x80)
54
- 'lost_frames' / Array (2 , Int32ul ), # if (flags & 2)
55
- 'queue_depth' / Int32ul , # if(flags & 4)
59
+ 'flags' / Int32ul , # see VideoControlFlags
60
+ 'last_displayed_frame' / Int32ul , # if(flags << 31)
61
+ 'last_displayed_frame_rendered' / Int32ul , # if(flags & 0x80)
62
+ 'lost_frames' / Array (2 , Int32ul ), # if (flags & 2)
63
+ 'queue_depth' / Int32ul , # if(flags & 4)
56
64
)
57
65
66
+
58
67
video_data = Struct (
59
68
'flags' / Int32ul ,
60
69
'frame_id' / Int32ul ,
@@ -65,9 +74,11 @@ class VideoControlFlags:
65
74
'data' / Bytes (this .data_size )
66
75
)
67
76
77
+
68
78
class QosControlFlags :
69
79
REINITIALIZE = 0x1
70
80
81
+
71
82
qos_server_policy = Struct (
72
83
'schema_version' / Int32ul ,
73
84
'policy_length' / Int32ul ,
@@ -76,36 +87,44 @@ class QosControlFlags:
76
87
'fragment_size' / Int32ul
77
88
)
78
89
90
+
79
91
qos_server_handshake = Struct (
80
92
'protocol_version' / Int32ul ,
81
93
'min_supported_client_version' / Int32ul
82
94
)
83
95
96
+
84
97
qos_client_policy = Struct (
85
98
'schema_version' / Int32ul
86
99
)
87
100
101
+
88
102
qos_client_handshake = Struct (
89
103
'protocol_version' / Int32ul ,
90
104
'initial_frame_id' / Int32ul
91
105
)
92
106
107
+
93
108
qos_control = Struct (
94
109
'flags' / Int32ul
95
110
)
96
111
112
+
97
113
qos_data = Struct (
98
114
'flags' / Int32ul ,
99
115
'frame_id' / Int32ul ,
100
116
# TBD
101
117
)
102
118
119
+
103
120
"""
104
121
Control Protocol
105
122
"""
123
+
124
+
106
125
class ControlProtocolMessageOpCode (Enum ):
107
126
Auth = 0x1
108
127
AuthComplete = 0x2
109
128
Config = 0x3
110
129
ControllerChange = 0x4
111
- Config2 = 0x6
130
+ Config2 = 0x6
0 commit comments