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

Side by Side Diff: webrtc/modules/video_coding/protection_bitrate_calculator_unittest.cc

Issue 2070343002: Remove ViEncoder::Pause / Start (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressed comments. Created 4 years, 6 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) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 EXPECT_EQ(kMaxBitrateBps, target_bitrate); 80 EXPECT_EQ(kMaxBitrateBps, target_bitrate);
81 81
82 // Using as much for codec bitrate as nack rate, new target rate should share 82 // Using as much for codec bitrate as nack rate, new target rate should share
83 // both equally, but only be half of max (since that ceiling should be hit). 83 // both equally, but only be half of max (since that ceiling should be hit).
84 protection_callback_.nack_rate_bps_ = kMaxBitrateBps; 84 protection_callback_.nack_rate_bps_ = kMaxBitrateBps;
85 target_bitrate = media_opt_.SetTargetRates(kMaxBitrateBps, 30, 128, 100); 85 target_bitrate = media_opt_.SetTargetRates(kMaxBitrateBps, 30, 128, 100);
86 EXPECT_EQ(kMaxBitrateBps / 2, target_bitrate); 86 EXPECT_EQ(kMaxBitrateBps / 2, target_bitrate);
87 } 87 }
88 88
89 TEST_F(ProtectionBitrateCalculatorTest, NoProtection) {
90 static const uint32_t kMaxBitrateBps = 130000;
91
92 media_opt_.SetProtectionMethod(false /*enable_fec*/, false /* enable_nack */);
93 media_opt_.SetEncodingData(kCodecBitrateBps, 640, 480, 30, 1, 1000);
94
95 uint32_t target_bitrate =
96 media_opt_.SetTargetRates(kMaxBitrateBps, 30, 128, 100);
97 EXPECT_EQ(kMaxBitrateBps, target_bitrate);
98 }
99
89 } // namespace webrtc 100 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/protection_bitrate_calculator.cc ('k') | webrtc/modules/video_coding/video_coding_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698