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

Side by Side Diff: webrtc/media/engine/webrtcvoiceengine_unittest.cc

Issue 2774123002: Fix issue with conflicting behavior if setting a max BW with b=AS on both audio and video. (Closed)
Patch Set: Comment addressed Created 3 years, 8 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
« no previous file with comments | « webrtc/media/engine/webrtcvoiceengine.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2008 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2008 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 1515 matching lines...) Expand 10 before | Expand all | Expand 10 after
1526 TEST_F(WebRtcVoiceEngineTestFake, 1526 TEST_F(WebRtcVoiceEngineTestFake,
1527 SetSendCodecsWithoutBitratesUsesCorrectDefaults) { 1527 SetSendCodecsWithoutBitratesUsesCorrectDefaults) {
1528 SetSendCodecsShouldWorkForBitrates("", 0, "", -1, "", -1); 1528 SetSendCodecsShouldWorkForBitrates("", 0, "", -1, "", -1);
1529 } 1529 }
1530 1530
1531 TEST_F(WebRtcVoiceEngineTestFake, SetSendCodecsCapsMinAndStartBitrate) { 1531 TEST_F(WebRtcVoiceEngineTestFake, SetSendCodecsCapsMinAndStartBitrate) {
1532 SetSendCodecsShouldWorkForBitrates("-1", 0, "-100", -1, "", -1); 1532 SetSendCodecsShouldWorkForBitrates("-1", 0, "-100", -1, "", -1);
1533 } 1533 }
1534 1534
1535 TEST_F(WebRtcVoiceEngineTestFake, 1535 TEST_F(WebRtcVoiceEngineTestFake,
1536 SetMaxSendBandwidthShouldPreserveOtherBitrates) { 1536 SetMaxSendBandwidthForAudioDoesntAffectBwe) {
1537 SetSendCodecsShouldWorkForBitrates("100", 100000, "150", 150000, "200", 1537 SetSendCodecsShouldWorkForBitrates("100", 100000, "150", 150000, "200",
1538 200000); 1538 200000);
1539 send_parameters_.max_bandwidth_bps = 300000; 1539 send_parameters_.max_bandwidth_bps = 100000;
1540 SetSendParameters(send_parameters_); 1540 SetSendParameters(send_parameters_);
1541 EXPECT_EQ(100000, call_.GetConfig().bitrate_config.min_bitrate_bps) 1541 EXPECT_EQ(100000, call_.GetConfig().bitrate_config.min_bitrate_bps)
1542 << "Setting max bitrate should keep previous min bitrate."; 1542 << "Setting max bitrate should keep previous min bitrate.";
1543 EXPECT_EQ(-1, call_.GetConfig().bitrate_config.start_bitrate_bps) 1543 EXPECT_EQ(-1, call_.GetConfig().bitrate_config.start_bitrate_bps)
1544 << "Setting max bitrate should not reset start bitrate."; 1544 << "Setting max bitrate should not reset start bitrate.";
1545 EXPECT_EQ(300000, call_.GetConfig().bitrate_config.max_bitrate_bps); 1545 EXPECT_EQ(200000, call_.GetConfig().bitrate_config.max_bitrate_bps);
1546 } 1546 }
1547 1547
1548 // Test that we can enable NACK with opus as caller. 1548 // Test that we can enable NACK with opus as caller.
1549 TEST_F(WebRtcVoiceEngineTestFake, SetSendCodecEnableNackAsCaller) { 1549 TEST_F(WebRtcVoiceEngineTestFake, SetSendCodecEnableNackAsCaller) {
1550 EXPECT_TRUE(SetupSendStream()); 1550 EXPECT_TRUE(SetupSendStream());
1551 cricket::AudioSendParameters parameters; 1551 cricket::AudioSendParameters parameters;
1552 parameters.codecs.push_back(kOpusCodec); 1552 parameters.codecs.push_back(kOpusCodec);
1553 parameters.codecs[0].AddFeedbackParam( 1553 parameters.codecs[0].AddFeedbackParam(
1554 cricket::FeedbackParam(cricket::kRtcpFbParamNack, 1554 cricket::FeedbackParam(cricket::kRtcpFbParamNack,
1555 cricket::kParamValueEmpty)); 1555 cricket::kParamValueEmpty));
(...skipping 2280 matching lines...) Expand 10 before | Expand all | Expand 10 after
3836 // Without this cast, the comparison turned unsigned and, thus, failed for -1. 3836 // Without this cast, the comparison turned unsigned and, thus, failed for -1.
3837 const int num_specs = static_cast<int>(specs.size()); 3837 const int num_specs = static_cast<int>(specs.size());
3838 EXPECT_GE(find_codec({"cn", 8000, 1}), num_specs); 3838 EXPECT_GE(find_codec({"cn", 8000, 1}), num_specs);
3839 EXPECT_GE(find_codec({"cn", 16000, 1}), num_specs); 3839 EXPECT_GE(find_codec({"cn", 16000, 1}), num_specs);
3840 EXPECT_EQ(find_codec({"cn", 32000, 1}), -1); 3840 EXPECT_EQ(find_codec({"cn", 32000, 1}), -1);
3841 EXPECT_GE(find_codec({"telephone-event", 8000, 1}), num_specs); 3841 EXPECT_GE(find_codec({"telephone-event", 8000, 1}), num_specs);
3842 EXPECT_GE(find_codec({"telephone-event", 16000, 1}), num_specs); 3842 EXPECT_GE(find_codec({"telephone-event", 16000, 1}), num_specs);
3843 EXPECT_GE(find_codec({"telephone-event", 32000, 1}), num_specs); 3843 EXPECT_GE(find_codec({"telephone-event", 32000, 1}), num_specs);
3844 EXPECT_GE(find_codec({"telephone-event", 48000, 1}), num_specs); 3844 EXPECT_GE(find_codec({"telephone-event", 48000, 1}), num_specs);
3845 } 3845 }
OLDNEW
« no previous file with comments | « webrtc/media/engine/webrtcvoiceengine.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698