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

Unified Diff: media/filters/audio_renderer_impl.h

Issue 382633005: Use AudioClock to determine when audio playback has ended. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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_renderer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/audio_renderer_impl.h
diff --git a/media/filters/audio_renderer_impl.h b/media/filters/audio_renderer_impl.h
index fc7c3f55d2f356bb1d143b319950881756c4f359..2e29a9e82110adce8bccd546adcb3992a1323247 100644
--- a/media/filters/audio_renderer_impl.h
+++ b/media/filters/audio_renderer_impl.h
@@ -127,11 +127,6 @@ class MEDIA_EXPORT AudioRendererImpl
// DecodedAudioReady().
void HandleAbortedReadOrDecodeError(bool is_decode_error);
- // Estimate earliest time when current buffer can stop playing.
- void UpdateEarliestEndTime_Locked(int frames_filled,
- const base::TimeDelta& playback_delay,
- const base::TimeTicks& time_now);
-
void StartRendering_Locked();
void StopRendering_Locked();
@@ -257,23 +252,6 @@ class MEDIA_EXPORT AudioRendererImpl
base::TimeDelta start_timestamp_;
- // We're supposed to know amount of audio data OS or hardware buffered, but
- // that is not always so -- on my Linux box
- // AudioBuffersState::hardware_delay_bytes never reaches 0.
- //
- // As a result we cannot use it to find when stream ends. If we just ignore
- // buffered data we will notify host that stream ended before it is actually
- // did so, I've seen it done ~140ms too early when playing ~150ms file.
- //
- // Instead of trying to invent OS-specific solution for each and every OS we
- // are supporting, use simple workaround: every time we fill the buffer we
- // remember when it should stop playing, and do not assume that buffer is
- // empty till that time. Workaround is not bulletproof, as we don't exactly
- // know when that particular data would start playing, but it is much better
- // than nothing.
- base::TimeTicks earliest_end_time_;
- size_t total_frames_filled_;
scherkus (not reviewing) 2014/07/10 00:33:44 apparently this variable was completely unused
DaleCurtis 2014/07/10 01:44:05 Haha, yeah, I've removed it a couple times locally
-
// End variables which must be accessed under |lock_|. ----------------------
// NOTE: Weak pointers must be invalidated before all other member variables.
« no previous file with comments | « no previous file | media/filters/audio_renderer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698