Index: media/base/wall_clock_time_source.h |
diff --git a/media/base/wall_clock_time_source.h b/media/base/wall_clock_time_source.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7010ebfe3d3e65a86d9e2e3bdc46c1f11cc3e5ee |
--- /dev/null |
+++ b/media/base/wall_clock_time_source.h |
@@ -0,0 +1,36 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef MEDIA_BASE_WALL_CLOCK_TIME_SOURCE_H_ |
+#define MEDIA_BASE_WALL_CLOCK_TIME_SOURCE_H_ |
+ |
+#include "media/base/media_export.h" |
+#include "media/base/time_source.h" |
+ |
+namespace media { |
+ |
+class MEDIA_EXPORT WallClockTimeSource : public TimeSource { |
+ public: |
+ WallClockTimeSource(); |
+ virtual ~WallClockTimeSource(); |
+ |
+ // TimeSource implementation. |
+ virtual void StartTicking() OVERRIDE; |
+ virtual void StopTicking() OVERRIDE; |
+ virtual void SetPlaybackRate(float playback_rate) OVERRIDE; |
+ virtual void SetMediaTimestamp(base::TimeDelta timestamp) OVERRIDE; |
+ virtual base::TimeDelta CurrentMediaTimestamp() OVERRIDE; |
+ |
+ private: |
+ bool ticking_; |
+ float playback_rate_; |
+ base::TimeDelta base_timestamp_; |
+ base::TimeTicks reference_wall_ticks_; |
xhwang
2014/07/12 06:36:44
Add comments for these variables. It's not obvious
scherkus (not reviewing)
2014/07/17 23:52:56
Done.
Let me know if this is what you had in mind
|
+ |
+ DISALLOW_COPY_AND_ASSIGN(WallClockTimeSource); |
+}; |
+ |
+} // namespace media |
+ |
+#endif // MEDIA_BASE_WALL_CLOCK_TIME_SOURCE_H_ |