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

Side by Side Diff: webrtc/common_video/bitrate_adjuster.cc

Issue 2969623003: Update includes for webrtc/{base => rtc_base} rename (2/3) (Closed)
Patch Set: Rebased onto 224e65939af87443addfc5bb500fbf434728bd1c and restored sorting in clock.cc 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
« no previous file with comments | « webrtc/common_types.cc ('k') | webrtc/common_video/h264/h264_bitstream_parser.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright 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
11 #include "webrtc/common_video/include/bitrate_adjuster.h" 11 #include "webrtc/common_video/include/bitrate_adjuster.h"
12 12
13 #include <algorithm> 13 #include <algorithm>
14 #include <cmath> 14 #include <cmath>
15 15
16 #include "webrtc/base/checks.h" 16 #include "webrtc/rtc_base/checks.h"
17 #include "webrtc/base/logging.h" 17 #include "webrtc/rtc_base/logging.h"
18 #include "webrtc/system_wrappers/include/clock.h" 18 #include "webrtc/system_wrappers/include/clock.h"
19 19
20 namespace webrtc { 20 namespace webrtc {
21 21
22 // Update bitrate at most once every second. 22 // Update bitrate at most once every second.
23 const uint32_t BitrateAdjuster::kBitrateUpdateIntervalMs = 1000; 23 const uint32_t BitrateAdjuster::kBitrateUpdateIntervalMs = 1000;
24 24
25 // Update bitrate at most once every 30 frames. 25 // Update bitrate at most once every 30 frames.
26 const uint32_t BitrateAdjuster::kBitrateUpdateFrameInterval = 30; 26 const uint32_t BitrateAdjuster::kBitrateUpdateFrameInterval = 30;
27 27
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 << static_cast<uint32_t>(adjusted_bitrate_bps); 153 << static_cast<uint32_t>(adjusted_bitrate_bps);
154 adjusted_bitrate_bps_ = adjusted_bitrate_bps; 154 adjusted_bitrate_bps_ = adjusted_bitrate_bps;
155 } 155 }
156 } 156 }
157 last_bitrate_update_time_ms_ = current_time_ms; 157 last_bitrate_update_time_ms_ = current_time_ms;
158 frames_since_last_update_ = 0; 158 frames_since_last_update_ = 0;
159 last_adjusted_target_bitrate_bps_ = target_bitrate_bps_; 159 last_adjusted_target_bitrate_bps_ = target_bitrate_bps_;
160 } 160 }
161 161
162 } // namespace webrtc 162 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/common_types.cc ('k') | webrtc/common_video/h264/h264_bitstream_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698