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

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

Issue 2083813003: Revert of Re-Reland: Make media/capture gn and gyps produce components (patchset #2 id:20001 of htt… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2774
Patch Set: 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
« no previous file with comments | « media/capture/capture_export.h ('k') | media/capture/content/capture_resolution_chooser.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 // 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 #ifndef MEDIA_CAPTURE_CONTENT_ANIMATED_CONTENT_SAMPLER_H_ 5 #ifndef MEDIA_CAPTURE_CONTENT_ANIMATED_CONTENT_SAMPLER_H_
6 #define MEDIA_CAPTURE_CONTENT_ANIMATED_CONTENT_SAMPLER_H_ 6 #define MEDIA_CAPTURE_CONTENT_ANIMATED_CONTENT_SAMPLER_H_
7 7
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/time/time.h" 10 #include "base/time/time.h"
11 #include "media/capture/capture_export.h" 11 #include "media/base/media_export.h"
12 #include "ui/gfx/geometry/rect.h" 12 #include "ui/gfx/geometry/rect.h"
13 13
14 namespace media { 14 namespace media {
15 15
16 // Analyzes a sequence of events to detect the presence of constant frame rate 16 // Analyzes a sequence of events to detect the presence of constant frame rate
17 // animated content. In the case where there are multiple regions of animated 17 // animated content. In the case where there are multiple regions of animated
18 // content, AnimatedContentSampler will propose sampling the one having the 18 // content, AnimatedContentSampler will propose sampling the one having the
19 // largest "smoothness" impact, according to human perception (e.g., a 24 FPS 19 // largest "smoothness" impact, according to human perception (e.g., a 24 FPS
20 // video versus a 60 FPS busy spinner). 20 // video versus a 60 FPS busy spinner).
21 // 21 //
22 // In addition, AnimatedContentSampler will provide rewritten frame timestamps, 22 // In addition, AnimatedContentSampler will provide rewritten frame timestamps,
23 // for downstream consumers, that are "truer" to the source content than to the 23 // for downstream consumers, that are "truer" to the source content than to the
24 // local presentation hardware. 24 // local presentation hardware.
25 class CAPTURE_EXPORT AnimatedContentSampler { 25 class MEDIA_EXPORT AnimatedContentSampler {
26 public: 26 public:
27 explicit AnimatedContentSampler(base::TimeDelta min_capture_period); 27 explicit AnimatedContentSampler(base::TimeDelta min_capture_period);
28 ~AnimatedContentSampler(); 28 ~AnimatedContentSampler();
29 29
30 // Get/Set the target sampling period. This is used to determine whether to 30 // Get/Set the target sampling period. This is used to determine whether to
31 // subsample the frames of animated content. 31 // subsample the frames of animated content.
32 base::TimeDelta target_sampling_period() const { 32 base::TimeDelta target_sampling_period() const {
33 return target_sampling_period_; 33 return target_sampling_period_;
34 } 34 }
35 void SetTargetSamplingPeriod(base::TimeDelta period); 35 void SetTargetSamplingPeriod(base::TimeDelta period);
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 // the bucket when at least a full sampling period's worth are present. 148 // the bucket when at least a full sampling period's worth are present.
149 base::TimeDelta token_bucket_; 149 base::TimeDelta token_bucket_;
150 150
151 // The rewritten frame timestamp for the latest event. 151 // The rewritten frame timestamp for the latest event.
152 base::TimeTicks frame_timestamp_; 152 base::TimeTicks frame_timestamp_;
153 }; 153 };
154 154
155 } // namespace media 155 } // namespace media
156 156
157 #endif // MEDIA_CAPTURE_CONTENT_ANIMATED_CONTENT_SAMPLER_H_ 157 #endif // MEDIA_CAPTURE_CONTENT_ANIMATED_CONTENT_SAMPLER_H_
OLDNEW
« no previous file with comments | « media/capture/capture_export.h ('k') | media/capture/content/capture_resolution_chooser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698