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

Side by Side Diff: mojo/services/media/control/interfaces/media_player.mojom

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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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 [DartPackage="mojo_services"] 5 [DartPackage="mojo_services"]
6 module mojo.media; 6 module mojo.media;
7 7
8 import "mojo/services/media/common/interfaces/media_metadata.mojom"; 8 import "mojo/services/media/common/interfaces/media_metadata.mojom";
9 import "mojo/services/media/common/interfaces/media_state.mojom";
10 import "mojo/services/media/common/interfaces/timelines.mojom"; 9 import "mojo/services/media/common/interfaces/timelines.mojom";
11 10
12 // Plays media. 11 // Plays media.
13 interface MediaPlayer { 12 interface MediaPlayer {
14 // Special value for GetStatus version_last_seen parameter to get the current 13 // Special value for GetStatus version_last_seen parameter to get the current
15 // status immediately. 14 // status immediately.
16 const uint64 kInitialStatus = 0; 15 const uint64 kInitialStatus = 0;
17 16
18 // Starts playback. 17 // Starts playback.
19 Play(); 18 Play();
20 19
21 // Pauses playback. 20 // Pauses playback.
22 Pause(); 21 Pause();
23 22
24 // Seeks to the specified position, specified in nanoseconds. 23 // Seeks to the specified position, specified in nanoseconds.
25 // TODO(dalesat): Consider adding relative vs remote flag.
26 // TODO(dalesat): Consider adding parameters regarding desired precision.
27 Seek(int64 position); 24 Seek(int64 position);
28 25
29 // Gets the status. To get the status immediately, call 26 // Gets the status. To get the status immediately, call
30 // GetStatus(kInitialStatus). To get updates thereafter, pass the version 27 // GetStatus(kInitialStatus). To get updates thereafter, pass the version
31 // sent in the previous callback. 28 // sent in the previous callback.
32 GetStatus(uint64 version_last_seen) 29 GetStatus(uint64 version_last_seen)
33 => (uint64 version, MediaPlayerStatus status); 30 => (uint64 version, MediaPlayerStatus status);
34 }; 31 };
35 32
36 // MediaPlayer status information. 33 // MediaPlayer status information.
37 struct MediaPlayerStatus { 34 struct MediaPlayerStatus {
38 // Current state of the player.
39 MediaState state;
40
41 // Transform translating local time to presentation time. Reverse translation 35 // Transform translating local time to presentation time. Reverse translation
42 // (presentation time to local time) is only valid when media is playing. 36 // (presentation time to local time) is only valid when media is playing.
43 mojo.TimelineTransform? timeline_transform; 37 mojo.TimelineTransform? timeline_transform;
44 38
39 // Indicates whether presentation has reached end-of-stream.
40 bool end_of_stream;
41
45 // Describes the media. 42 // Describes the media.
46 MediaMetadata? metadata; 43 MediaMetadata? metadata;
47 }; 44 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698