Permit single-stream max bitrates above 2000k.

BUG=4463
TBR=stefan@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/49509004

Cr-Commit-Position: refs/heads/master@{#8839}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8839 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
pbos@webrtc.org 2015-03-23 22:29:39 +00:00
parent a197a5eed6
commit a5f6fb53ba
2 changed files with 14 additions and 1 deletions

View File

@ -246,7 +246,13 @@ WebRtcVideoChannel2::WebRtcVideoSendStream::CreateVideoStreams(
codec.framerate != 0 ? codec.framerate : kDefaultVideoMaxFramerate;
stream.min_bitrate_bps = kMinVideoBitrate * 1000;
stream.target_bitrate_bps = stream.max_bitrate_bps = kMaxVideoBitrate * 1000;
int max_bitrate_kbps;
if (!codec.GetParam(kCodecParamMaxBitrate, &max_bitrate_kbps) ||
max_bitrate_kbps < kMaxVideoBitrate) {
max_bitrate_kbps = kMaxVideoBitrate;
}
stream.target_bitrate_bps = stream.max_bitrate_bps = max_bitrate_kbps * 1000;
int max_qp = kDefaultQpMax;
codec.GetParam(kCodecParamMaxQuantization, &max_qp);

View File

@ -1829,6 +1829,13 @@ TEST_F(WebRtcVideoChannel2Test, SetSendCodecsWithBitrates) {
200000);
}
TEST_F(WebRtcVideoChannel2Test, SetSendCodecsWithHighMaxBitrate) {
SetSendCodecsShouldWorkForBitrates("", 0, "", -1, "10000", 10000000);
std::vector<webrtc::VideoStream> streams = AddSendStream()->GetVideoStreams();
ASSERT_EQ(1u, streams.size());
EXPECT_EQ(10000000, streams[0].max_bitrate_bps);
}
TEST_F(WebRtcVideoChannel2Test,
SetSendCodecsWithoutBitratesUsesCorrectDefaults) {
SetSendCodecsShouldWorkForBitrates(