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

Unified Diff: media/renderers/audio_renderer_impl_unittest.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.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/renderers/audio_renderer_impl_unittest.cc
diff --git a/media/renderers/audio_renderer_impl_unittest.cc b/media/renderers/audio_renderer_impl_unittest.cc
index 8397cb44748467c5961c9da5791cd46a0dbb5865..bc80b03f020d5993b76c4a24f834172f869fa989 100644
--- a/media/renderers/audio_renderer_impl_unittest.cc
+++ b/media/renderers/audio_renderer_impl_unittest.cc
@@ -693,17 +693,10 @@ TEST_F(AudioRendererImplTest, CurrentMediaTimeBehavior) {
// delayed OS callback. The value should be clamped to whats been rendered.
timestamp_helper.AddFrames(frames_to_consume.value);
tick_clock_->Advance(kConsumptionDuration * 2);
- const base::TimeDelta last_media_time = CurrentMediaTime();
- EXPECT_EQ(timestamp_helper.GetTimestamp(), last_media_time);
-
- // Consume some more audio data, but provide a delay value which is at odds
- // with the amount of time advanced so far; this would normally cause the
- // media time to go backwards relative to its last value.
- EXPECT_TRUE(ConsumeBufferedData(frames_to_consume, 1));
+ EXPECT_EQ(timestamp_helper.GetTimestamp(), CurrentMediaTime());
- // Current time should never go backwards even for irregular OS callbacks and
- // those with odd / wrong delay values.
- EXPECT_EQ(last_media_time, CurrentMediaTime());
+ // Consume some more audio data.
+ EXPECT_TRUE(ConsumeBufferedData(frames_to_consume));
// Stop ticking, the media time should be clamped to what's been rendered.
StopTicking();
« no previous file with comments | « media/renderers/audio_renderer_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698