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

Unified Diff: media/renderers/audio_renderer_impl.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/renderers/audio_renderer_impl.h ('k') | media/renderers/audio_renderer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/renderers/audio_renderer_impl.cc
diff --git a/media/renderers/audio_renderer_impl.cc b/media/renderers/audio_renderer_impl.cc
index afd298b657701e96f52946849041fb91d08d9d19..20da11152b0f2908aab2ec4ae7a438a5a8cbae47 100644
--- a/media/renderers/audio_renderer_impl.cc
+++ b/media/renderers/audio_renderer_impl.cc
@@ -177,7 +177,6 @@ void AudioRendererImpl::SetMediaTime(base::TimeDelta time) {
ended_timestamp_ = kInfiniteDuration;
last_render_time_ = stop_rendering_time_ = base::TimeTicks();
first_packet_timestamp_ = kNoTimestamp;
- last_media_timestamp_ = base::TimeDelta();
audio_clock_.reset(new AudioClock(time, audio_parameters_.sample_rate()));
}
@@ -194,20 +193,6 @@ base::TimeDelta AudioRendererImpl::CurrentMediaTime() {
current_media_time = audio_clock_->back_timestamp();
}
- // Clamp current media time to the last reported value, this prevents higher
- // level clients from seeing time go backwards based on inaccurate or spurious
- // delay values reported to the AudioClock.
- //
- // It is expected that such events are transient and will be recovered as
- // rendering continues over time.
- if (current_media_time < last_media_timestamp_) {
- DVLOG(2) << __func__ << ": " << last_media_timestamp_
- << " (clamped), actual: " << current_media_time;
- return last_media_timestamp_;
- }
-
- DVLOG(2) << __func__ << ": " << current_media_time;
- last_media_timestamp_ = current_media_time;
return current_media_time;
}
« no previous file with comments | « media/renderers/audio_renderer_impl.h ('k') | media/renderers/audio_renderer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698