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

Unified Diff: media/base/time_source.h

Issue 1027553002: Change the TimeSource interface to return wallclock time for video. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comment. Created 5 years, 9 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
Index: media/base/time_source.h
diff --git a/media/base/time_source.h b/media/base/time_source.h
index 8ad364b20a2dda21d97d087a93f878bc0bef16e1..61d0d7ab1dd7186f8a5d3f85ab9bf5232b3303a9 100644
--- a/media/base/time_source.h
+++ b/media/base/time_source.h
@@ -40,17 +40,13 @@ class MEDIA_EXPORT TimeSource {
// will never go backwards, the frequency at which they update may be low.
virtual base::TimeDelta CurrentMediaTime() = 0;
xhwang 2015/03/23 22:20:13 nit: Since TimeDelta specifies a duration, we prob
DaleCurtis 2015/03/25 00:31:44 The current media time is relative to 0?
- // Returns the current media time for use with synchronizing video.
+ // Converts a media timestamp into a wallclock timestamp. If media time is
+ // stopped, returns a null TimeTicks.
//
- // Differences from CurrentMediaTime():
- // - Values returned update at a much higher frequency (e.g., suitable for
- // playback of 60 FPS content).
- // - As a result, values may go slightly backwards depending on the
- // implementation (e.g., uses interpolation).
- //
- // TODO(scherkus): Replace with a method that returns wall clock time for a
- // given media time for use with VideoFrameScheduler http://crbug.com/110814
- virtual base::TimeDelta CurrentMediaTimeForSyncingVideo() = 0;
+ // Values too far ahead of or behind the current media time will return an
+ // estimated value; as such, these values may go backwards in time slightly.
+ virtual base::TimeTicks GetWallclockTimeForMediaTime(
xhwang 2015/03/23 22:20:13 s/Wallclock/WallClock/ At least in WallClockTimeS
xhwang 2015/03/23 22:20:13 nit: how about just GetWallClockTime(base::TimeDel
DaleCurtis 2015/03/25 00:31:44 Done.
+ base::TimeDelta time) = 0;
};
} // namespace media

Powered by Google App Engine
This is Rietveld 408576698