sora-sdk 2025.1.0.dev17__tar.gz → 2025.2.0.dev1__tar.gz

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 (44) hide show
  1. {sora_sdk-2025.1.0.dev17/src/sora_sdk.egg-info → sora_sdk-2025.2.0.dev1}/PKG-INFO +18 -7
  2. {sora_sdk-2025.1.0.dev17 → sora_sdk-2025.2.0.dev1}/README.md +16 -5
  3. {sora_sdk-2025.1.0.dev17 → sora_sdk-2025.2.0.dev1}/pyproject.toml +9 -8
  4. {sora_sdk-2025.1.0.dev17 → sora_sdk-2025.2.0.dev1}/src/sora_sdk/sora_sdk_ext.cpython-311-darwin.so +0 -0
  5. {sora_sdk-2025.1.0.dev17 → sora_sdk-2025.2.0.dev1/src/sora_sdk.egg-info}/PKG-INFO +18 -7
  6. {sora_sdk-2025.1.0.dev17 → sora_sdk-2025.2.0.dev1}/src/sora_sdk.egg-info/SOURCES.txt +0 -1
  7. {sora_sdk-2025.1.0.dev17 → sora_sdk-2025.2.0.dev1}/tests/test_apple_video_toolbox.py +5 -10
  8. {sora_sdk-2025.1.0.dev17 → sora_sdk-2025.2.0.dev1}/tests/test_authz_simulcast.py +8 -3
  9. {sora_sdk-2025.1.0.dev17 → sora_sdk-2025.2.0.dev1}/tests/test_intel_vpl.py +6 -0
  10. {sora_sdk-2025.1.0.dev17 → sora_sdk-2025.2.0.dev1}/tests/test_openh264.py +7 -0
  11. {sora_sdk-2025.1.0.dev17 → sora_sdk-2025.2.0.dev1}/tests/test_sendonly_recvonly.py +7 -8
  12. {sora_sdk-2025.1.0.dev17 → sora_sdk-2025.2.0.dev1}/tests/test_simulcast.py +14 -3
  13. {sora_sdk-2025.1.0.dev17 → sora_sdk-2025.2.0.dev1}/tests/test_sora_disconnect.py +0 -12
  14. sora_sdk-2025.1.0.dev17/tests/test_memory_leak.py +0 -25
  15. {sora_sdk-2025.1.0.dev17 → sora_sdk-2025.2.0.dev1}/LICENSE +0 -0
  16. {sora_sdk-2025.1.0.dev17 → sora_sdk-2025.2.0.dev1}/MANIFEST.in +0 -0
  17. {sora_sdk-2025.1.0.dev17 → sora_sdk-2025.2.0.dev1}/NOTICE.md +0 -0
  18. {sora_sdk-2025.1.0.dev17 → sora_sdk-2025.2.0.dev1}/buildbase.py +0 -0
  19. {sora_sdk-2025.1.0.dev17 → sora_sdk-2025.2.0.dev1}/pypath.py +0 -0
  20. {sora_sdk-2025.1.0.dev17 → sora_sdk-2025.2.0.dev1}/run.py +0 -0
  21. {sora_sdk-2025.1.0.dev17 → sora_sdk-2025.2.0.dev1}/setup.cfg +0 -0
  22. {sora_sdk-2025.1.0.dev17 → sora_sdk-2025.2.0.dev1}/setup.py +0 -0
  23. {sora_sdk-2025.1.0.dev17 → sora_sdk-2025.2.0.dev1}/src/sora_sdk/__init__.py +0 -0
  24. {sora_sdk-2025.1.0.dev17 → sora_sdk-2025.2.0.dev1}/src/sora_sdk/py.typed +0 -0
  25. {sora_sdk-2025.1.0.dev17 → sora_sdk-2025.2.0.dev1}/src/sora_sdk/sora_sdk_ext.pyi +0 -0
  26. {sora_sdk-2025.1.0.dev17 → sora_sdk-2025.2.0.dev1}/src/sora_sdk.egg-info/dependency_links.txt +0 -0
  27. {sora_sdk-2025.1.0.dev17 → sora_sdk-2025.2.0.dev1}/src/sora_sdk.egg-info/top_level.txt +0 -0
  28. {sora_sdk-2025.1.0.dev17 → sora_sdk-2025.2.0.dev1}/tests/test_amd_amf.py +0 -0
  29. {sora_sdk-2025.1.0.dev17 → sora_sdk-2025.2.0.dev1}/tests/test_authz.py +0 -0
  30. {sora_sdk-2025.1.0.dev17 → sora_sdk-2025.2.0.dev1}/tests/test_ca_cert.py +0 -0
  31. {sora_sdk-2025.1.0.dev17 → sora_sdk-2025.2.0.dev1}/tests/test_capability.py +0 -0
  32. {sora_sdk-2025.1.0.dev17 → sora_sdk-2025.2.0.dev1}/tests/test_degradation_preference.py +0 -0
  33. {sora_sdk-2025.1.0.dev17 → sora_sdk-2025.2.0.dev1}/tests/test_encoded_transform.py +0 -0
  34. {sora_sdk-2025.1.0.dev17 → sora_sdk-2025.2.0.dev1}/tests/test_messaging.py +0 -0
  35. {sora_sdk-2025.1.0.dev17 → sora_sdk-2025.2.0.dev1}/tests/test_messaging_header.py +0 -0
  36. {sora_sdk-2025.1.0.dev17 → sora_sdk-2025.2.0.dev1}/tests/test_nvidia_video_codec_sdk.py +0 -0
  37. {sora_sdk-2025.1.0.dev17 → sora_sdk-2025.2.0.dev1}/tests/test_opus.py +0 -0
  38. {sora_sdk-2025.1.0.dev17 → sora_sdk-2025.2.0.dev1}/tests/test_re_offer_re_answer_sdp.py +0 -0
  39. {sora_sdk-2025.1.0.dev17 → sora_sdk-2025.2.0.dev1}/tests/test_signaling.py +0 -0
  40. {sora_sdk-2025.1.0.dev17 → sora_sdk-2025.2.0.dev1}/tests/test_signaling_message.py +0 -0
  41. {sora_sdk-2025.1.0.dev17 → sora_sdk-2025.2.0.dev1}/tests/test_signaling_notify.py +0 -0
  42. {sora_sdk-2025.1.0.dev17 → sora_sdk-2025.2.0.dev1}/tests/test_type_disconnect.py +0 -0
  43. {sora_sdk-2025.1.0.dev17 → sora_sdk-2025.2.0.dev1}/tests/test_type_switched.py +0 -0
  44. {sora_sdk-2025.1.0.dev17 → sora_sdk-2025.2.0.dev1}/tests/test_vad.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: sora_sdk
3
- Version: 2025.1.0.dev17
3
+ Version: 2025.2.0.dev1
4
4
  Summary: WebRTC SFU Sora Python SDK
5
5
  Home-page: https://github.com/shiguredo/sora-python-sdk
6
6
  Author-email: "Shiguredo Inc." <contact+pypi@shiguredo.jp>
@@ -190,7 +190,7 @@ Classifier: Programming Language :: Python :: 3 :: Only
190
190
  Classifier: Programming Language :: Python :: 3.11
191
191
  Classifier: Programming Language :: Python :: 3.12
192
192
  Classifier: Programming Language :: Python :: 3.13
193
- Requires-Python: >=3.10
193
+ Requires-Python: >=3.11
194
194
  Description-Content-Type: text/markdown
195
195
  License-File: LICENSE
196
196
  License-File: NOTICE.md
@@ -231,12 +231,17 @@ Please read <https://github.com/shiguredo/oss/blob/master/README.en.md> before u
231
231
  - 回線が不安定になった際、解像度とフレームレートどちらを維持するかの設定をする [DegradationPreference](https://w3c.github.io/mst-content-hint/#degradation-preference-when-encoding) に対応
232
232
  - MAINTAIN_FRAMERATE / MAINTAIN_RESOLUTION / BALANCED が指定できる
233
233
  - Intel / Apple / NVIDIA のハードウェアデコーダー/エンコーダーに対応
234
- - Intel VPL (AV1 / H.264 / H.265)
235
- - Ubuntu x86_64 / Windows x86_64 で利用できる
236
234
  - Apple Video Toolbox (H.264 / H.265)
237
235
  - macOS arm64 で利用できる
238
- - NVIDIA Video Codec SDK (VP9 / H.264 / H.265)
236
+ - Intel VPL (AV1 / H.264 / H.265)
237
+ - Ubuntu x86_64 / Windows x86_64 で利用できる
238
+ - AMD AMF (VP9 /AV1 / H.264 / H.265)
239
+ - Ubuntu x86_64 / Windows x86_64 で利用できる
240
+ - AV1 エンコードは Windows x86_64 でのみ利用できる
241
+ - VP9 はデコードのみ利用できる
242
+ - NVIDIA Video Codec SDK (VP8 / VP9 / AV1 / H.264 / H.265)
239
243
  - Ubuntu x86_64 / Windows x86_64 で利用できる
244
+ - VP8 と VP9 はデコードのみ利用できる
240
245
  - NVIDIA Jetson JetPack SDK (AV1 / H.264 / H.265)
241
246
  - [各プラットフォームで利用可能な HWA への対応](https://github.com/shiguredo/sora-cpp-sdk?tab=readme-ov-file#%E7%89%B9%E5%BE%B4)
242
247
  - [OpenH264](https://github.com/cisco/openh264) を利用した H.264 のソフトウェアエンコーダー/デコーダーに対応
@@ -332,8 +337,6 @@ PyPI 経由ではインストールできません。
332
337
  - Ubuntu 22.04 arm64
333
338
  - Ubuntu 22.04 arm64 (NVIDIA Jetson JetPack SDK 6.1)
334
339
  - Ubuntu 20.04 arm64 (NVIDIA Jetson JetPack SDK 5)
335
- - AMD Video Core Next (VCN) 対応
336
- - VP9 / AV1 / H.264 / H.265
337
340
 
338
341
  ## サポートについて
339
342
 
@@ -381,6 +384,14 @@ limitations under the License.
381
384
  "OpenH264 Video Codec provided by Cisco Systems, Inc."
382
385
  ```
383
386
 
387
+ ## NVDIA Video Codec SDK
388
+
389
+ <https://docs.nvidia.com/video-technologies/video-codec-sdk/12.0/index.html>
390
+
391
+ ```text
392
+ “This software contains source code provided by NVIDIA Corporation.”
393
+ ```
394
+
384
395
  ## H.264 (AVC) と H.265 (HEVC) のライセンスについて
385
396
 
386
397
  **時雨堂が提供する libwebrtc のビルド済みバイナリには H.264 と H.265 のコーデックは含まれていません**
@@ -33,12 +33,17 @@ Please read <https://github.com/shiguredo/oss/blob/master/README.en.md> before u
33
33
  - 回線が不安定になった際、解像度とフレームレートどちらを維持するかの設定をする [DegradationPreference](https://w3c.github.io/mst-content-hint/#degradation-preference-when-encoding) に対応
34
34
  - MAINTAIN_FRAMERATE / MAINTAIN_RESOLUTION / BALANCED が指定できる
35
35
  - Intel / Apple / NVIDIA のハードウェアデコーダー/エンコーダーに対応
36
- - Intel VPL (AV1 / H.264 / H.265)
37
- - Ubuntu x86_64 / Windows x86_64 で利用できる
38
36
  - Apple Video Toolbox (H.264 / H.265)
39
37
  - macOS arm64 で利用できる
40
- - NVIDIA Video Codec SDK (VP9 / H.264 / H.265)
38
+ - Intel VPL (AV1 / H.264 / H.265)
39
+ - Ubuntu x86_64 / Windows x86_64 で利用できる
40
+ - AMD AMF (VP9 /AV1 / H.264 / H.265)
41
+ - Ubuntu x86_64 / Windows x86_64 で利用できる
42
+ - AV1 エンコードは Windows x86_64 でのみ利用できる
43
+ - VP9 はデコードのみ利用できる
44
+ - NVIDIA Video Codec SDK (VP8 / VP9 / AV1 / H.264 / H.265)
41
45
  - Ubuntu x86_64 / Windows x86_64 で利用できる
46
+ - VP8 と VP9 はデコードのみ利用できる
42
47
  - NVIDIA Jetson JetPack SDK (AV1 / H.264 / H.265)
43
48
  - [各プラットフォームで利用可能な HWA への対応](https://github.com/shiguredo/sora-cpp-sdk?tab=readme-ov-file#%E7%89%B9%E5%BE%B4)
44
49
  - [OpenH264](https://github.com/cisco/openh264) を利用した H.264 のソフトウェアエンコーダー/デコーダーに対応
@@ -134,8 +139,6 @@ PyPI 経由ではインストールできません。
134
139
  - Ubuntu 22.04 arm64
135
140
  - Ubuntu 22.04 arm64 (NVIDIA Jetson JetPack SDK 6.1)
136
141
  - Ubuntu 20.04 arm64 (NVIDIA Jetson JetPack SDK 5)
137
- - AMD Video Core Next (VCN) 対応
138
- - VP9 / AV1 / H.264 / H.265
139
142
 
140
143
  ## サポートについて
141
144
 
@@ -183,6 +186,14 @@ limitations under the License.
183
186
  "OpenH264 Video Codec provided by Cisco Systems, Inc."
184
187
  ```
185
188
 
189
+ ## NVDIA Video Codec SDK
190
+
191
+ <https://docs.nvidia.com/video-technologies/video-codec-sdk/12.0/index.html>
192
+
193
+ ```text
194
+ “This software contains source code provided by NVIDIA Corporation.”
195
+ ```
196
+
186
197
  ## H.264 (AVC) と H.265 (HEVC) のライセンスについて
187
198
 
188
199
  **時雨堂が提供する libwebrtc のビルド済みバイナリには H.264 と H.265 のコーデックは含まれていません**
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
  name = "sora_sdk"
3
3
  authors = [{ name = "Shiguredo Inc.", email = "contact+pypi@shiguredo.jp" }]
4
- version = "2025.1.0.dev17"
4
+ version = "2025.2.0.dev1"
5
5
  description = "WebRTC SFU Sora Python SDK"
6
6
  readme = "README.md"
7
7
  license = { file = "LICENSE" }
@@ -12,7 +12,7 @@ classifiers = [
12
12
  "Programming Language :: Python :: 3.12",
13
13
  "Programming Language :: Python :: 3.13",
14
14
  ]
15
- requires-python = ">= 3.10"
15
+ requires-python = ">= 3.11"
16
16
 
17
17
  [project.urls]
18
18
  Source = "https://github.com/shiguredo/sora-python-sdk"
@@ -20,16 +20,16 @@ Documentation = "https://sora-python-sdk.shiguredo.jp"
20
20
  Discord = "https://discord.gg/shiguredo"
21
21
 
22
22
  [build-system]
23
- requires = ["setuptools~=76.0", "wheel~=0.45.1"]
23
+ requires = ["setuptools==76.1", "wheel==0.45.1"]
24
24
  build-backend = "setuptools.build_meta"
25
25
 
26
26
  [tool.uv]
27
27
  python-preference = "only-managed"
28
28
  dev-dependencies = [
29
- "nanobind~=2.5.0",
30
- "setuptools~=76.0",
31
- "build~=1.2.2.post1",
32
- "wheel~=0.45.1",
29
+ "nanobind==2.5.0",
30
+ "setuptools==76.1",
31
+ "build==1.2.2.post1",
32
+ "wheel==0.45.1",
33
33
  "typing-extensions",
34
34
  "python-dotenv",
35
35
  "numpy",
@@ -39,10 +39,11 @@ dev-dependencies = [
39
39
  "mypy",
40
40
  "pyjwt",
41
41
  "pytest-repeat",
42
+ "psutil",
42
43
  ]
43
44
 
44
45
  [tool.ruff]
45
- target-version = "py310"
46
+ target-version = "py311"
46
47
  line-length = 100
47
48
 
48
49
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: sora_sdk
3
- Version: 2025.1.0.dev17
3
+ Version: 2025.2.0.dev1
4
4
  Summary: WebRTC SFU Sora Python SDK
5
5
  Home-page: https://github.com/shiguredo/sora-python-sdk
6
6
  Author-email: "Shiguredo Inc." <contact+pypi@shiguredo.jp>
@@ -190,7 +190,7 @@ Classifier: Programming Language :: Python :: 3 :: Only
190
190
  Classifier: Programming Language :: Python :: 3.11
191
191
  Classifier: Programming Language :: Python :: 3.12
192
192
  Classifier: Programming Language :: Python :: 3.13
193
- Requires-Python: >=3.10
193
+ Requires-Python: >=3.11
194
194
  Description-Content-Type: text/markdown
195
195
  License-File: LICENSE
196
196
  License-File: NOTICE.md
@@ -231,12 +231,17 @@ Please read <https://github.com/shiguredo/oss/blob/master/README.en.md> before u
231
231
  - 回線が不安定になった際、解像度とフレームレートどちらを維持するかの設定をする [DegradationPreference](https://w3c.github.io/mst-content-hint/#degradation-preference-when-encoding) に対応
232
232
  - MAINTAIN_FRAMERATE / MAINTAIN_RESOLUTION / BALANCED が指定できる
233
233
  - Intel / Apple / NVIDIA のハードウェアデコーダー/エンコーダーに対応
234
- - Intel VPL (AV1 / H.264 / H.265)
235
- - Ubuntu x86_64 / Windows x86_64 で利用できる
236
234
  - Apple Video Toolbox (H.264 / H.265)
237
235
  - macOS arm64 で利用できる
238
- - NVIDIA Video Codec SDK (VP9 / H.264 / H.265)
236
+ - Intel VPL (AV1 / H.264 / H.265)
237
+ - Ubuntu x86_64 / Windows x86_64 で利用できる
238
+ - AMD AMF (VP9 /AV1 / H.264 / H.265)
239
+ - Ubuntu x86_64 / Windows x86_64 で利用できる
240
+ - AV1 エンコードは Windows x86_64 でのみ利用できる
241
+ - VP9 はデコードのみ利用できる
242
+ - NVIDIA Video Codec SDK (VP8 / VP9 / AV1 / H.264 / H.265)
239
243
  - Ubuntu x86_64 / Windows x86_64 で利用できる
244
+ - VP8 と VP9 はデコードのみ利用できる
240
245
  - NVIDIA Jetson JetPack SDK (AV1 / H.264 / H.265)
241
246
  - [各プラットフォームで利用可能な HWA への対応](https://github.com/shiguredo/sora-cpp-sdk?tab=readme-ov-file#%E7%89%B9%E5%BE%B4)
242
247
  - [OpenH264](https://github.com/cisco/openh264) を利用した H.264 のソフトウェアエンコーダー/デコーダーに対応
@@ -332,8 +337,6 @@ PyPI 経由ではインストールできません。
332
337
  - Ubuntu 22.04 arm64
333
338
  - Ubuntu 22.04 arm64 (NVIDIA Jetson JetPack SDK 6.1)
334
339
  - Ubuntu 20.04 arm64 (NVIDIA Jetson JetPack SDK 5)
335
- - AMD Video Core Next (VCN) 対応
336
- - VP9 / AV1 / H.264 / H.265
337
340
 
338
341
  ## サポートについて
339
342
 
@@ -381,6 +384,14 @@ limitations under the License.
381
384
  "OpenH264 Video Codec provided by Cisco Systems, Inc."
382
385
  ```
383
386
 
387
+ ## NVDIA Video Codec SDK
388
+
389
+ <https://docs.nvidia.com/video-technologies/video-codec-sdk/12.0/index.html>
390
+
391
+ ```text
392
+ “This software contains source code provided by NVIDIA Corporation.”
393
+ ```
394
+
384
395
  ## H.264 (AVC) と H.265 (HEVC) のライセンスについて
385
396
 
386
397
  **時雨堂が提供する libwebrtc のビルド済みバイナリには H.264 と H.265 のコーデックは含まれていません**
@@ -24,7 +24,6 @@ tests/test_capability.py
24
24
  tests/test_degradation_preference.py
25
25
  tests/test_encoded_transform.py
26
26
  tests/test_intel_vpl.py
27
- tests/test_memory_leak.py
28
27
  tests/test_messaging.py
29
28
  tests/test_messaging_header.py
30
29
  tests/test_nvidia_video_codec_sdk.py
@@ -286,19 +286,19 @@ def test_apple_video_toolbox_simulcast_authz_scale_resolution_to(
286
286
  {
287
287
  "rid": "r0",
288
288
  "active": True,
289
- "scaleResolutionDownTo": {"maxWidth": 320, "maxHeight": 180},
289
+ "scaleResolutionDownTo": {"maxWidth": video_width, "maxHeight": video_height},
290
290
  "scalabilityMode": "L1T1",
291
291
  },
292
292
  {
293
293
  "rid": "r1",
294
294
  "active": True,
295
- "scaleResolutionDownTo": {"maxWidth": 320, "maxHeight": 180},
295
+ "scaleResolutionDownTo": {"maxWidth": video_width, "maxHeight": video_height},
296
296
  "scalabilityMode": "L1T1",
297
297
  },
298
298
  {
299
299
  "rid": "r2",
300
300
  "active": True,
301
- "scaleResolutionDownTo": {"maxWidth": 320, "maxHeight": 180},
301
+ "scaleResolutionDownTo": {"maxWidth": video_width, "maxHeight": video_height},
302
302
  "scalabilityMode": "L1T1",
303
303
  },
304
304
  ]
@@ -417,12 +417,8 @@ def test_apple_video_toolbox_simulcast_authz_scale_resolution_to(
417
417
  assert s["frameWidth"] == 320
418
418
  assert s["frameHeight"] == 176
419
419
 
420
- # FIXME:これは libwebrtc 側の挙動を制御できず L1T2 になってしまう
421
- scalability_mode = None
422
- # FIXME: scalabilityMode がない場合がある
423
- if "scalabilityMode" in s:
424
- scalability_mode = s["scalabilityMode"]
425
- assert s["scalabilityMode"] == "L1T2"
420
+ # Apple Video Toolbox の場合は scalabilityMode がない
421
+ assert "scalabilityMode" not in s
426
422
 
427
423
  # targetBitrate が指定したビットレートの 90% 以上、100% 以下に収まることを確認
428
424
  expected_bitrate = video_bit_rate * 1000
@@ -430,7 +426,6 @@ def test_apple_video_toolbox_simulcast_authz_scale_resolution_to(
430
426
  s["rid"],
431
427
  video_codec_type,
432
428
  s["encoderImplementation"],
433
- scalability_mode,
434
429
  expected_bitrate,
435
430
  s["targetBitrate"],
436
431
  s["frameWidth"],
@@ -165,6 +165,13 @@ def test_simulcast_authz_scale_resolution_to(
165
165
  assert "SimulcastEncoderAdapter" in s["encoderImplementation"]
166
166
  assert encoder_implementation in s["encoderImplementation"]
167
167
 
168
+ if (
169
+ s["qualityLimitationReason"] != "none"
170
+ and "frameWidth" not in s
171
+ and "frameHeight" not in s
172
+ ):
173
+ pytest.skip(f"qualityLimitationReason: {s['qualityLimitationReason']}")
174
+
168
175
  assert s["keyFramesEncoded"] > 0
169
176
  assert s["bytesSent"] > 500
170
177
  assert s["packetsSent"] > 10
@@ -172,12 +179,10 @@ def test_simulcast_authz_scale_resolution_to(
172
179
  assert s["frameWidth"] == 640
173
180
  assert s["frameHeight"] == 352
174
181
 
175
- # FIXME:これは libwebrtc 側の挙動を制御できず L1T2 になってしまう
176
182
  scalability_mode = None
177
- # FIXME: scalabilityMode がない場合がある
178
183
  if "scalabilityMode" in s:
184
+ assert s["scalabilityMode"] == "L1T1"
179
185
  scalability_mode = s["scalabilityMode"]
180
- assert s["scalabilityMode"] == "L1T2"
181
186
 
182
187
  # targetBitrate が指定したビットレートの 90% 以上、100% 以下に収まることを確認
183
188
  expected_bitrate = video_bit_rate * 1000
@@ -1,4 +1,5 @@
1
1
  import os
2
+ import platform
2
3
  import sys
3
4
  import time
4
5
  import uuid
@@ -113,6 +114,11 @@ def test_intel_vpl_simulcast(
113
114
  if not is_codec_supported(video_codec_type, SoraVideoCodecImplementation.INTEL_VPL):
114
115
  pytest.skip(f"このチップでは {video_codec_type} のエンコードがサポートされていません")
115
116
 
117
+ if platform.system() == "Windows" and simulcast_count == 1:
118
+ pytest.skip(
119
+ f"Windows では {video_codec_type} の simulcast_count が 1 の場合は失敗するので skip する"
120
+ )
121
+
116
122
  signaling_urls = setup.get("signaling_urls")
117
123
  channel_id_prefix = setup.get("channel_id_prefix")
118
124
  metadata = setup.get("metadata")
@@ -258,12 +258,19 @@ def test_openh264_simulcast(
258
258
 
259
259
  assert s["bytesSent"] > 500
260
260
  assert s["packetsSent"] > 20
261
+
262
+ scalability_mode = None
263
+ if "scalabilityMode" in s:
264
+ assert s["scalabilityMode"] == "L1T1"
265
+ scalability_mode = s["scalabilityMode"]
266
+
261
267
  # targetBitrate が指定したビットレートの 90% 以上、100% 以下に収まることを確認
262
268
  expected_bitrate = video_bit_rate * 1000
263
269
  print(
264
270
  s["rid"],
265
271
  video_codec_type,
266
272
  expected_implementation,
273
+ scalability_mode,
267
274
  expected_bitrate,
268
275
  s["targetBitrate"],
269
276
  s["frameWidth"],
@@ -61,17 +61,16 @@ def test_sendonly_recvonly_audio(setup):
61
61
 
62
62
 
63
63
  @pytest.mark.parametrize(
64
- "video_codec_params",
64
+ "video_codec_type, encoder_implementation, decoder_implementation",
65
65
  [
66
- # video_codec, encoder_implementation, decoder_implementation
67
66
  ("VP8", "libvpx", "libvpx"),
68
67
  ("VP9", "libvpx", "libvpx"),
69
68
  ("AV1", "libaom", "dav1d"),
70
69
  ],
71
70
  )
72
- def test_sendonly_recvonly_video(setup, video_codec_params):
73
- video_codec, encoder_implementation, decoder_implementation = video_codec_params
74
-
71
+ def test_sendonly_recvonly_video(
72
+ setup, video_codec_type, encoder_implementation, decoder_implementation
73
+ ):
75
74
  signaling_urls = setup.get("signaling_urls")
76
75
  channel_id_prefix = setup.get("channel_id_prefix")
77
76
  metadata = setup.get("metadata")
@@ -84,7 +83,7 @@ def test_sendonly_recvonly_video(setup, video_codec_params):
84
83
  channel_id,
85
84
  audio=False,
86
85
  video=True,
87
- video_codec_type=video_codec,
86
+ video_codec_type=video_codec_type,
88
87
  metadata=metadata,
89
88
  )
90
89
  sendonly.connect(fake_video=True)
@@ -107,7 +106,7 @@ def test_sendonly_recvonly_video(setup, video_codec_params):
107
106
 
108
107
  # codec が無かったら StopIteration 例外が上がる
109
108
  sendonly_codec_stats = next(s for s in sendonly_stats if s.get("type") == "codec")
110
- assert sendonly_codec_stats["mimeType"] == f"video/{video_codec}"
109
+ assert sendonly_codec_stats["mimeType"] == f"video/{video_codec_type}"
111
110
 
112
111
  # outbound-rtp が無かったら StopIteration 例外が上がる
113
112
  outbound_rtp_stats = next(s for s in sendonly_stats if s.get("type") == "outbound-rtp")
@@ -117,7 +116,7 @@ def test_sendonly_recvonly_video(setup, video_codec_params):
117
116
 
118
117
  # codec が無かったら StopIteration 例外が上がる
119
118
  recvonly_codec_stats = next(s for s in recvonly_stats if s.get("type") == "codec")
120
- assert recvonly_codec_stats["mimeType"] == f"video/{video_codec}"
119
+ assert recvonly_codec_stats["mimeType"] == f"video/{video_codec_type}"
121
120
 
122
121
  # inbound-rtp が無かったら StopIteration 例外が上がる
123
122
  inbound_rtp_stats = next(s for s in recvonly_stats if s.get("type") == "inbound-rtp")
@@ -80,7 +80,7 @@ def test_simulcast(
80
80
  )
81
81
  sendonly.connect(fake_video=True)
82
82
 
83
- time.sleep(5)
83
+ time.sleep(10)
84
84
 
85
85
  sendonly_stats = sendonly.get_stats()
86
86
 
@@ -111,6 +111,16 @@ def test_simulcast(
111
111
  # simulcast_count が 2 の場合、rid r2 の bytesSent/packetsSent は 0 or 1 になる
112
112
  # simulcast_count が 1 の場合、rid r2 と r1 の bytesSent/packetsSent は 0 or 1 になる
113
113
  if i < simulcast_count:
114
+ assert "qualityLimitationReason" in s
115
+ # qualityLimitationReason が none で無い場合は安定したテストができない
116
+ # さらに frameWidth/frameHeight がない場合は送られてきてすら以内のでテストをスキップしてしまう
117
+ if (
118
+ s["qualityLimitationReason"] != "none"
119
+ and "frameWidth" not in s
120
+ and "frameHeight" not in s
121
+ ):
122
+ pytest.skip(f"qualityLimitationReason: {s['qualityLimitationReason']}")
123
+
114
124
  # 1 本になると simulcastEncodingAdapter がなくなる
115
125
  if simulcast_count > 1:
116
126
  assert "SimulcastEncoderAdapter" in s["encoderImplementation"]
@@ -120,6 +130,9 @@ def test_simulcast(
120
130
  assert s["packetsSent"] > 10
121
131
  # targetBitrate が指定したビットレートの 90% 以上、100% 以下に収まることを確認
122
132
  expected_bitrate = video_bit_rate * 1000
133
+ # 期待値の 20% 以上、100% 以下に収まることを確認
134
+ assert expected_bitrate * 0.2 <= s["targetBitrate"] <= expected_bitrate
135
+
123
136
  print(
124
137
  s["rid"],
125
138
  video_codec_type,
@@ -131,8 +144,6 @@ def test_simulcast(
131
144
  s["bytesSent"],
132
145
  s["packetsSent"],
133
146
  )
134
- # 期待値の 20% 以上、100% 以下に収まることを確認
135
- assert expected_bitrate * 0.2 <= s["targetBitrate"] <= expected_bitrate
136
147
  else:
137
148
  # 本来は 0 なのだが、simulcast_count が 1 の場合、
138
149
  # packetSent が 0 ではなく 1 や 2 になる場合がある
@@ -1,20 +1,14 @@
1
- import os
2
1
  import sys
3
2
  import time
4
3
  import uuid
5
4
 
6
5
  import jwt
7
- import pytest
8
6
  from api import disconnect_connection_api
9
7
  from client import SoraClient, SoraRole
10
8
 
11
9
  from sora_sdk import SoraSignalingErrorCode
12
10
 
13
11
 
14
- @pytest.mark.skipif(
15
- os.getenv("CI") == "true" and sys.platform != "linux",
16
- reason="CI では linux でのみ実行する",
17
- )
18
12
  def test_websocket_signaling_only_disconnect_api(setup):
19
13
  signaling_urls = setup.get("signaling_urls")
20
14
  channel_id_prefix = setup.get("channel_id_prefix")
@@ -88,9 +82,6 @@ def test_websocket_signaling_only_lifetime_expired(setup):
88
82
  assert conn.ws_close_reason == "LIFETIME-EXPIRED"
89
83
 
90
84
 
91
- @pytest.mark.skipif(
92
- os.getenv("CI") == "true" and sys.platform != "linux", reason="linux でのみ実行する"
93
- )
94
85
  def test_websocket_datachannel_signaling_disconnect_api(setup):
95
86
  signaling_urls = setup.get("signaling_urls")
96
87
  channel_id_prefix = setup.get("channel_id_prefix")
@@ -164,9 +155,6 @@ def test_websocket_datachannel_signaling_lifetime_expired(setup):
164
155
  assert conn.ws_close_reason == "LIFETIME-EXPIRED"
165
156
 
166
157
 
167
- @pytest.mark.skipif(
168
- os.getenv("CI") == "true" and sys.platform != "linux", reason="linux でのみ実行する"
169
- )
170
158
  def test_datachannel_only_signaling_disconnect_api(setup):
171
159
  signaling_urls = setup.get("signaling_urls")
172
160
  channel_id_prefix = setup.get("channel_id_prefix")
@@ -1,25 +0,0 @@
1
- import sys
2
- import time
3
- import uuid
4
-
5
- from client import SoraClient, SoraRole
6
-
7
-
8
- def test_memory_leak(setup):
9
- signaling_urls = setup.get("signaling_urls")
10
- channel_id_prefix = setup.get("channel_id_prefix")
11
- metadata = setup.get("metadata")
12
-
13
- channel_id = f"{channel_id_prefix}_{__name__}_{sys._getframe().f_code.co_name}_{uuid.uuid4()}"
14
-
15
- with SoraClient(
16
- signaling_urls,
17
- SoraRole.SENDONLY,
18
- channel_id,
19
- audio=True,
20
- video=True,
21
- metadata=metadata,
22
- ) as sendonly:
23
- time.sleep(5)
24
-
25
- sendonly.disconnect()