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

Unified Diff: media/base/pipeline.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/pipeline.h ('k') | media/base/pipeline_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/pipeline.cc
diff --git a/media/base/pipeline.cc b/media/base/pipeline.cc
index aaa6cb6e8ed7546e5db552f0cb676287ffea734c..12e76228503e3da3f51db8e04a8e321c98d39820 100644
--- a/media/base/pipeline.cc
+++ b/media/base/pipeline.cc
@@ -37,7 +37,7 @@ Pipeline::Pipeline(
running_(false),
did_loading_progress_(false),
volume_(1.0f),
- playback_rate_(0.0f),
+ playback_rate_(0.0),
status_(PIPELINE_OK),
state_(kCreated),
renderer_ended_(false),
@@ -124,13 +124,13 @@ bool Pipeline::IsRunning() const {
return running_;
}
-float Pipeline::GetPlaybackRate() const {
+double Pipeline::GetPlaybackRate() const {
base::AutoLock auto_lock(lock_);
return playback_rate_;
}
-void Pipeline::SetPlaybackRate(float playback_rate) {
- if (playback_rate < 0.0f)
+void Pipeline::SetPlaybackRate(double playback_rate) {
+ if (playback_rate < 0.0)
return;
base::AutoLock auto_lock(lock_);
@@ -555,7 +555,7 @@ void Pipeline::ErrorChangedTask(PipelineStatus error) {
DoStop(base::Bind(&Pipeline::OnStopCompleted, weak_factory_.GetWeakPtr()));
}
-void Pipeline::PlaybackRateChangedTask(float playback_rate) {
+void Pipeline::PlaybackRateChangedTask(double playback_rate) {
DCHECK(task_runner_->BelongsToCurrentThread());
// Playback rate changes are only carried out while playing.
« no previous file with comments | « media/base/pipeline.h ('k') | media/base/pipeline_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698