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

Side by Side Diff: webrtc/modules/video_coding/utility/frame_dropper.cc

Issue 2969653002: Update includes for webrtc/{base => rtc_base} rename (1/3) (Closed)
Patch Set: Rebased onto 89c4a7e57d524b13fbe0c823a83a4c10c2e63bd0 Created 3 years, 5 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) 2011 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2011 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
11 #include "webrtc/modules/video_coding/utility/frame_dropper.h" 11 #include "webrtc/modules/video_coding/utility/frame_dropper.h"
12 12
13 #include <algorithm> 13 #include <algorithm>
14 14
15 #include "webrtc/base/logging.h" 15 #include "webrtc/rtc_base/logging.h"
16 16
17 namespace webrtc { 17 namespace webrtc {
18 18
19 namespace { 19 namespace {
20 20
21 const float kDefaultFrameSizeAlpha = 0.9f; 21 const float kDefaultFrameSizeAlpha = 0.9f;
22 const float kDefaultKeyFrameRatioAlpha = 0.99f; 22 const float kDefaultKeyFrameRatioAlpha = 0.99f;
23 // 1 key frame every 10th second in 30 fps. 23 // 1 key frame every 10th second in 30 fps.
24 const float kDefaultKeyFrameRatioValue = 1 / 300.0f; 24 const float kDefaultKeyFrameRatioValue = 1 / 300.0f;
25 25
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 // This is a temporary fix for screencasting where very large frames from 270 // This is a temporary fix for screencasting where very large frames from
271 // encoder will cause very slow response (too many frame drops). 271 // encoder will cause very slow response (too many frame drops).
272 // TODO(isheriff): Remove this now that large delta frames are also spread out ? 272 // TODO(isheriff): Remove this now that large delta frames are also spread out ?
273 void FrameDropper::CapAccumulator() { 273 void FrameDropper::CapAccumulator() {
274 float max_accumulator = target_bitrate_ * kAccumulatorCapBufferSizeSecs; 274 float max_accumulator = target_bitrate_ * kAccumulatorCapBufferSizeSecs;
275 if (accumulator_ > max_accumulator) { 275 if (accumulator_ > max_accumulator) {
276 accumulator_ = max_accumulator; 276 accumulator_ = max_accumulator;
277 } 277 }
278 } 278 }
279 } // namespace webrtc 279 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/utility/frame_dropper.h ('k') | webrtc/modules/video_coding/utility/frame_dropper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698