diff --git a/test/pc/e2e/BUILD.gn b/test/pc/e2e/BUILD.gn index 163e274f59..1b0e738596 100644 --- a/test/pc/e2e/BUILD.gn +++ b/test/pc/e2e/BUILD.gn @@ -490,6 +490,9 @@ if (!build_with_chromium) { "../../../test:test_support", ] data = peer_connection_e2e_smoke_test_resources + if (is_mac || is_ios) { + deps += [ "../../../modules/video_coding:objc_codec_factory_helper" ] + } if (is_ios) { deps += [ ":peer_connection_e2e_smoke_test_resources_bundle_data" ] } diff --git a/test/pc/e2e/peer_connection_e2e_smoke_test.cc b/test/pc/e2e/peer_connection_e2e_smoke_test.cc index f861d88a8e..09c40a6d75 100644 --- a/test/pc/e2e/peer_connection_e2e_smoke_test.cc +++ b/test/pc/e2e/peer_connection_e2e_smoke_test.cc @@ -27,6 +27,10 @@ #include "test/pc/e2e/stats_based_network_quality_metrics_reporter.h" #include "test/testsupport/file_utils.h" +#if defined(WEBRTC_MAC) || defined(WEBRTC_IOS) +#include "modules/video_coding/codecs/test/objc_codec_factory_helper.h" // nogncheck +#endif + namespace webrtc { namespace webrtc_pc_e2e { namespace { @@ -183,6 +187,59 @@ TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Smoke) { RunAndCheckEachVideoStreamReceivedFrames(run_params); } +#if defined(WEBRTC_MAC) || defined(WEBRTC_IOS) +TEST_F(PeerConnectionE2EQualityTestSmokeTest, SmokeH264) { + std::pair + network_links = CreateNetwork(); + + AddPeer(network_links.first, [](PeerConfigurer* alice) { + VideoConfig video(160, 120, 15); + video.stream_label = "alice-video"; + video.sync_group = "alice-media"; + alice->AddVideoConfig(std::move(video)); + + AudioConfig audio; + audio.stream_label = "alice-audio"; + audio.mode = AudioConfig::Mode::kFile; + audio.input_file_name = + test::ResourcePath("pc_quality_smoke_test_alice_source", "wav"); + audio.sampling_frequency_in_hz = 48000; + audio.sync_group = "alice-media"; + alice->SetAudioConfig(std::move(audio)); + alice->SetVideoCodecs({VideoCodecConfig(cricket::kH264CodecName)}); + alice->SetVideoEncoderFactory(webrtc::test::CreateObjCEncoderFactory()); + alice->SetVideoDecoderFactory(webrtc::test::CreateObjCDecoderFactory()); + }); + AddPeer(network_links.second, [](PeerConfigurer* charlie) { + charlie->SetName("charlie"); + VideoConfig video(160, 120, 15); + video.stream_label = "charlie-video"; + video.temporal_layers_count = 2; + charlie->AddVideoConfig(std::move(video)); + + AudioConfig audio; + audio.stream_label = "charlie-audio"; + audio.mode = AudioConfig::Mode::kFile; + audio.input_file_name = + test::ResourcePath("pc_quality_smoke_test_bob_source", "wav"); + charlie->SetAudioConfig(std::move(audio)); + charlie->SetVideoCodecs({VideoCodecConfig(cricket::kH264CodecName)}); + charlie->SetVideoEncoderFactory(webrtc::test::CreateObjCEncoderFactory()); + charlie->SetVideoDecoderFactory(webrtc::test::CreateObjCDecoderFactory()); + }); + + fixture()->AddQualityMetricsReporter( + std::make_unique( + std::map>( + {{"alice", network_links.first->endpoints()}, + {"charlie", network_links.second->endpoints()}}), + network_emulation())); + RunParams run_params(TimeDelta::Seconds(2)); + run_params.enable_flex_fec_support = true; + RunAndCheckEachVideoStreamReceivedFrames(run_params); +} +#endif + // IOS debug builds can be quite slow, disabling to avoid issues with timeouts. #if defined(WEBRTC_IOS) && defined(WEBRTC_ARCH_ARM64) && !defined(NDEBUG) #define MAYBE_ChangeNetworkConditions DISABLED_ChangeNetworkConditions