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

Side by Side Diff: media/mojo/services/mojo_renderer_impl.cc

Issue 1094783002: Switch to double for time calculations using playback rate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Making changes at chromecast side to fix trybots Created 5 years, 8 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 unified diff | Download patch
« no previous file with comments | « media/mojo/services/mojo_renderer_impl.h ('k') | media/mojo/services/mojo_renderer_service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/mojo/services/mojo_renderer_impl.h" 5 #include "media/mojo/services/mojo_renderer_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 DCHECK(task_runner_->BelongsToCurrentThread()); 98 DCHECK(task_runner_->BelongsToCurrentThread());
99 99
100 { 100 {
101 base::AutoLock auto_lock(lock_); 101 base::AutoLock auto_lock(lock_);
102 time_ = time; 102 time_ = time;
103 } 103 }
104 104
105 remote_media_renderer_->StartPlayingFrom(time.InMicroseconds()); 105 remote_media_renderer_->StartPlayingFrom(time.InMicroseconds());
106 } 106 }
107 107
108 void MojoRendererImpl::SetPlaybackRate(float playback_rate) { 108 void MojoRendererImpl::SetPlaybackRate(double playback_rate) {
109 DVLOG(2) << __FUNCTION__; 109 DVLOG(2) << __FUNCTION__;
110 DCHECK(task_runner_->BelongsToCurrentThread()); 110 DCHECK(task_runner_->BelongsToCurrentThread());
111 remote_media_renderer_->SetPlaybackRate(playback_rate); 111 remote_media_renderer_->SetPlaybackRate(playback_rate);
112 } 112 }
113 113
114 void MojoRendererImpl::SetVolume(float volume) { 114 void MojoRendererImpl::SetVolume(float volume) {
115 DVLOG(2) << __FUNCTION__; 115 DVLOG(2) << __FUNCTION__;
116 DCHECK(task_runner_->BelongsToCurrentThread()); 116 DCHECK(task_runner_->BelongsToCurrentThread());
117 remote_media_renderer_->SetVolume(volume); 117 remote_media_renderer_->SetVolume(volume);
118 } 118 }
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 } 199 }
200 200
201 void MojoRendererImpl::OnInitialized() { 201 void MojoRendererImpl::OnInitialized() {
202 DVLOG(1) << __FUNCTION__; 202 DVLOG(1) << __FUNCTION__;
203 DCHECK(task_runner_->BelongsToCurrentThread()); 203 DCHECK(task_runner_->BelongsToCurrentThread());
204 if (!init_cb_.is_null()) 204 if (!init_cb_.is_null())
205 base::ResetAndReturn(&init_cb_).Run(PIPELINE_OK); 205 base::ResetAndReturn(&init_cb_).Run(PIPELINE_OK);
206 } 206 }
207 207
208 } // namespace media 208 } // namespace media
OLDNEW
« no previous file with comments | « media/mojo/services/mojo_renderer_impl.h ('k') | media/mojo/services/mojo_renderer_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698