Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

transport-wide-cc-extensions-01 の出力に合わせてテストを変更する #119

Merged
merged 8 commits into from
Dec 30, 2024
8 changes: 8 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,14 @@
- @voluntas
- [ADD] examples に E2E テストを追加する
- @voluntas
- [FIX] トランスポートワイド輻輳制御を有効時の出力に合わせてサイマルキャストの E2E テストを変更する
- Sora のトランスポートワイド輻輳制御を有効にしたことで、サイマルキャストの WebRTC Stats の outbound-rtp -> encoderImplementation の出力内容が変わったため、テストの期待結果を修正する
- Sora のトランスポートワイド輻輳制御は有効であることを前提とした修正
- サイマルキャストの encoderImplementation の結果を以下の通り
- "SimulcastEncoderAdapter (libaom, libaom, libaom)" -> "SimulcastEncoderAdapter (libaom)"
- "SimulcastEncoderAdapter (libvpx, libvpx, libvpx)" -> "SimulcastEncoderAdapter (libvpx)"
- "SimulcastEncoderAdapter (OpenH264, OpenH264, OpenH264)" -> "SimulcastEncoderAdapter (OpenH264)"
- "SimulcastEncoderAdapter (VideoToolbox, VideoToolbox, VideoToolbox)" -> "SimulcastEncoderAdapter (VideoToolbox)"

## 2024.3.0

Expand Down
9 changes: 5 additions & 4 deletions tests/test_macos.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ def test_macos_video_hwa_sendonly(setup, video_codec_type):
@pytest.mark.parametrize(
("video_codec_type", "expected_implementation"),
[
("H264", "SimulcastEncoderAdapter (VideoToolbox, VideoToolbox, VideoToolbox)"),
("H265", "SimulcastEncoderAdapter (VideoToolbox, VideoToolbox, VideoToolbox)"),
("H264", "VideoToolbox"),
("H265", "VideoToolbox"),
],
)
def test_macos_simulcast(setup, video_codec_type, expected_implementation):
Expand All @@ -89,7 +89,7 @@ def test_macos_simulcast(setup, video_codec_type, expected_implementation):
)
sendonly.connect(fake_video=True)

time.sleep(5)
time.sleep(10)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

すみません、これ 5 に戻して貰えれば。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

09d1d5b で対応しました


sendonly_stats = sendonly.get_stats()

Expand All @@ -115,7 +115,8 @@ def test_macos_simulcast(setup, video_codec_type, expected_implementation):

for i, rtp_stat in enumerate(sorted_stats):
assert rtp_stat["rid"] == f"r{i}"
assert rtp_stat["encoderImplementation"] == expected_implementation
assert "SimulcastEncoderAdapter" in rtp_stat["encoderImplementation"]
assert expected_implementation in rtp_stat["encoderImplementation"]
assert rtp_stat["bytesSent"] > 0
assert rtp_stat["packetsSent"] > 0

Expand Down
7 changes: 4 additions & 3 deletions tests/test_openh264.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def test_openh264_sendonly_recvonly(setup):
@pytest.mark.parametrize(
"video_codec_type,expected_implementation",
[
("H264", "SimulcastEncoderAdapter (OpenH264, OpenH264, OpenH264)"),
("H264", "OpenH264"),
],
)
def test_openh264_simulcast(setup, video_codec_type, expected_implementation):
Expand Down Expand Up @@ -101,7 +101,7 @@ def test_openh264_simulcast(setup, video_codec_type, expected_implementation):
)
sendonly.connect(fake_video=True)

time.sleep(5)
time.sleep(10)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

こちらも 5 に戻して貰えれば。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

09d1d5b で対応しました


sendonly_stats = sendonly.get_stats()

Expand All @@ -122,6 +122,7 @@ def test_openh264_simulcast(setup, video_codec_type, expected_implementation):

for i, rtp_stat in enumerate(sorted_stats):
assert rtp_stat["rid"] == f"r{i}"
assert rtp_stat["encoderImplementation"] == expected_implementation
assert "SimulcastEncoderAdapter" in rtp_stat["encoderImplementation"]
assert expected_implementation in rtp_stat["encoderImplementation"]
assert rtp_stat["bytesSent"] > 0
assert rtp_stat["packetsSent"] > 0
10 changes: 5 additions & 5 deletions tests/test_simulcast.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
@pytest.mark.parametrize(
("video_codec_type", "expected_implementation"),
[
("VP8", "SimulcastEncoderAdapter (libvpx, libvpx, libvpx)"),
("VP9", "SimulcastEncoderAdapter (libvpx, libvpx, libvpx)"),
("AV1", "SimulcastEncoderAdapter (libaom, libaom, libaom)"),
("VP8", "libvpx"),
("VP9", "libvpx"),
("AV1", "libaom"),
],
)
def test_simulcast(setup, video_codec_type, expected_implementation):
Expand Down Expand Up @@ -62,7 +62,7 @@ def test_simulcast(setup, video_codec_type, expected_implementation):

for i, rtp_stat in enumerate(sorted_stats):
assert rtp_stat["rid"] == f"r{i}"
assert rtp_stat["encoderImplementation"] == expected_implementation
assert "SimulcastEncoderAdapter" in rtp_stat["encoderImplementation"]
assert expected_implementation in rtp_stat["encoderImplementation"]
assert rtp_stat["bytesSent"] > 0
assert rtp_stat["packetsSent"] > 0

Loading