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

Unified Diff: examples/media_test/media_test.h

Issue 2006093004: Motown: Convert MediaSink to expose MediaTimelineControlSite (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « no previous file | examples/media_test/media_test.cc » ('j') | services/media/framework_mojo/mojo_producer.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: examples/media_test/media_test.h
diff --git a/examples/media_test/media_test.h b/examples/media_test/media_test.h
index da5473ee3d3478551f82d024657d40e80737bc23..fc171614c8a32a33f6139e7d751e5a90fdc8c1a6 100644
--- a/examples/media_test/media_test.h
+++ b/examples/media_test/media_test.h
@@ -19,6 +19,8 @@ namespace examples {
// Model for media test application.
class MediaTest {
public:
+ enum class State { kPaused, kPlaying, kEnded };
+
using UpdateCallback = std::function<void()>;
static std::unique_ptr<MediaTest> Create(mojo::ApplicationImpl* app,
@@ -41,10 +43,10 @@ class MediaTest {
void Seek(int64_t position_ns) { media_player_->Seek(position_ns); }
// Returns the previous state of the player.
- MediaState previous_state() const { return previous_state_; }
+ State previous_state() const { return previous_state_; }
// Returns the current state of the player.
- MediaState state() const { return state_; }
+ State state() const { return state_; }
// Returns the current presentation time in nanoseconds.
int64_t position_ns() const;
@@ -61,8 +63,8 @@ class MediaTest {
MediaPlayerStatusPtr status = nullptr);
MediaPlayerPtr media_player_;
- MediaState previous_state_ = MediaState::UNPREPARED;
- MediaState state_ = MediaState::UNPREPARED;
+ State previous_state_ = State::kPaused;
+ State state_ = State::kPaused;
TimelineFunction timeline_function_;
MediaMetadataPtr metadata_;
UpdateCallback update_callback_;
« no previous file with comments | « no previous file | examples/media_test/media_test.cc » ('j') | services/media/framework_mojo/mojo_producer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698