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

Side by Side Diff: chromecast/media/cma/backend/media_clock_device_default.h

Issue 1372393007: [Chromecast] Upgrade to new CMA backend API (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Address alokp@ comments Created 5 years, 2 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 unified diff | Download patch
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698