Index: webrtc/media/engine/webrtcvideoengine2_unittest.cc |
diff --git a/webrtc/media/engine/webrtcvideoengine2_unittest.cc b/webrtc/media/engine/webrtcvideoengine2_unittest.cc |
index bf5537f161b18205733dde682783a60d568b2755..6b768028ad869c6265392a8cc66241743fc7a240 100644 |
--- a/webrtc/media/engine/webrtcvideoengine2_unittest.cc |
+++ b/webrtc/media/engine/webrtcvideoengine2_unittest.cc |
@@ -1078,8 +1078,7 @@ class WebRtcVideoChannel2Test : public WebRtcVideoEngine2Test { |
int expected_min_bitrate_bps, |
const char* start_bitrate_kbps, |
int expected_start_bitrate_bps, |
- const char* max_bitrate_kbps, |
- int expected_max_bitrate_bps) { |
+ const char* max_bitrate_kbps) { |
auto& codecs = send_parameters_.codecs; |
codecs.clear(); |
codecs.push_back(GetEngineCodec("VP8")); |
@@ -1092,8 +1091,8 @@ class WebRtcVideoChannel2Test : public WebRtcVideoEngine2Test { |
fake_call_->GetConfig().bitrate_config.min_bitrate_bps); |
EXPECT_EQ(expected_start_bitrate_bps, |
fake_call_->GetConfig().bitrate_config.start_bitrate_bps); |
- EXPECT_EQ(expected_max_bitrate_bps, |
- fake_call_->GetConfig().bitrate_config.max_bitrate_bps); |
+ // TODO(pbos): Consider checking stream bitrates. Codec bitrate does |
+ // intentionally not affect global max bitrate. |
} |
void TestSetSendRtpHeaderExtensions(const std::string& ext_uri) { |
@@ -2647,12 +2646,11 @@ TEST_F(WebRtcVideoChannel2Test, SetSendCodecsChangesExistingStreams) { |
} |
TEST_F(WebRtcVideoChannel2Test, SetSendCodecsWithBitrates) { |
- SetSendCodecsShouldWorkForBitrates("100", 100000, "150", 150000, "200", |
- 200000); |
+ SetSendCodecsShouldWorkForBitrates("100", 100000, "150", 150000, "200"); |
} |
TEST_F(WebRtcVideoChannel2Test, SetSendCodecsWithHighMaxBitrate) { |
- SetSendCodecsShouldWorkForBitrates("", 0, "", -1, "10000", 10000000); |
+ SetSendCodecsShouldWorkForBitrates("", 0, "", -1, "10000"); |
std::vector<webrtc::VideoStream> streams = AddSendStream()->GetVideoStreams(); |
ASSERT_EQ(1u, streams.size()); |
EXPECT_EQ(10000000, streams[0].max_bitrate_bps); |
@@ -2660,12 +2658,11 @@ TEST_F(WebRtcVideoChannel2Test, SetSendCodecsWithHighMaxBitrate) { |
TEST_F(WebRtcVideoChannel2Test, |
SetSendCodecsWithoutBitratesUsesCorrectDefaults) { |
- SetSendCodecsShouldWorkForBitrates( |
- "", 0, "", -1, "", -1); |
+ SetSendCodecsShouldWorkForBitrates("", 0, "", -1, ""); |
} |
TEST_F(WebRtcVideoChannel2Test, SetSendCodecsCapsMinAndStartBitrate) { |
- SetSendCodecsShouldWorkForBitrates("-1", 0, "-100", -1, "", -1); |
+ SetSendCodecsShouldWorkForBitrates("-1", 0, "-100", -1, ""); |
} |
TEST_F(WebRtcVideoChannel2Test, SetSendCodecsRejectsMaxLessThanMinBitrate) { |
@@ -2713,8 +2710,7 @@ TEST_F(WebRtcVideoChannel2Test, SetSendCodecsWithBitratesAndMaxSendBandwidth) { |
TEST_F(WebRtcVideoChannel2Test, |
SetMaxSendBandwidthShouldPreserveOtherBitrates) { |
- SetSendCodecsShouldWorkForBitrates("100", 100000, "150", 150000, "200", |
- 200000); |
+ SetSendCodecsShouldWorkForBitrates("100", 100000, "150", 150000, "200"); |
send_parameters_.max_bandwidth_bps = 300000; |
EXPECT_TRUE(channel_->SetSendParameters(send_parameters_)); |
EXPECT_EQ(100000, fake_call_->GetConfig().bitrate_config.min_bitrate_bps) |
@@ -2728,8 +2724,8 @@ TEST_F(WebRtcVideoChannel2Test, SetMaxSendBandwidthShouldBeRemovable) { |
send_parameters_.max_bandwidth_bps = 300000; |
EXPECT_TRUE(channel_->SetSendParameters(send_parameters_)); |
EXPECT_EQ(300000, fake_call_->GetConfig().bitrate_config.max_bitrate_bps); |
- // <= 0 means disable (infinite) max bitrate. |
- send_parameters_.max_bandwidth_bps = 0; |
+ // -1 means disable (infinite) max bitrate. |
+ send_parameters_.max_bandwidth_bps = -1; |
EXPECT_TRUE(channel_->SetSendParameters(send_parameters_)); |
EXPECT_EQ(-1, fake_call_->GetConfig().bitrate_config.max_bitrate_bps) |
<< "Setting zero max bitrate did not reset start bitrate."; |
@@ -3867,8 +3863,7 @@ TEST_F(WebRtcVideoChannel2Test, CanSentMaxBitrateForExistingStream) { |
// - Audio: max_bandwidth_bps = 0 - fail the operation, |
// max_bandwidth_bps = -1 - remove the bandwidth limit |
// - Video: max_bandwidth_bps = 0 - remove the bandwidth limit, |
- // max_bandwidth_bps = -1 - do not change the previously set |
- // limit. |
+ // max_bandwidth_bps = -1 - remove the bandwidth limit |
Taylor Brandstetter
2017/03/09 23:48:38
Hey, one inconsistency fixed. :)
|
SetAndExpectMaxBitrate(1000, 0, 1000); |
SetAndExpectMaxBitrate(1000, 800, 800); |