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

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: 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 | « content/renderer/media/android/webmediaplayer_android.cc ('k') | media/base/pipeline_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9c13bb014405b4d12f104643665558fd439c1379..b65505cd8f0c40752f3e8f810fe64e1f6123cb43 100644
--- a/media/base/android/media_source_player.cc
+++ b/media/base/android/media_source_player.cc
@@ -105,7 +105,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();
@@ -367,7 +367,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);
@@ -394,11 +395,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() {
« no previous file with comments | « content/renderer/media/android/webmediaplayer_android.cc ('k') | media/base/pipeline_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698