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

Unified Diff: media/base/synchronizer.cc

Issue 19739: Changed media::Buffer interfaces to use base::TimeDelta. (Closed)
Patch Set: Created 11 years, 11 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/data_buffer_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/synchronizer.cc
diff --git a/media/base/synchronizer.cc b/media/base/synchronizer.cc
index f233c7ba5d21e86ab14ab2cf8650d94bceeb1bde..a8caffa0fdb333d1db77fde87174f3080ef8af2a 100644
--- a/media/base/synchronizer.cc
+++ b/media/base/synchronizer.cc
@@ -33,12 +33,10 @@ void Synchronizer::CalculateDelay(base::TimeDelta time,
base::TimeDelta render_delta = rendering_stop_ - rendering_start_;
// The duration to display the sample |now|.
- base::TimeDelta duration =
- base::TimeDelta::FromMicroseconds(now->GetDuration());
+ base::TimeDelta duration = now->GetDuration();
// The presentation timestamp (pts) of the sample |now|.
- base::TimeDelta now_pts =
- base::TimeDelta::FromMicroseconds(now->GetTimestamp());
+ base::TimeDelta now_pts = now->GetTimestamp();
// The presentation timestamp (pts) of the next sample.
base::TimeDelta next_pts;
@@ -50,7 +48,7 @@ void Synchronizer::CalculateDelay(base::TimeDelta time,
// We also use |next| to get the exact next timestamp as opposed to assuming
// it will be |now| + |now|'s duration, which may not always be true.
if (next) {
- next_pts = base::TimeDelta::FromMicroseconds(next->GetTimestamp());
+ next_pts = next->GetTimestamp();
duration = next_pts - now_pts;
// Timestamps appear out of order, so skip this frame.
« no previous file with comments | « media/base/data_buffer_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698