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

Side by Side Diff: media/capture/content/animated_content_sampler.cc

Issue 1542013004: Switch to standard integer types in media/, take 2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more stddef Created 5 years 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 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/capture/content/animated_content_sampler.h" 5 #include "media/capture/content/animated_content_sampler.h"
6 6
7 #include <stddef.h>
8 #include <stdint.h>
9
7 #include <algorithm> 10 #include <algorithm>
8 11
9 namespace media { 12 namespace media {
10 13
11 namespace { 14 namespace {
12 15
13 // These specify the minimum/maximum amount of recent event history to examine 16 // These specify the minimum/maximum amount of recent event history to examine
14 // to detect animated content. If the values are too low, there is a greater 17 // to detect animated content. If the values are too low, there is a greater
15 // risk of false-positive detections and low accuracy. If they are too high, 18 // risk of false-positive detections and low accuracy. If they are too high,
16 // the the implementation will be slow to lock-in/out, and also will not react 19 // the the implementation will be slow to lock-in/out, and also will not react
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 } else { 287 } else {
285 sampling_period = (ratio + 1) * animation_period; 288 sampling_period = (ratio + 1) * animation_period;
286 } 289 }
287 } else { 290 } else {
288 sampling_period = animation_period; 291 sampling_period = animation_period;
289 } 292 }
290 return std::max(sampling_period, min_capture_period); 293 return std::max(sampling_period, min_capture_period);
291 } 294 }
292 295
293 } // namespace media 296 } // namespace media
OLDNEW
« no previous file with comments | « media/blink/websourcebuffer_impl.h ('k') | media/capture/content/animated_content_sampler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698