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

Side by Side Diff: services/media/factory_service/media_player_impl.h

Issue 1809703003: Motown: Add examples/media_test, a command line media player app. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Tweaks based on feedback. Created 4 years, 9 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MOJO_SERVICES_MEDIA_FACTORY_MEDIA_PLAYER_IMPL_H_ 5 #ifndef MOJO_SERVICES_MEDIA_FACTORY_MEDIA_PLAYER_IMPL_H_
6 #define MOJO_SERVICES_MEDIA_FACTORY_MEDIA_PLAYER_IMPL_H_ 6 #define MOJO_SERVICES_MEDIA_FACTORY_MEDIA_PLAYER_IMPL_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <limits> 9 #include <limits>
10 #include <vector> 10 #include <vector>
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 96
97 // Increments the status version and runs pending status request callbacks. 97 // Increments the status version and runs pending status request callbacks.
98 void StatusUpdated(); 98 void StatusUpdated();
99 99
100 // Runs a status request callback. 100 // Runs a status request callback.
101 void RunStatusCallback(const GetStatusCallback& callback) const; 101 void RunStatusCallback(const GetStatusCallback& callback) const;
102 102
103 // Handles a status update from the source. When called with the default 103 // Handles a status update from the source. When called with the default
104 // argument values, initiates source status updates. 104 // argument values, initiates source status updates.
105 void HandleSourceStatusUpdates( 105 void HandleSourceStatusUpdates(
106 uint64_t version = 0, 106 uint64_t version = MediaSource::kInitialStatus,
107 MediaSourceStatusPtr status = nullptr); 107 MediaSourceStatusPtr status = nullptr);
108 108
109 // Handles a status update from a sink. When called with the default 109 // Handles a status update from a sink. When called with the default
110 // argument values, initiates sink status updates. 110 // argument values, initiates sink status updates.
111 void HandleSinkStatusUpdates( 111 void HandleSinkStatusUpdates(
112 const std::unique_ptr<Stream>& stream, 112 const std::unique_ptr<Stream>& stream,
113 uint64_t version = 0, 113 uint64_t version = MediaSink::kInitialStatus,
114 MediaSinkStatusPtr status = nullptr); 114 MediaSinkStatusPtr status = nullptr);
115 115
116 Event event_; 116 Event event_;
117 Binding<MediaPlayer> binding_; 117 Binding<MediaPlayer> binding_;
118 MediaFactoryPtr factory_; 118 MediaFactoryPtr factory_;
119 MediaSourcePtr source_; 119 MediaSourcePtr source_;
120 std::vector<std::unique_ptr<Stream>> streams_; 120 std::vector<std::unique_ptr<Stream>> streams_;
121 uint64_t status_version_ = 1u; 121 uint64_t status_version_ = 1u;
122 bool flushed_ = true; 122 bool flushed_ = true;
123 MediaState reported_media_state_ = MediaState::UNPREPARED; 123 MediaState reported_media_state_ = MediaState::UNPREPARED;
124 Watched<MediaState> target_state_; 124 Watched<MediaState> target_state_;
125 Watched<int64_t> target_position_; 125 Watched<int64_t> target_position_;
126 TimelineTransformPtr transform_; 126 TimelineTransformPtr transform_;
127 MediaMetadataPtr metadata_; 127 MediaMetadataPtr metadata_;
128 std::deque<GetStatusCallback> pending_status_requests_; 128 std::deque<GetStatusCallback> pending_status_requests_;
129 }; 129 };
130 130
131 } // namespace media 131 } // namespace media
132 } // namespace mojo 132 } // namespace mojo
133 133
134 #endif // MOJO_SERVICES_MEDIA_FACTORY_MEDIA_PLAYER_IMPL_H_ 134 #endif // MOJO_SERVICES_MEDIA_FACTORY_MEDIA_PLAYER_IMPL_H_
OLDNEW
« examples/media_test/media_test.h ('K') | « mojo/services/media/control/interfaces/media_source.mojom ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698