aboutsummaryrefslogtreecommitdiff
path: root/pc/channel_manager_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'pc/channel_manager_unittest.cc')
-rw-r--r--pc/channel_manager_unittest.cc27
1 files changed, 9 insertions, 18 deletions
diff --git a/pc/channel_manager_unittest.cc b/pc/channel_manager_unittest.cc
index 6f3128ebde..90785131f9 100644
--- a/pc/channel_manager_unittest.cc
+++ b/pc/channel_manager_unittest.cc
@@ -142,29 +142,22 @@ TEST_F(ChannelManagerTest, StartupShutdownOnThread) {
}
TEST_F(ChannelManagerTest, SetVideoRtxEnabled) {
- std::vector<VideoCodec> send_codecs;
- std::vector<VideoCodec> recv_codecs;
+ std::vector<VideoCodec> codecs;
const VideoCodec rtx_codec(96, "rtx");
// By default RTX is disabled.
- cm_->GetSupportedVideoSendCodecs(&send_codecs);
- EXPECT_FALSE(ContainsMatchingCodec(send_codecs, rtx_codec));
- cm_->GetSupportedVideoSendCodecs(&recv_codecs);
- EXPECT_FALSE(ContainsMatchingCodec(recv_codecs, rtx_codec));
+ cm_->GetSupportedVideoCodecs(&codecs);
+ EXPECT_FALSE(ContainsMatchingCodec(codecs, rtx_codec));
// Enable and check.
EXPECT_TRUE(cm_->SetVideoRtxEnabled(true));
- cm_->GetSupportedVideoSendCodecs(&send_codecs);
- EXPECT_TRUE(ContainsMatchingCodec(send_codecs, rtx_codec));
- cm_->GetSupportedVideoSendCodecs(&recv_codecs);
- EXPECT_TRUE(ContainsMatchingCodec(recv_codecs, rtx_codec));
+ cm_->GetSupportedVideoCodecs(&codecs);
+ EXPECT_TRUE(ContainsMatchingCodec(codecs, rtx_codec));
// Disable and check.
EXPECT_TRUE(cm_->SetVideoRtxEnabled(false));
- cm_->GetSupportedVideoSendCodecs(&send_codecs);
- EXPECT_FALSE(ContainsMatchingCodec(send_codecs, rtx_codec));
- cm_->GetSupportedVideoSendCodecs(&recv_codecs);
- EXPECT_FALSE(ContainsMatchingCodec(recv_codecs, rtx_codec));
+ cm_->GetSupportedVideoCodecs(&codecs);
+ EXPECT_FALSE(ContainsMatchingCodec(codecs, rtx_codec));
// Cannot toggle rtx after initialization.
EXPECT_TRUE(cm_->Init());
@@ -174,10 +167,8 @@ TEST_F(ChannelManagerTest, SetVideoRtxEnabled) {
// Can set again after terminate.
cm_->Terminate();
EXPECT_TRUE(cm_->SetVideoRtxEnabled(true));
- cm_->GetSupportedVideoSendCodecs(&send_codecs);
- EXPECT_TRUE(ContainsMatchingCodec(send_codecs, rtx_codec));
- cm_->GetSupportedVideoSendCodecs(&recv_codecs);
- EXPECT_TRUE(ContainsMatchingCodec(recv_codecs, rtx_codec));
+ cm_->GetSupportedVideoCodecs(&codecs);
+ EXPECT_TRUE(ContainsMatchingCodec(codecs, rtx_codec));
}
TEST_F(ChannelManagerTest, CreateDestroyChannels) {