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

Unified Diff: chromecast/public/media/media_clock_device.h

Issue 1257013003: Load CMA backend from shared library (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another round of review feedback Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chromecast/public/media/media_clock_device.h
diff --git a/chromecast/media/cma/backend/media_clock_device.h b/chromecast/public/media/media_clock_device.h
similarity index 63%
rename from chromecast/media/cma/backend/media_clock_device.h
rename to chromecast/public/media/media_clock_device.h
index b625dd57f8289e097768c56d6b72f83dd9b2da45..25106305247b2781043c712293ac1a89de52db48 100644
--- a/chromecast/media/cma/backend/media_clock_device.h
+++ b/chromecast/public/media/media_clock_device.h
@@ -2,16 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROMECAST_MEDIA_CMA_BACKEND_MEDIA_CLOCK_DEVICE_H_
-#define CHROMECAST_MEDIA_CMA_BACKEND_MEDIA_CLOCK_DEVICE_H_
+#ifndef CHROMECAST_PUBLIC_MEDIA_MEDIA_CLOCK_DEVICE_H_
+#define CHROMECAST_PUBLIC_MEDIA_MEDIA_CLOCK_DEVICE_H_
#include <string>
-#include "base/basictypes.h"
-#include "base/macros.h"
-#include "base/threading/non_thread_safe.h"
-#include "base/time/time.h"
-
namespace chromecast {
namespace media {
@@ -30,8 +25,7 @@ namespace media {
// |kUninitialized| state to the |kIdle| state.
// - The initial value of the timeline can only be set in the kIdle state.
//
-class MediaClockDevice
- : NON_EXPORTED_BASE(public base::NonThreadSafe) {
+class MediaClockDevice {
public:
enum State {
kStateUninitialized,
@@ -40,15 +34,7 @@ class MediaClockDevice
kStateError,
};
- // Return true if transition from |state1| to |state2| is a valid state
- // transition.
- static bool IsValidStateTransition(State state1, State state2);
-
- // Returns string representation of state (for logging)
- static std::string StateToString(const State& state);
-
- MediaClockDevice();
- virtual ~MediaClockDevice();
+ virtual ~MediaClockDevice() {}
// Return the current state of the media clock.
virtual State GetState() const = 0;
@@ -57,10 +43,10 @@ class MediaClockDevice
// Returns true when successful.
virtual bool SetState(State new_state) = 0;
- // Sets the initial value of the timeline.
+ // Sets the initial value of the timeline in microseconds.
// Can only be invoked in state kStateIdle.
// Returns true when successful.
- virtual bool ResetTimeline(base::TimeDelta time) = 0;
+ virtual bool ResetTimeline(int64_t time_microseconds) = 0;
// Sets the clock rate.
// Setting it to 0 means the clock is not progressing and that the renderer
@@ -68,12 +54,9 @@ class MediaClockDevice
// Can only be invoked in states kStateIdle or kStateRunning.
virtual bool SetRate(float rate) = 0;
- // Retrieves the media clock time.
+ // Retrieves the media clock time in microseconds.
// Can only be invoked in states kStateIdle or kStateRunning.
- virtual base::TimeDelta GetTime() = 0;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MediaClockDevice);
+ virtual int64_t GetTime() = 0;
};
} // namespace media

Powered by Google App Engine
This is Rietveld 408576698