OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef MEDIA_BASE_TIME_SOURCE_H_ | |
6 #define MEDIA_BASE_TIME_SOURCE_H_ | |
7 | |
8 #include "base/basictypes.h" | |
9 #include "base/time/time.h" | |
10 #include "media/base/media_export.h" | |
11 | |
12 namespace media { | |
13 | |
14 // A TimeSource is capable of providing the current media time. | |
15 class MEDIA_EXPORT TimeSource { | |
16 public: | |
17 // Signal the time source to start ticking. It is expected that values from | |
18 // CurrentMediaTimestamp() will start increasing. | |
19 virtual void StartTicking() = 0; | |
20 | |
21 // Signal the time source to start ticking. It is expected that values from | |
xhwang
2014/07/12 06:36:44
s/start/stop
scherkus (not reviewing)
2014/07/17 23:52:56
Done.
| |
22 // CurrentMediaTimestamp() will remain constant. | |
23 virtual void StopTicking() = 0; | |
24 | |
25 // Updates the current playback rate. | |
26 virtual void SetPlaybackRate(float playback_rate) = 0; | |
xhwang
2014/07/12 06:36:44
Can you add comments explaining how current media
scherkus (not reviewing)
2014/07/17 23:52:56
Done.
Let me know if what I wrote is what you had
| |
27 | |
28 // Sets the media timestamp to start ticking from. Only valid to call while | |
29 // the time source is not ticking. | |
30 virtual void SetMediaTimestamp(base::TimeDelta timestamp) = 0; | |
31 | |
32 // Returns the current media timestamp. | |
33 virtual base::TimeDelta CurrentMediaTimestamp() = 0; | |
xhwang
2014/07/12 06:36:44
const function?
Also, can we just have SetMediaTi
scherkus (not reviewing)
2014/07/17 23:52:56
Done for the "time" bit.
I don't think const make
| |
34 | |
35 protected: | |
36 TimeSource() {} | |
37 virtual ~TimeSource() {} | |
38 }; | |
39 | |
40 } // namespace media | |
41 | |
42 #endif // MEDIA_BASE_TIME_SOURCE_H_ | |
OLD | NEW |