Upping start bitrate to min, if set to a lower value i SetSendCodec.
BUG=3276 R=stefan@webrtc.org Review URL: https://webrtc-codereview.appspot.com/21379005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@6014 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
f5433753b8
commit
f223746521
@ -510,6 +510,13 @@ void ViEAutoTest::ViECodecAPITest() {
|
||||
break;
|
||||
}
|
||||
}
|
||||
const unsigned int kMinBitrate = 123;
|
||||
video_codec.minBitrate = kMinBitrate;
|
||||
video_codec.startBitrate = 50;
|
||||
EXPECT_EQ(0, codec->SetSendCodec(video_channel, video_codec));
|
||||
EXPECT_EQ(0, codec->GetSendCodec(video_channel, video_codec));
|
||||
EXPECT_EQ(kMinBitrate, video_codec.startBitrate);
|
||||
|
||||
memset(&video_codec, 0, sizeof(video_codec));
|
||||
EXPECT_EQ(0, codec->GetSendCodec(video_channel, video_codec));
|
||||
EXPECT_EQ(webrtc::kVideoCodecVP8, video_codec.codecType);
|
||||
|
@ -169,6 +169,9 @@ int ViECodecImpl::SetSendCodec(const int video_channel,
|
||||
LOG(LS_INFO) << "New max bitrate set " << video_codec_internal.maxBitrate;
|
||||
}
|
||||
|
||||
if (video_codec_internal.startBitrate < video_codec_internal.minBitrate) {
|
||||
video_codec_internal.startBitrate = video_codec_internal.minBitrate;
|
||||
}
|
||||
if (video_codec_internal.startBitrate > video_codec_internal.maxBitrate) {
|
||||
video_codec_internal.startBitrate = video_codec_internal.maxBitrate;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user