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.
5 #ifndef CHROMECAST_MEDIA_CMA_BACKEND_MEDIA_CLOCK_DEVICE_DEFAULT_H_
6 #define CHROMECAST_MEDIA_CMA_BACKEND_MEDIA_CLOCK_DEVICE_DEFAULT_H_
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"
13 namespace chromecast
{
16 class MediaClockDeviceDefault
: public MediaClockDevice
{
18 MediaClockDeviceDefault();
19 ~MediaClockDeviceDefault() override
;
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
;
31 // Media time sampled at STC time |stc_|.
32 base::TimeDelta media_time_
;
37 base::ThreadChecker thread_checker_
;
39 DISALLOW_COPY_AND_ASSIGN(MediaClockDeviceDefault
);
43 } // namespace chromecast
45 #endif // CHROMECAST_MEDIA_CMA_BACKEND_MEDIA_CLOCK_DEVICE_DEFAULT_H_