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

Unified Diff: media/mojo/clients/mojo_renderer.cc

Issue 2240213003: Update media mojom files to use TimeDelta instead of int64 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@OnDurationChanged_CL
Patch Set: Created 4 years, 4 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/mojo/clients/mojo_renderer.h ('k') | media/mojo/common/media_type_converters.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/clients/mojo_renderer.cc
diff --git a/media/mojo/clients/mojo_renderer.cc b/media/mojo/clients/mojo_renderer.cc
index 675809a5e4a26ca8c8232bea3c4560e71d9853b8..aea977fa43c37dc9566ce06485204591de5596ff 100644
--- a/media/mojo/clients/mojo_renderer.cc
+++ b/media/mojo/clients/mojo_renderer.cc
@@ -182,7 +182,7 @@ void MojoRenderer::StartPlayingFrom(base::TimeDelta time) {
time_ = time;
}
- remote_renderer_->StartPlayingFrom(time.InMicroseconds());
+ remote_renderer_->StartPlayingFrom(time);
}
void MojoRenderer::SetPlaybackRate(double playback_rate) {
@@ -233,12 +233,13 @@ bool MojoRenderer::HasVideo() {
return !!demuxer_stream_provider_->GetStream(DemuxerStream::VIDEO);
}
-void MojoRenderer::OnTimeUpdate(int64_t time_usec, int64_t max_time_usec) {
- DVLOG(3) << __FUNCTION__ << ": " << time_usec << ", " << max_time_usec;
+void MojoRenderer::OnTimeUpdate(base::TimeDelta time,
+ base::TimeDelta max_time) {
+ DVLOG(3) << __FUNCTION__ << ": " << time << ", " << max_time;
DCHECK(task_runner_->BelongsToCurrentThread());
base::AutoLock auto_lock(lock_);
- time_ = base::TimeDelta::FromMicroseconds(time_usec);
+ time_ = time;
}
void MojoRenderer::OnBufferingStateChange(mojom::BufferingState state) {
@@ -274,9 +275,9 @@ void MojoRenderer::OnVideoNaturalSizeChange(const gfx::Size& size) {
client_->OnVideoNaturalSizeChange(size);
}
-void MojoRenderer::OnDurationChange(int64_t duration_usec) {
- DVLOG(2) << __FUNCTION__ << ": duration" << duration_usec;
- client_->OnDurationChange(base::TimeDelta::FromMicroseconds(duration_usec));
+void MojoRenderer::OnDurationChange(base::TimeDelta duration) {
+ DVLOG(2) << __FUNCTION__ << ": duration" << duration;
+ client_->OnDurationChange(duration);
}
void MojoRenderer::OnVideoOpacityChange(bool opaque) {
« no previous file with comments | « media/mojo/clients/mojo_renderer.h ('k') | media/mojo/common/media_type_converters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698