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

Unified Diff: media/filters/audio_clock.h

Issue 1233963002: Fix accumulation error with front_timestamp, move test only code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused vars. Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | media/filters/audio_clock.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/audio_clock.h
diff --git a/media/filters/audio_clock.h b/media/filters/audio_clock.h
index 31317c0eada168436208f79e8414a7642fb28d9c..63159b59e5503cb8e176353803f12a4658b77b97 100644
--- a/media/filters/audio_clock.h
+++ b/media/filters/audio_clock.h
@@ -95,18 +95,9 @@ class MEDIA_EXPORT AudioClock {
// |timestamp| must be within front_timestamp() and back_timestamp().
base::TimeDelta TimeUntilPlayback(base::TimeDelta timestamp) const;
- // Returns the amount of contiguous media time buffered at the head of the
- // audio hardware buffer. Silence introduced into the audio hardware buffer is
- // treated as a break in media time.
- base::TimeDelta contiguous_audio_data_buffered() const {
- return contiguous_audio_data_buffered_;
- }
-
- // Same as above, but also treats changes in playback rate as a break in media
- // time.
- base::TimeDelta contiguous_audio_data_buffered_at_same_rate() const {
- return contiguous_audio_data_buffered_at_same_rate_;
- }
+ void ContiguousAudioDataBufferedForTesting(
+ base::TimeDelta* total,
+ base::TimeDelta* same_rate_total) const;
private:
// Even with a ridiculously high sample rate of 256kHz, using 64 bits will
@@ -123,7 +114,7 @@ class MEDIA_EXPORT AudioClock {
// Helpers for operating on |buffered_|.
void PushBufferedAudioData(int64_t frames, double playback_rate);
void PopBufferedAudioData(int64_t frames);
- base::TimeDelta ComputeBufferedMediaTime(int64_t frames) const;
+ base::TimeDelta ComputeBufferedMediaDuration() const;
const base::TimeDelta start_timestamp_;
const double microseconds_per_frame_;
@@ -134,10 +125,6 @@ class MEDIA_EXPORT AudioClock {
base::TimeDelta front_timestamp_;
base::TimeDelta back_timestamp_;
- // Cached results of last call to WroteAudio().
- base::TimeDelta contiguous_audio_data_buffered_;
- base::TimeDelta contiguous_audio_data_buffered_at_same_rate_;
-
DISALLOW_COPY_AND_ASSIGN(AudioClock);
};
« no previous file with comments | « no previous file | media/filters/audio_clock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698