Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(396)

Side by Side Diff: talk/media/webrtc/webrtcvideoengine2_unittest.cc

Issue 1291763003: Don't do reconfiguration if recv codec order/preference changes (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: missed a line Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2004 Google Inc. 3 * Copyright 2004 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 2165 matching lines...) Expand 10 before | Expand all | Expand 10 after
2176 2176
2177 TEST_F(WebRtcVideoChannel2Test, 2177 TEST_F(WebRtcVideoChannel2Test,
2178 SetRecvCodecsAcceptSameCodecOnMultiplePayloadTypes) { 2178 SetRecvCodecsAcceptSameCodecOnMultiplePayloadTypes) {
2179 std::vector<VideoCodec> codecs; 2179 std::vector<VideoCodec> codecs;
2180 codecs.push_back(kVp8Codec); 2180 codecs.push_back(kVp8Codec);
2181 codecs.push_back(kVp8Codec); 2181 codecs.push_back(kVp8Codec);
2182 codecs[1].id += 1; 2182 codecs[1].id += 1;
2183 EXPECT_TRUE(channel_->SetRecvCodecs(codecs)); 2183 EXPECT_TRUE(channel_->SetRecvCodecs(codecs));
2184 } 2184 }
2185 2185
2186 // Test that setting the same codecs but with a different order and preference
2187 // doesn't result in the stream being recreated.
2188 TEST_F(WebRtcVideoChannel2Test,
2189 SetRecvCodecsDifferentOrderAndPreferenceDoesntRecreateStream) {
2190 std::vector<VideoCodec> codecs1;
2191 codecs1.push_back(kVp8Codec);
2192 codecs1.push_back(kRedCodec);
2193 EXPECT_TRUE(channel_->SetRecvCodecs(codecs1));
2194
2195 AddRecvStream(cricket::StreamParams::CreateLegacy(123));
2196 EXPECT_EQ(1, fake_call_->GetNumCreatedReceiveStreams());
2197
2198 std::vector<VideoCodec> codecs2;
2199 codecs2.push_back(kRedCodec);
2200 codecs2.push_back(kVp8Codec);
2201 codecs2[1].preference += 1;
2202 EXPECT_TRUE(channel_->SetRecvCodecs(codecs2));
2203 EXPECT_EQ(1, fake_call_->GetNumCreatedReceiveStreams());
2204 }
2205
2186 TEST_F(WebRtcVideoChannel2Test, SendStreamNotSendingByDefault) { 2206 TEST_F(WebRtcVideoChannel2Test, SendStreamNotSendingByDefault) {
2187 EXPECT_FALSE(AddSendStream()->IsSending()); 2207 EXPECT_FALSE(AddSendStream()->IsSending());
2188 } 2208 }
2189 2209
2190 TEST_F(WebRtcVideoChannel2Test, ReceiveStreamReceivingByDefault) { 2210 TEST_F(WebRtcVideoChannel2Test, ReceiveStreamReceivingByDefault) {
2191 EXPECT_TRUE(AddRecvStream()->IsReceiving()); 2211 EXPECT_TRUE(AddRecvStream()->IsReceiving());
2192 } 2212 }
2193 2213
2194 TEST_F(WebRtcVideoChannel2Test, SetSend) { 2214 TEST_F(WebRtcVideoChannel2Test, SetSend) {
2195 FakeVideoSendStream* stream = AddSendStream(); 2215 FakeVideoSendStream* stream = AddSendStream();
(...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after
3122 // Ensures that the correct settings are applied to the codec when two temporal 3142 // Ensures that the correct settings are applied to the codec when two temporal
3123 // layer screencasting is enabled, and that the correct simulcast settings are 3143 // layer screencasting is enabled, and that the correct simulcast settings are
3124 // reapplied when disabling screencasting. 3144 // reapplied when disabling screencasting.
3125 TEST_F(WebRtcVideoChannel2SimulcastTest, 3145 TEST_F(WebRtcVideoChannel2SimulcastTest,
3126 DISABLED_TwoTemporalLayerScreencastSettings) { 3146 DISABLED_TwoTemporalLayerScreencastSettings) {
3127 // TODO(pbos): Implement. 3147 // TODO(pbos): Implement.
3128 FAIL() << "Not implemented."; 3148 FAIL() << "Not implemented.";
3129 } 3149 }
3130 3150
3131 } // namespace cricket 3151 } // namespace cricket
OLDNEW
« talk/media/webrtc/webrtcvideoengine2.cc ('K') | « talk/media/webrtc/webrtcvideoengine2.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698