OLD | NEW |
| (Empty) |
1 // Copyright 2015 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 CHROMECAST_MEDIA_CMA_BACKEND_MEDIA_CLOCK_DEVICE_DEFAULT_H_ | |
6 #define CHROMECAST_MEDIA_CMA_BACKEND_MEDIA_CLOCK_DEVICE_DEFAULT_H_ | |
7 | |
8 #include "base/macros.h" | |
9 #include "base/threading/thread_checker.h" | |
10 #include "base/time/time.h" | |
11 #include "chromecast/public/media/media_clock_device.h" | |
12 | |
13 namespace chromecast { | |
14 namespace media { | |
15 | |
16 class MediaClockDeviceDefault : public MediaClockDevice { | |
17 public: | |
18 MediaClockDeviceDefault(); | |
19 ~MediaClockDeviceDefault() override; | |
20 | |
21 // MediaClockDevice implementation. | |
22 State GetState() const override; | |
23 bool SetState(State new_state) override; | |
24 bool ResetTimeline(int64_t time_microseconds) override; | |
25 bool SetRate(float rate) override; | |
26 int64_t GetTimeMicroseconds() override; | |
27 | |
28 private: | |
29 State state_; | |
30 | |
31 // Media time sampled at STC time |stc_|. | |
32 base::TimeDelta media_time_; | |
33 base::TimeTicks stc_; | |
34 | |
35 float rate_; | |
36 | |
37 base::ThreadChecker thread_checker_; | |
38 | |
39 DISALLOW_COPY_AND_ASSIGN(MediaClockDeviceDefault); | |
40 }; | |
41 | |
42 } // namespace media | |
43 } // namespace chromecast | |
44 | |
45 #endif // CHROMECAST_MEDIA_CMA_BACKEND_MEDIA_CLOCK_DEVICE_DEFAULT_H_ | |
OLD | NEW |