Change minimum video encoder initialization resolution to

176x144 to ensure HW encoder can be initialized.

R=pthatcher@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7787 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
glaznev@webrtc.org 2014-12-02 23:41:18 +00:00
parent 1751ee7d32
commit d01955179a
2 changed files with 7 additions and 7 deletions

View File

@ -3881,13 +3881,13 @@ bool WebRtcVideoMediaChannel::SetSendParams(
CapturedFrameInfo frame; CapturedFrameInfo frame;
if (!send_channel->last_captured_frame_info().Get(&frame)) { if (!send_channel->last_captured_frame_info().Get(&frame)) {
// When we don't have a frame yet, configure the encoder with a // When we don't have a frame yet, configure the encoder with a
// 2x2 frame (the smallest possible I420 frame). This gives us // QCIF (176x144) frame (to ensure HW encoder can be initialized).
// low memory usage but also makes it so configuration errors are // This gives us low memory usage but also makes it so configuration
// discovered at the time we apply the settings rather than when // errors are discovered at the time we apply the settings rather than
// we get the first frame (waiting for the first frame to know // when we get the first frame (waiting for the first frame to know
// that you gave a bad codec parameter could make debugging hard). // that you gave a bad codec parameter could make debugging hard).
frame.width = 2; frame.width = 176;
frame.height = 2; frame.height = 144;
// TODO(pthatcher): Evaluate the risk of not setting up an encoder // TODO(pthatcher): Evaluate the risk of not setting up an encoder
// at all until we have a frame. Once we feel it's worth the // at all until we have a frame. Once we feel it's worth the

View File

@ -385,7 +385,7 @@ TEST_F(WebRtcVideoEngineTestFake, SetSendCodecsBeforeFrameRegistersTinyFormat) {
int channel_num = vie_.GetLastChannel(); int channel_num = vie_.GetLastChannel();
std::vector<cricket::VideoCodec> codecs(engine_.codecs()); std::vector<cricket::VideoCodec> codecs(engine_.codecs());
EXPECT_TRUE(channel_->SetSendCodecs(codecs)); EXPECT_TRUE(channel_->SetSendCodecs(codecs));
VerifyVP8SendCodec(channel_num, 2, 2); VerifyVP8SendCodec(channel_num, 176, 144);
} }
// Test that ViE Channel doesn't call SetSendCodec again if same codec is tried // Test that ViE Channel doesn't call SetSendCodec again if same codec is tried