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

Side by Side Diff: media/base/time_delta_interpolator.h

Issue 2239243002: Interpolate media time for mojo rendering pipeline. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: moves media-time clamping to PipelineImpl Created 4 years, 3 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/base/pipeline_impl_unittest.cc ('k') | media/base/time_delta_interpolator.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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_BASE_TIME_DELTA_INTERPOLATOR_H_ 5 #ifndef MEDIA_BASE_TIME_DELTA_INTERPOLATOR_H_
6 #define MEDIA_BASE_TIME_DELTA_INTERPOLATOR_H_ 6 #define MEDIA_BASE_TIME_DELTA_INTERPOLATOR_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "media/base/media_export.h" 10 #include "media/base/media_export.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 // The default rate is 0. 43 // The default rate is 0.
44 // 44 //
45 // |tick_clock| will be queried for a new reference time value. 45 // |tick_clock| will be queried for a new reference time value.
46 void SetPlaybackRate(double playback_rate); 46 void SetPlaybackRate(double playback_rate);
47 47
48 // Sets the two timestamps to interpolate between at |playback_rate_|. 48 // Sets the two timestamps to interpolate between at |playback_rate_|.
49 // |upper_bound| must be greater or equal to |lower_bound|. 49 // |upper_bound| must be greater or equal to |lower_bound|.
50 // 50 //
51 // |upper_bound| is typically the media timestamp of the last audio frame 51 // |upper_bound| is typically the media timestamp of the last audio frame
52 // buffered by the audio hardware. 52 // buffered by the audio hardware.
53 void SetBounds(base::TimeDelta lower_bound, base::TimeDelta upper_bound); 53 void SetBounds(base::TimeDelta lower_bound,
54 base::TimeDelta upper_bound,
55 base::TimeTicks capture_time);
54 56
55 // Sets the upper bound used for interpolation. Note that if |upper_bound| is 57 // Sets the upper bound used for interpolation. Note that if |upper_bound| is
56 // less than what was previously set via SetTime(), then all future calls 58 // less than what was previously set via SetTime(), then all future calls
57 // to GetInterpolatedTime() will return |upper_bound|. 59 // to GetInterpolatedTime() will return |upper_bound|.
58 void SetUpperBound(base::TimeDelta upper_bound); 60 void SetUpperBound(base::TimeDelta upper_bound);
59 61
60 // Computes an interpolated time based on SetTime(). 62 // Computes an interpolated time based on SetTime().
61 base::TimeDelta GetInterpolatedTime(); 63 base::TimeDelta GetInterpolatedTime();
62 64
63 private: 65 private:
(...skipping 10 matching lines...) Expand all
74 base::TimeTicks reference_; 76 base::TimeTicks reference_;
75 77
76 double playback_rate_; 78 double playback_rate_;
77 79
78 DISALLOW_COPY_AND_ASSIGN(TimeDeltaInterpolator); 80 DISALLOW_COPY_AND_ASSIGN(TimeDeltaInterpolator);
79 }; 81 };
80 82
81 } // namespace media 83 } // namespace media
82 84
83 #endif // MEDIA_BASE_TIME_DELTA_INTERPOLATOR_H_ 85 #endif // MEDIA_BASE_TIME_DELTA_INTERPOLATOR_H_
OLDNEW
« no previous file with comments | « media/base/pipeline_impl_unittest.cc ('k') | media/base/time_delta_interpolator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698