pymammotion 0.5.69__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. pymammotion/__init__.py +53 -0
  2. pymammotion/agora/__init__.py +0 -0
  3. pymammotion/agora/agora_api.py +755 -0
  4. pymammotion/agora/agora_rtc_capabilities.py +748 -0
  5. pymammotion/agora/agora_websockets.py +1175 -0
  6. pymammotion/aliyun/__init__.py +1 -0
  7. pymammotion/aliyun/client.py +235 -0
  8. pymammotion/aliyun/cloud_gateway.py +982 -0
  9. pymammotion/aliyun/model/aep_response.py +21 -0
  10. pymammotion/aliyun/model/connect_response.py +51 -0
  11. pymammotion/aliyun/model/dev_by_account_response.py +195 -0
  12. pymammotion/aliyun/model/login_by_oauth_response.py +64 -0
  13. pymammotion/aliyun/model/regions_response.py +29 -0
  14. pymammotion/aliyun/model/session_by_authcode_response.py +19 -0
  15. pymammotion/aliyun/model/thing_response.py +12 -0
  16. pymammotion/aliyun/regions.py +62 -0
  17. pymammotion/aliyun/tea/core.py +297 -0
  18. pymammotion/aliyun/tmp_constant.py +171 -0
  19. pymammotion/bluetooth/__init__.py +1 -0
  20. pymammotion/bluetooth/ble.py +62 -0
  21. pymammotion/bluetooth/ble_message.py +676 -0
  22. pymammotion/bluetooth/const.py +27 -0
  23. pymammotion/bluetooth/data/__init__.py +0 -0
  24. pymammotion/bluetooth/data/convert.py +25 -0
  25. pymammotion/bluetooth/data/framectrldata.py +40 -0
  26. pymammotion/bluetooth/data/notifydata.py +62 -0
  27. pymammotion/bluetooth/model/__init__.py +0 -0
  28. pymammotion/bluetooth/model/atomic_integer.py +54 -0
  29. pymammotion/const.py +13 -0
  30. pymammotion/data/__init__.py +0 -0
  31. pymammotion/data/model/__init__.py +8 -0
  32. pymammotion/data/model/account.py +8 -0
  33. pymammotion/data/model/device.py +192 -0
  34. pymammotion/data/model/device_config.py +72 -0
  35. pymammotion/data/model/device_info.py +60 -0
  36. pymammotion/data/model/device_limits.py +49 -0
  37. pymammotion/data/model/enums.py +77 -0
  38. pymammotion/data/model/errors.py +12 -0
  39. pymammotion/data/model/events.py +14 -0
  40. pymammotion/data/model/generate_geojson.py +565 -0
  41. pymammotion/data/model/generate_route_information.py +26 -0
  42. pymammotion/data/model/hash_list.py +475 -0
  43. pymammotion/data/model/location.py +36 -0
  44. pymammotion/data/model/mowing_modes.py +77 -0
  45. pymammotion/data/model/rapid_state.py +45 -0
  46. pymammotion/data/model/raw_data.py +215 -0
  47. pymammotion/data/model/region_data.py +102 -0
  48. pymammotion/data/model/report_info.py +182 -0
  49. pymammotion/data/model/work.py +27 -0
  50. pymammotion/data/mower_state_manager.py +369 -0
  51. pymammotion/data/mqtt/__init__.py +1 -0
  52. pymammotion/data/mqtt/event.py +227 -0
  53. pymammotion/data/mqtt/mammotion_properties.py +276 -0
  54. pymammotion/data/mqtt/properties.py +203 -0
  55. pymammotion/data/mqtt/status.py +57 -0
  56. pymammotion/event/__init__.py +6 -0
  57. pymammotion/event/event.py +96 -0
  58. pymammotion/homeassistant/__init__.py +3 -0
  59. pymammotion/homeassistant/mower_api.py +514 -0
  60. pymammotion/homeassistant/rtk_api.py +54 -0
  61. pymammotion/http/__init__.py +0 -0
  62. pymammotion/http/encryption.py +220 -0
  63. pymammotion/http/http.py +673 -0
  64. pymammotion/http/model/__init__.py +0 -0
  65. pymammotion/http/model/camera_stream.py +31 -0
  66. pymammotion/http/model/http.py +249 -0
  67. pymammotion/http/model/response_factory.py +61 -0
  68. pymammotion/http/model/rtk.py +16 -0
  69. pymammotion/mammotion/__init__.py +0 -0
  70. pymammotion/mammotion/commands/__init__.py +0 -0
  71. pymammotion/mammotion/commands/abstract_message.py +24 -0
  72. pymammotion/mammotion/commands/mammotion_command.py +81 -0
  73. pymammotion/mammotion/commands/messages/__init__.py +0 -0
  74. pymammotion/mammotion/commands/messages/basestation.py +43 -0
  75. pymammotion/mammotion/commands/messages/driver.py +122 -0
  76. pymammotion/mammotion/commands/messages/media.py +87 -0
  77. pymammotion/mammotion/commands/messages/navigation.py +564 -0
  78. pymammotion/mammotion/commands/messages/network.py +205 -0
  79. pymammotion/mammotion/commands/messages/ota.py +38 -0
  80. pymammotion/mammotion/commands/messages/system.py +330 -0
  81. pymammotion/mammotion/commands/messages/video.py +33 -0
  82. pymammotion/mammotion/control/__init__.py +0 -0
  83. pymammotion/mammotion/control/joystick.py +145 -0
  84. pymammotion/mammotion/devices/__init__.py +29 -0
  85. pymammotion/mammotion/devices/base.py +163 -0
  86. pymammotion/mammotion/devices/mammotion.py +571 -0
  87. pymammotion/mammotion/devices/mammotion_bluetooth.py +496 -0
  88. pymammotion/mammotion/devices/mammotion_cloud.py +355 -0
  89. pymammotion/mammotion/devices/mammotion_mower_ble.py +48 -0
  90. pymammotion/mammotion/devices/mammotion_mower_cloud.py +39 -0
  91. pymammotion/mammotion/devices/managers/managers.py +81 -0
  92. pymammotion/mammotion/devices/mower_device.py +120 -0
  93. pymammotion/mammotion/devices/mower_manager.py +107 -0
  94. pymammotion/mammotion/devices/rtk_ble.py +89 -0
  95. pymammotion/mammotion/devices/rtk_cloud.py +115 -0
  96. pymammotion/mammotion/devices/rtk_device.py +50 -0
  97. pymammotion/mammotion/devices/rtk_manager.py +125 -0
  98. pymammotion/mqtt/__init__.py +6 -0
  99. pymammotion/mqtt/aliyun_mqtt.py +237 -0
  100. pymammotion/mqtt/linkkit/__init__.py +5 -0
  101. pymammotion/mqtt/linkkit/h2client.py +585 -0
  102. pymammotion/mqtt/linkkit/linkkit.py +3025 -0
  103. pymammotion/mqtt/mammotion_future.py +26 -0
  104. pymammotion/mqtt/mammotion_mqtt.py +214 -0
  105. pymammotion/mqtt/mqtt_models.py +66 -0
  106. pymammotion/proto/__init__.py +4841 -0
  107. pymammotion/proto/basestation.proto +51 -0
  108. pymammotion/proto/basestation_pb2.py +35 -0
  109. pymammotion/proto/basestation_pb2.pyi +89 -0
  110. pymammotion/proto/common.proto +7 -0
  111. pymammotion/proto/common_pb2.py +25 -0
  112. pymammotion/proto/common_pb2.pyi +13 -0
  113. pymammotion/proto/dev_net.proto +321 -0
  114. pymammotion/proto/dev_net_pb2.py +111 -0
  115. pymammotion/proto/dev_net_pb2.pyi +515 -0
  116. pymammotion/proto/luba_msg.proto +76 -0
  117. pymammotion/proto/luba_msg_pb2.py +41 -0
  118. pymammotion/proto/luba_msg_pb2.pyi +97 -0
  119. pymammotion/proto/luba_mul.proto +129 -0
  120. pymammotion/proto/luba_mul_pb2.py +61 -0
  121. pymammotion/proto/luba_mul_pb2.pyi +178 -0
  122. pymammotion/proto/mctrl_driver.proto +107 -0
  123. pymammotion/proto/mctrl_driver_pb2.py +57 -0
  124. pymammotion/proto/mctrl_driver_pb2.pyi +167 -0
  125. pymammotion/proto/mctrl_nav.proto +591 -0
  126. pymammotion/proto/mctrl_nav_pb2.py +136 -0
  127. pymammotion/proto/mctrl_nav_pb2.pyi +1067 -0
  128. pymammotion/proto/mctrl_ota.proto +80 -0
  129. pymammotion/proto/mctrl_ota_pb2.py +45 -0
  130. pymammotion/proto/mctrl_ota_pb2.pyi +128 -0
  131. pymammotion/proto/mctrl_pept.proto +34 -0
  132. pymammotion/proto/mctrl_pept_pb2.py +33 -0
  133. pymammotion/proto/mctrl_pept_pb2.pyi +58 -0
  134. pymammotion/proto/mctrl_sys.proto +741 -0
  135. pymammotion/proto/mctrl_sys_pb2.py +206 -0
  136. pymammotion/proto/mctrl_sys_pb2.pyi +1213 -0
  137. pymammotion/proto/message_pool.py +3 -0
  138. pymammotion/proto/py.typed +0 -0
  139. pymammotion/py.typed +0 -0
  140. pymammotion/utility/constant/__init__.py +3 -0
  141. pymammotion/utility/constant/device_constant.py +315 -0
  142. pymammotion/utility/conversions.py +5 -0
  143. pymammotion/utility/datatype_converter.py +124 -0
  144. pymammotion/utility/device_config.py +755 -0
  145. pymammotion/utility/device_type.py +489 -0
  146. pymammotion/utility/map.py +259 -0
  147. pymammotion/utility/movement.py +18 -0
  148. pymammotion/utility/mur_mur_hash.py +159 -0
  149. pymammotion/utility/periodic.py +106 -0
  150. pymammotion/utility/rocker_util.py +194 -0
  151. pymammotion-0.5.69.dist-info/METADATA +93 -0
  152. pymammotion-0.5.69.dist-info/RECORD +154 -0
  153. pymammotion-0.5.69.dist-info/WHEEL +4 -0
  154. pymammotion-0.5.69.dist-info/licenses/LICENSE +674 -0
@@ -0,0 +1,748 @@
1
+ """Agora RTC capabilities - Complete codec and extension definitions.
2
+
3
+ This module contains the complete list of codecs and RTP extensions
4
+ as defined by the Agora WebRTC SDK v4.24.0.
5
+ """
6
+
7
+ from typing import Any
8
+
9
+
10
+ def get_audio_codecs() -> list[dict[str, Any]]:
11
+ """Get complete audio codec list (sendrecv)."""
12
+ return [
13
+ {
14
+ "payloadType": 111,
15
+ "rtpMap": {
16
+ "encodingName": "opus",
17
+ "clockRate": 48000,
18
+ "encodingParameters": 2,
19
+ },
20
+ "rtcpFeedbacks": [
21
+ {"type": "transport-cc"},
22
+ {"type": "rrtr"},
23
+ ],
24
+ "fmtp": {
25
+ "parameters": {
26
+ "minptime": "10",
27
+ "useinbandfec": "1",
28
+ }
29
+ },
30
+ },
31
+ {
32
+ "payloadType": 63,
33
+ "rtpMap": {
34
+ "encodingName": "red",
35
+ "clockRate": 48000,
36
+ "encodingParameters": 2,
37
+ },
38
+ "rtcpFeedbacks": [
39
+ {"type": "rrtr"},
40
+ ],
41
+ "fmtp": {
42
+ "parameters": {
43
+ "111/111": None,
44
+ }
45
+ },
46
+ },
47
+ {
48
+ "payloadType": 9,
49
+ "rtpMap": {
50
+ "encodingName": "G722",
51
+ "clockRate": 8000,
52
+ },
53
+ "rtcpFeedbacks": [
54
+ {"type": "rrtr"},
55
+ ],
56
+ },
57
+ {
58
+ "payloadType": 0,
59
+ "rtpMap": {
60
+ "encodingName": "PCMU",
61
+ "clockRate": 8000,
62
+ },
63
+ "rtcpFeedbacks": [
64
+ {"type": "rrtr"},
65
+ ],
66
+ },
67
+ {
68
+ "payloadType": 8,
69
+ "rtpMap": {
70
+ "encodingName": "PCMA",
71
+ "clockRate": 8000,
72
+ },
73
+ "rtcpFeedbacks": [
74
+ {"type": "rrtr"},
75
+ ],
76
+ },
77
+ {
78
+ "payloadType": 13,
79
+ "rtpMap": {
80
+ "encodingName": "CN",
81
+ "clockRate": 8000,
82
+ },
83
+ "rtcpFeedbacks": [
84
+ {"type": "rrtr"},
85
+ ],
86
+ },
87
+ {
88
+ "payloadType": 110,
89
+ "rtpMap": {
90
+ "encodingName": "telephone-event",
91
+ "clockRate": 48000,
92
+ },
93
+ "rtcpFeedbacks": [
94
+ {"type": "rrtr"},
95
+ ],
96
+ },
97
+ {
98
+ "payloadType": 126,
99
+ "rtpMap": {
100
+ "encodingName": "telephone-event",
101
+ "clockRate": 8000,
102
+ },
103
+ "rtcpFeedbacks": [
104
+ {"type": "rrtr"},
105
+ ],
106
+ },
107
+ ]
108
+
109
+
110
+ def get_video_codecs_sendrecv() -> list[dict[str, Any]]:
111
+ """Get video codecs for sendrecv."""
112
+ return [
113
+ # VP8
114
+ {
115
+ "payloadType": 96,
116
+ "rtpMap": {
117
+ "encodingName": "VP8",
118
+ "clockRate": 90000,
119
+ },
120
+ "rtcpFeedbacks": [
121
+ {"type": "goog-remb"},
122
+ {"type": "transport-cc"},
123
+ {"type": "ccm", "parameter": "fir"},
124
+ {"type": "nack"},
125
+ {"type": "nack", "parameter": "pli"},
126
+ {"type": "rrtr"},
127
+ ],
128
+ },
129
+ {
130
+ "payloadType": 97,
131
+ "rtpMap": {
132
+ "encodingName": "rtx",
133
+ "clockRate": 90000,
134
+ },
135
+ "rtcpFeedbacks": [
136
+ {"type": "rrtr"},
137
+ ],
138
+ "fmtp": {
139
+ "parameters": {
140
+ "apt": "96",
141
+ }
142
+ },
143
+ },
144
+ # H264 - Baseline (42001f) - packetization-mode 1
145
+ {
146
+ "payloadType": 103,
147
+ "rtpMap": {
148
+ "encodingName": "H264",
149
+ "clockRate": 90000,
150
+ },
151
+ "rtcpFeedbacks": [
152
+ {"type": "goog-remb"},
153
+ {"type": "transport-cc"},
154
+ {"type": "ccm", "parameter": "fir"},
155
+ {"type": "nack"},
156
+ {"type": "nack", "parameter": "pli"},
157
+ {"type": "rrtr"},
158
+ ],
159
+ "fmtp": {
160
+ "parameters": {
161
+ "level-asymmetry-allowed": "1",
162
+ "packetization-mode": "1",
163
+ "profile-level-id": "42001f",
164
+ }
165
+ },
166
+ },
167
+ {
168
+ "payloadType": 104,
169
+ "rtpMap": {
170
+ "encodingName": "rtx",
171
+ "clockRate": 90000,
172
+ },
173
+ "rtcpFeedbacks": [
174
+ {"type": "rrtr"},
175
+ ],
176
+ "fmtp": {
177
+ "parameters": {
178
+ "apt": "103",
179
+ }
180
+ },
181
+ },
182
+ # H264 - Baseline (42001f) - packetization-mode 0
183
+ {
184
+ "payloadType": 107,
185
+ "rtpMap": {
186
+ "encodingName": "H264",
187
+ "clockRate": 90000,
188
+ },
189
+ "rtcpFeedbacks": [
190
+ {"type": "goog-remb"},
191
+ {"type": "transport-cc"},
192
+ {"type": "ccm", "parameter": "fir"},
193
+ {"type": "nack"},
194
+ {"type": "nack", "parameter": "pli"},
195
+ {"type": "rrtr"},
196
+ ],
197
+ "fmtp": {
198
+ "parameters": {
199
+ "level-asymmetry-allowed": "1",
200
+ "packetization-mode": "0",
201
+ "profile-level-id": "42001f",
202
+ }
203
+ },
204
+ },
205
+ {
206
+ "payloadType": 108,
207
+ "rtpMap": {
208
+ "encodingName": "rtx",
209
+ "clockRate": 90000,
210
+ },
211
+ "rtcpFeedbacks": [
212
+ {"type": "rrtr"},
213
+ ],
214
+ "fmtp": {
215
+ "parameters": {
216
+ "apt": "107",
217
+ }
218
+ },
219
+ },
220
+ # H264 - Constrained Baseline (42e01f) - packetization-mode 1
221
+ {
222
+ "payloadType": 109,
223
+ "rtpMap": {
224
+ "encodingName": "H264",
225
+ "clockRate": 90000,
226
+ },
227
+ "rtcpFeedbacks": [
228
+ {"type": "goog-remb"},
229
+ {"type": "transport-cc"},
230
+ {"type": "ccm", "parameter": "fir"},
231
+ {"type": "nack"},
232
+ {"type": "nack", "parameter": "pli"},
233
+ {"type": "rrtr"},
234
+ ],
235
+ "fmtp": {
236
+ "parameters": {
237
+ "level-asymmetry-allowed": "1",
238
+ "packetization-mode": "1",
239
+ "profile-level-id": "42e01f",
240
+ }
241
+ },
242
+ },
243
+ {
244
+ "payloadType": 114,
245
+ "rtpMap": {
246
+ "encodingName": "rtx",
247
+ "clockRate": 90000,
248
+ },
249
+ "rtcpFeedbacks": [
250
+ {"type": "rrtr"},
251
+ ],
252
+ "fmtp": {
253
+ "parameters": {
254
+ "apt": "109",
255
+ }
256
+ },
257
+ },
258
+ # H264 - Constrained Baseline (42e01f) - packetization-mode 0
259
+ {
260
+ "payloadType": 115,
261
+ "rtpMap": {
262
+ "encodingName": "H264",
263
+ "clockRate": 90000,
264
+ },
265
+ "rtcpFeedbacks": [
266
+ {"type": "goog-remb"},
267
+ {"type": "transport-cc"},
268
+ {"type": "ccm", "parameter": "fir"},
269
+ {"type": "nack"},
270
+ {"type": "nack", "parameter": "pli"},
271
+ {"type": "rrtr"},
272
+ ],
273
+ "fmtp": {
274
+ "parameters": {
275
+ "level-asymmetry-allowed": "1",
276
+ "packetization-mode": "0",
277
+ "profile-level-id": "42e01f",
278
+ }
279
+ },
280
+ },
281
+ {
282
+ "payloadType": 116,
283
+ "rtpMap": {
284
+ "encodingName": "rtx",
285
+ "clockRate": 90000,
286
+ },
287
+ "rtcpFeedbacks": [
288
+ {"type": "rrtr"},
289
+ ],
290
+ "fmtp": {
291
+ "parameters": {
292
+ "apt": "115",
293
+ }
294
+ },
295
+ },
296
+ # H264 - Main (4d001f) - packetization-mode 1
297
+ {
298
+ "payloadType": 117,
299
+ "rtpMap": {
300
+ "encodingName": "H264",
301
+ "clockRate": 90000,
302
+ },
303
+ "rtcpFeedbacks": [
304
+ {"type": "goog-remb"},
305
+ {"type": "transport-cc"},
306
+ {"type": "ccm", "parameter": "fir"},
307
+ {"type": "nack"},
308
+ {"type": "nack", "parameter": "pli"},
309
+ {"type": "rrtr"},
310
+ ],
311
+ "fmtp": {
312
+ "parameters": {
313
+ "level-asymmetry-allowed": "1",
314
+ "packetization-mode": "1",
315
+ "profile-level-id": "4d001f",
316
+ }
317
+ },
318
+ },
319
+ {
320
+ "payloadType": 118,
321
+ "rtpMap": {
322
+ "encodingName": "rtx",
323
+ "clockRate": 90000,
324
+ },
325
+ "rtcpFeedbacks": [
326
+ {"type": "rrtr"},
327
+ ],
328
+ "fmtp": {
329
+ "parameters": {
330
+ "apt": "117",
331
+ }
332
+ },
333
+ },
334
+ # H264 - Main (4d001f) - packetization-mode 0
335
+ {
336
+ "payloadType": 39,
337
+ "rtpMap": {
338
+ "encodingName": "H264",
339
+ "clockRate": 90000,
340
+ },
341
+ "rtcpFeedbacks": [
342
+ {"type": "goog-remb"},
343
+ {"type": "transport-cc"},
344
+ {"type": "ccm", "parameter": "fir"},
345
+ {"type": "nack"},
346
+ {"type": "nack", "parameter": "pli"},
347
+ {"type": "rrtr"},
348
+ ],
349
+ "fmtp": {
350
+ "parameters": {
351
+ "level-asymmetry-allowed": "1",
352
+ "packetization-mode": "0",
353
+ "profile-level-id": "4d001f",
354
+ }
355
+ },
356
+ },
357
+ {
358
+ "payloadType": 40,
359
+ "rtpMap": {
360
+ "encodingName": "rtx",
361
+ "clockRate": 90000,
362
+ },
363
+ "rtcpFeedbacks": [
364
+ {"type": "rrtr"},
365
+ ],
366
+ "fmtp": {
367
+ "parameters": {
368
+ "apt": "39",
369
+ }
370
+ },
371
+ },
372
+ # AV1 - Profile 0
373
+ {
374
+ "payloadType": 45,
375
+ "rtpMap": {
376
+ "encodingName": "AV1",
377
+ "clockRate": 90000,
378
+ },
379
+ "rtcpFeedbacks": [
380
+ {"type": "goog-remb"},
381
+ {"type": "transport-cc"},
382
+ {"type": "ccm", "parameter": "fir"},
383
+ {"type": "nack"},
384
+ {"type": "nack", "parameter": "pli"},
385
+ {"type": "rrtr"},
386
+ ],
387
+ "fmtp": {
388
+ "parameters": {
389
+ "level-idx": "5",
390
+ "profile": "0",
391
+ "tier": "0",
392
+ }
393
+ },
394
+ },
395
+ {
396
+ "payloadType": 46,
397
+ "rtpMap": {
398
+ "encodingName": "rtx",
399
+ "clockRate": 90000,
400
+ },
401
+ "rtcpFeedbacks": [
402
+ {"type": "rrtr"},
403
+ ],
404
+ "fmtp": {
405
+ "parameters": {
406
+ "apt": "45",
407
+ }
408
+ },
409
+ },
410
+ # VP9 - Profile 0
411
+ {
412
+ "payloadType": 98,
413
+ "rtpMap": {
414
+ "encodingName": "VP9",
415
+ "clockRate": 90000,
416
+ },
417
+ "rtcpFeedbacks": [
418
+ {"type": "goog-remb"},
419
+ {"type": "transport-cc"},
420
+ {"type": "ccm", "parameter": "fir"},
421
+ {"type": "nack"},
422
+ {"type": "nack", "parameter": "pli"},
423
+ {"type": "rrtr"},
424
+ ],
425
+ "fmtp": {
426
+ "parameters": {
427
+ "profile-id": "0",
428
+ }
429
+ },
430
+ },
431
+ {
432
+ "payloadType": 99,
433
+ "rtpMap": {
434
+ "encodingName": "rtx",
435
+ "clockRate": 90000,
436
+ },
437
+ "rtcpFeedbacks": [
438
+ {"type": "rrtr"},
439
+ ],
440
+ "fmtp": {
441
+ "parameters": {
442
+ "apt": "98",
443
+ }
444
+ },
445
+ },
446
+ # VP9 - Profile 2
447
+ {
448
+ "payloadType": 100,
449
+ "rtpMap": {
450
+ "encodingName": "VP9",
451
+ "clockRate": 90000,
452
+ },
453
+ "rtcpFeedbacks": [
454
+ {"type": "goog-remb"},
455
+ {"type": "transport-cc"},
456
+ {"type": "ccm", "parameter": "fir"},
457
+ {"type": "nack"},
458
+ {"type": "nack", "parameter": "pli"},
459
+ {"type": "rrtr"},
460
+ ],
461
+ "fmtp": {
462
+ "parameters": {
463
+ "profile-id": "2",
464
+ }
465
+ },
466
+ },
467
+ {
468
+ "payloadType": 101,
469
+ "rtpMap": {
470
+ "encodingName": "rtx",
471
+ "clockRate": 90000,
472
+ },
473
+ "rtcpFeedbacks": [
474
+ {"type": "rrtr"},
475
+ ],
476
+ "fmtp": {
477
+ "parameters": {
478
+ "apt": "100",
479
+ }
480
+ },
481
+ },
482
+ ]
483
+
484
+
485
+ def get_video_codecs_recv() -> list[dict[str, Any]]:
486
+ """Get additional video codecs for recv only (VP9 1/3, AV1 1, H265)."""
487
+ return [
488
+ # VP9 - Profile 1
489
+ {
490
+ "payloadType": 35,
491
+ "rtpMap": {
492
+ "encodingName": "VP9",
493
+ "clockRate": 90000,
494
+ },
495
+ "rtcpFeedbacks": [
496
+ {"type": "goog-remb"},
497
+ {"type": "transport-cc"},
498
+ {"type": "ccm", "parameter": "fir"},
499
+ {"type": "nack"},
500
+ {"type": "nack", "parameter": "pli"},
501
+ {"type": "rrtr"},
502
+ ],
503
+ "fmtp": {
504
+ "parameters": {
505
+ "profile-id": "1",
506
+ }
507
+ },
508
+ },
509
+ {
510
+ "payloadType": 36,
511
+ "rtpMap": {
512
+ "encodingName": "rtx",
513
+ "clockRate": 90000,
514
+ },
515
+ "rtcpFeedbacks": [
516
+ {"type": "rrtr"},
517
+ ],
518
+ "fmtp": {
519
+ "parameters": {
520
+ "apt": "35",
521
+ }
522
+ },
523
+ },
524
+ # VP9 - Profile 3
525
+ {
526
+ "payloadType": 37,
527
+ "rtpMap": {
528
+ "encodingName": "VP9",
529
+ "clockRate": 90000,
530
+ },
531
+ "rtcpFeedbacks": [
532
+ {"type": "goog-remb"},
533
+ {"type": "transport-cc"},
534
+ {"type": "ccm", "parameter": "fir"},
535
+ {"type": "nack"},
536
+ {"type": "nack", "parameter": "pli"},
537
+ {"type": "rrtr"},
538
+ ],
539
+ "fmtp": {
540
+ "parameters": {
541
+ "profile-id": "3",
542
+ }
543
+ },
544
+ },
545
+ {
546
+ "payloadType": 38,
547
+ "rtpMap": {
548
+ "encodingName": "rtx",
549
+ "clockRate": 90000,
550
+ },
551
+ "rtcpFeedbacks": [
552
+ {"type": "rrtr"},
553
+ ],
554
+ "fmtp": {
555
+ "parameters": {
556
+ "apt": "37",
557
+ }
558
+ },
559
+ },
560
+ # AV1 - Profile 1
561
+ {
562
+ "payloadType": 47,
563
+ "rtpMap": {
564
+ "encodingName": "AV1",
565
+ "clockRate": 90000,
566
+ },
567
+ "rtcpFeedbacks": [
568
+ {"type": "goog-remb"},
569
+ {"type": "transport-cc"},
570
+ {"type": "ccm", "parameter": "fir"},
571
+ {"type": "nack"},
572
+ {"type": "nack", "parameter": "pli"},
573
+ {"type": "rrtr"},
574
+ ],
575
+ "fmtp": {
576
+ "parameters": {
577
+ "level-idx": "5",
578
+ "profile": "1",
579
+ "tier": "0",
580
+ }
581
+ },
582
+ },
583
+ {
584
+ "payloadType": 48,
585
+ "rtpMap": {
586
+ "encodingName": "rtx",
587
+ "clockRate": 90000,
588
+ },
589
+ "rtcpFeedbacks": [
590
+ {"type": "rrtr"},
591
+ ],
592
+ "fmtp": {
593
+ "parameters": {
594
+ "apt": "47",
595
+ }
596
+ },
597
+ },
598
+ # H265 (HEVC) - Profile 1
599
+ {
600
+ "payloadType": 49,
601
+ "rtpMap": {
602
+ "encodingName": "H265",
603
+ "clockRate": 90000,
604
+ },
605
+ "rtcpFeedbacks": [
606
+ {"type": "goog-remb"},
607
+ {"type": "transport-cc"},
608
+ {"type": "ccm", "parameter": "fir"},
609
+ {"type": "nack"},
610
+ {"type": "nack", "parameter": "pli"},
611
+ {"type": "rrtr"},
612
+ ],
613
+ "fmtp": {
614
+ "parameters": {
615
+ "level-id": "180",
616
+ "profile-id": "1",
617
+ "tier-flag": "0",
618
+ "tx-mode": "SRST",
619
+ }
620
+ },
621
+ },
622
+ {
623
+ "payloadType": 50,
624
+ "rtpMap": {
625
+ "encodingName": "rtx",
626
+ "clockRate": 90000,
627
+ },
628
+ "rtcpFeedbacks": [
629
+ {"type": "rrtr"},
630
+ ],
631
+ "fmtp": {
632
+ "parameters": {
633
+ "apt": "49",
634
+ }
635
+ },
636
+ },
637
+ # H265 (HEVC) - Profile 2
638
+ {
639
+ "payloadType": 51,
640
+ "rtpMap": {
641
+ "encodingName": "H265",
642
+ "clockRate": 90000,
643
+ },
644
+ "rtcpFeedbacks": [
645
+ {"type": "goog-remb"},
646
+ {"type": "transport-cc"},
647
+ {"type": "ccm", "parameter": "fir"},
648
+ {"type": "nack"},
649
+ {"type": "nack", "parameter": "pli"},
650
+ {"type": "rrtr"},
651
+ ],
652
+ "fmtp": {
653
+ "parameters": {
654
+ "level-id": "180",
655
+ "profile-id": "2",
656
+ "tier-flag": "0",
657
+ "tx-mode": "SRST",
658
+ }
659
+ },
660
+ },
661
+ {
662
+ "payloadType": 52,
663
+ "rtpMap": {
664
+ "encodingName": "rtx",
665
+ "clockRate": 90000,
666
+ },
667
+ "rtcpFeedbacks": [
668
+ {"type": "rrtr"},
669
+ ],
670
+ "fmtp": {
671
+ "parameters": {
672
+ "apt": "51",
673
+ }
674
+ },
675
+ },
676
+ ]
677
+
678
+
679
+ def get_audio_extensions() -> list[dict[str, Any]]:
680
+ """Get audio RTP header extensions with fixed entry IDs."""
681
+ return [
682
+ {
683
+ "entry": 14,
684
+ "extensionName": "urn:ietf:params:rtp-hdrext:ssrc-audio-level",
685
+ },
686
+ {
687
+ "entry": 2,
688
+ "extensionName": "http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time",
689
+ },
690
+ {
691
+ "entry": 4,
692
+ "extensionName": "http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01",
693
+ },
694
+ {
695
+ "entry": 9,
696
+ "extensionName": "urn:ietf:params:rtp-hdrext:sdes:mid",
697
+ },
698
+ ]
699
+
700
+
701
+ def get_video_extensions() -> list[dict[str, Any]]:
702
+ """Get video RTP header extensions with fixed entry IDs."""
703
+ return [
704
+ {
705
+ "entry": 1,
706
+ "extensionName": "urn:ietf:params:rtp-hdrext:toffset",
707
+ },
708
+ {
709
+ "entry": 2,
710
+ "extensionName": "http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time",
711
+ },
712
+ {
713
+ "entry": 3,
714
+ "extensionName": "urn:3gpp:video-orientation",
715
+ },
716
+ {
717
+ "entry": 4,
718
+ "extensionName": "http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01",
719
+ },
720
+ {
721
+ "entry": 5,
722
+ "extensionName": "http://www.webrtc.org/experiments/rtp-hdrext/playout-delay",
723
+ },
724
+ {
725
+ "entry": 6,
726
+ "extensionName": "http://www.webrtc.org/experiments/rtp-hdrext/video-content-type",
727
+ },
728
+ {
729
+ "entry": 7,
730
+ "extensionName": "http://www.webrtc.org/experiments/rtp-hdrext/video-timing",
731
+ },
732
+ {
733
+ "entry": 8,
734
+ "extensionName": "http://www.webrtc.org/experiments/rtp-hdrext/color-space",
735
+ },
736
+ {
737
+ "entry": 9,
738
+ "extensionName": "urn:ietf:params:rtp-hdrext:sdes:mid",
739
+ },
740
+ {
741
+ "entry": 10,
742
+ "extensionName": "urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id",
743
+ },
744
+ {
745
+ "entry": 11,
746
+ "extensionName": "urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id",
747
+ },
748
+ ]