Add legacy SVC test that all layers can be inactivated.
A larger version of this test was previously landed but got reverted due to failures only happening on the importer bot (not on the CQ or locally). This is a smaller version of the test that does something we should support: being able to inactive all encodings of a VP9 legacy SVC stream. Let's land and see if any issues are reproducible (expecting revert). Bug: webrtc:15033 Change-Id: I88da1facf4ef05299f3392b86a0e3df029ebe264 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299006 Commit-Queue: Henrik Boström <hbos@webrtc.org> Reviewed-by: Evan Shrubsole <eshr@webrtc.org> Cr-Commit-Position: refs/heads/main@{#39684}
This commit is contained in:
parent
7bb9322e9e
commit
cac9a55ddf
@ -1557,6 +1557,43 @@ TEST_F(PeerConnectionSimulcastWithMediaFlowTests,
|
||||
EXPECT_FALSE(parameters.encodings[2].scalability_mode.has_value());
|
||||
}
|
||||
|
||||
TEST_F(PeerConnectionSimulcastWithMediaFlowTests,
|
||||
SendingThreeEncodings_VP9_LegacySVC_AllLayersInactive) {
|
||||
rtc::scoped_refptr<PeerConnectionTestWrapper> local_pc_wrapper = CreatePc();
|
||||
rtc::scoped_refptr<PeerConnectionTestWrapper> remote_pc_wrapper = CreatePc();
|
||||
ExchangeIceCandidates(local_pc_wrapper, remote_pc_wrapper);
|
||||
|
||||
std::vector<SimulcastLayer> layers =
|
||||
CreateLayers({"f", "h", "q"}, /*active=*/true);
|
||||
rtc::scoped_refptr<RtpTransceiverInterface> transceiver =
|
||||
AddTransceiverWithSimulcastLayers(local_pc_wrapper, remote_pc_wrapper,
|
||||
layers);
|
||||
std::vector<RtpCodecCapability> codecs =
|
||||
GetCapabilitiesAndRestrictToCodec(local_pc_wrapper, "VP9");
|
||||
transceiver->SetCodecPreferences(codecs);
|
||||
|
||||
// Legacy SVC mode and all layers inactive.
|
||||
rtc::scoped_refptr<RtpSenderInterface> sender = transceiver->sender();
|
||||
RtpParameters parameters = sender->GetParameters();
|
||||
ASSERT_EQ(parameters.encodings.size(), 3u);
|
||||
parameters.encodings[0].active = false;
|
||||
parameters.encodings[1].active = false;
|
||||
parameters.encodings[2].active = false;
|
||||
sender->SetParameters(parameters);
|
||||
|
||||
NegotiateWithSimulcastTweaks(local_pc_wrapper, remote_pc_wrapper, layers);
|
||||
local_pc_wrapper->WaitForConnection();
|
||||
remote_pc_wrapper->WaitForConnection();
|
||||
|
||||
// Ensure no media is flowing (1 second should be enough).
|
||||
rtc::Thread::Current()->SleepMs(1000);
|
||||
rtc::scoped_refptr<const RTCStatsReport> report = GetStats(local_pc_wrapper);
|
||||
std::vector<const RTCOutboundRtpStreamStats*> outbound_rtps =
|
||||
report->GetStatsOfType<RTCOutboundRtpStreamStats>();
|
||||
ASSERT_THAT(outbound_rtps, SizeIs(1u));
|
||||
EXPECT_EQ(*outbound_rtps[0]->bytes_sent, 0u);
|
||||
}
|
||||
|
||||
TEST_F(PeerConnectionSimulcastWithMediaFlowTests,
|
||||
SendingThreeEncodings_VP9_StandardL1T3_AllLayersInactive) {
|
||||
rtc::scoped_refptr<PeerConnectionTestWrapper> local_pc_wrapper = CreatePc();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user