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

Side by Side Diff: webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter_unittest.cc

Issue 1369923005: Remove kSkipFrame usage. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: bogus default return value for ConvertFrameType Created 5 years, 2 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 SetupCodec(); 344 SetupCodec();
345 const uint32_t packetLoss = 5; 345 const uint32_t packetLoss = 5;
346 const int64_t rtt = 30; 346 const int64_t rtt = 30;
347 helper_->ExpectCallSetChannelParameters(packetLoss, rtt); 347 helper_->ExpectCallSetChannelParameters(packetLoss, rtt);
348 adapter_->SetChannelParameters(packetLoss, rtt); 348 adapter_->SetChannelParameters(packetLoss, rtt);
349 } 349 }
350 350
351 TEST_F(TestSimulcastEncoderAdapterFake, EncodedCallbackForDifferentEncoders) { 351 TEST_F(TestSimulcastEncoderAdapterFake, EncodedCallbackForDifferentEncoders) {
352 SetupCodec(); 352 SetupCodec();
353 353
354 // Set bitrates so that we send all layers.
355 adapter_->SetRates(1200, 30);
356
354 // At this point, the simulcast encoder adapter should have 3 streams: HD, 357 // At this point, the simulcast encoder adapter should have 3 streams: HD,
355 // quarter HD, and quarter quarter HD. We're going to mostly ignore the exact 358 // quarter HD, and quarter quarter HD. We're going to mostly ignore the exact
356 // resolutions, to test that the adapter forwards on the correct resolution 359 // resolutions, to test that the adapter forwards on the correct resolution
357 // and simulcast index values, going only off the encoder that generates the 360 // and simulcast index values, going only off the encoder that generates the
358 // image. 361 // image.
359 EXPECT_EQ(3u, helper_->factory()->encoders().size()); 362 EXPECT_EQ(3u, helper_->factory()->encoders().size());
360 helper_->factory()->encoders()[0]->SendEncodedImage(1152, 704); 363 helper_->factory()->encoders()[0]->SendEncodedImage(1152, 704);
361 int width; 364 int width;
362 int height; 365 int height;
363 int simulcast_index; 366 int simulcast_index;
(...skipping 10 matching lines...) Expand all
374 377
375 helper_->factory()->encoders()[2]->SendEncodedImage(120, 240); 378 helper_->factory()->encoders()[2]->SendEncodedImage(120, 240);
376 EXPECT_TRUE(GetLastEncodedImageInfo(&width, &height, &simulcast_index)); 379 EXPECT_TRUE(GetLastEncodedImageInfo(&width, &height, &simulcast_index));
377 EXPECT_EQ(120, width); 380 EXPECT_EQ(120, width);
378 EXPECT_EQ(240, height); 381 EXPECT_EQ(240, height);
379 EXPECT_EQ(2, simulcast_index); 382 EXPECT_EQ(2, simulcast_index);
380 } 383 }
381 384
382 } // namespace testing 385 } // namespace testing
383 } // namespace webrtc 386 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698