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

Side by Side Diff: webrtc/video_engine/overuse_frame_detector.cc

Issue 1184443005: Remove implicit-int-conversion warnings. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: size_t j Created 5 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
« no previous file with comments | « webrtc/video_engine/BUILD.gn ('k') | webrtc/video_engine/report_block_stats.cc » ('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 (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 } 243 }
244 // Remove any old frames up to current. 244 // Remove any old frames up to current.
245 // Old frames have been skipped by the capture process thread. 245 // Old frames have been skipped by the capture process thread.
246 // TODO(asapersson): Consider measuring time from first frame in list. 246 // TODO(asapersson): Consider measuring time from first frame in list.
247 last_processing_time_ms_ = now - (*it).second; 247 last_processing_time_ms_ = now - (*it).second;
248 frame_times_.erase(frame_times_.begin(), ++it); 248 frame_times_.erase(frame_times_.begin(), ++it);
249 return last_processing_time_ms_; 249 return last_processing_time_ms_;
250 } 250 }
251 251
252 void Reset() { frame_times_.clear(); } 252 void Reset() { frame_times_.clear(); }
253 int NumFrames() const { return frame_times_.size(); } 253 int NumFrames() const { return static_cast<int>(frame_times_.size()); }
254 int last_processing_time_ms() const { return last_processing_time_ms_; } 254 int last_processing_time_ms() const { return last_processing_time_ms_; }
255 255
256 private: 256 private:
257 // Captured frames mapped by the capture time. 257 // Captured frames mapped by the capture time.
258 std::map<int64_t, int64_t> frame_times_; 258 std::map<int64_t, int64_t> frame_times_;
259 int last_processing_time_ms_; 259 int last_processing_time_ms_;
260 }; 260 };
261 261
262 // TODO(asapersson): Remove this class. Not used. 262 // TODO(asapersson): Remove this class. Not used.
263 // Class for calculating the capture queue delay change. 263 // Class for calculating the capture queue delay change.
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 bool underusing = false; 574 bool underusing = false;
575 if (options_.enable_capture_jitter_method) { 575 if (options_.enable_capture_jitter_method) {
576 underusing = capture_deltas_.StdDev() < 576 underusing = capture_deltas_.StdDev() <
577 options_.low_capture_jitter_threshold_ms; 577 options_.low_capture_jitter_threshold_ms;
578 } else if (options_.enable_encode_usage_method) { 578 } else if (options_.enable_encode_usage_method) {
579 underusing = usage_->Value() < options_.low_encode_usage_threshold_percent; 579 underusing = usage_->Value() < options_.low_encode_usage_threshold_percent;
580 } 580 }
581 return underusing; 581 return underusing;
582 } 582 }
583 } // namespace webrtc 583 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video_engine/BUILD.gn ('k') | webrtc/video_engine/report_block_stats.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698