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

Unified Diff: media/base/android/media_source_player.cc

Issue 2239243002: Interpolate media time for mojo rendering pipeline. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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
Index: media/base/android/media_source_player.cc
diff --git a/media/base/android/media_source_player.cc b/media/base/android/media_source_player.cc
index a077ba1337c8e6f1b4e393b7c4012ed099f71a4b..ba12c95ad3ccf5df2b61ef419936926e71c27138 100644
--- a/media/base/android/media_source_player.cc
+++ b/media/base/android/media_source_player.cc
@@ -104,7 +104,7 @@ void MediaSourcePlayer::ScheduleSeekEventAndStopDecoding(
pending_seek_ = false;
- interpolator_.SetBounds(seek_time, seek_time);
+ interpolator_.SetBounds(seek_time, seek_time, default_tick_clock_.NowTicks());
if (audio_decoder_job_->is_decoding())
audio_decoder_job_->StopDecode();
@@ -366,7 +366,8 @@ void MediaSourcePlayer::OnDemuxerSeekDone(
DCHECK(seek_time >= GetCurrentTime());
DVLOG(1) << __FUNCTION__ << " : setting clock to actual browser seek time: "
<< seek_time.InSecondsF();
- interpolator_.SetBounds(seek_time, seek_time);
+ interpolator_.SetBounds(seek_time, seek_time,
+ default_tick_clock_.NowTicks());
audio_decoder_job_->SetBaseTimestamp(seek_time);
} else {
DCHECK(actual_browser_seek_time == kNoTimestamp);
@@ -393,11 +394,10 @@ void MediaSourcePlayer::OnDemuxerSeekDone(
void MediaSourcePlayer::UpdateTimestamps(
base::TimeDelta current_presentation_timestamp,
base::TimeDelta max_presentation_timestamp) {
+ base::TimeTicks now_ticks = default_tick_clock_.NowTicks();
interpolator_.SetBounds(current_presentation_timestamp,
- max_presentation_timestamp);
- manager()->OnTimeUpdate(player_id(),
- GetCurrentTime(),
- base::TimeTicks::Now());
+ max_presentation_timestamp, now_ticks);
+ manager()->OnTimeUpdate(player_id(), GetCurrentTime(), now_ticks);
}
void MediaSourcePlayer::ProcessPendingEvents() {

Powered by Google App Engine
This is Rietveld 408576698