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

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

Issue 1874003002: Motown: Get rid of speculative clock definition (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 8 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_clock.mojom";
9 import "mojo/services/media/common/interfaces/media_common.mojom"; 8 import "mojo/services/media/common/interfaces/media_common.mojom";
10 import "mojo/services/media/common/interfaces/media_state.mojom"; 9 import "mojo/services/media/common/interfaces/media_state.mojom";
11 import "mojo/services/media/common/interfaces/media_transport.mojom"; 10 import "mojo/services/media/common/interfaces/media_transport.mojom";
12 import "mojo/services/media/common/interfaces/media_types.mojom"; 11 import "mojo/services/media/common/interfaces/media_types.mojom";
13 import "mojo/services/media/common/interfaces/rate_control.mojom"; 12 import "mojo/services/media/common/interfaces/rate_control.mojom";
14 13
15 // TODO(dalesat): Define a media sink that multiplexes streams. 14 // TODO(dalesat): Define a media sink that multiplexes streams.
16 15
17 // Consumes media streams and delivers them to specified destinations. 16 // Consumes media streams and delivers them to specified destinations.
18 interface MediaSink { 17 interface MediaSink {
19 // TODO(dalesat): Support fanout to many destinations. 18 // TODO(dalesat): Support fanout to many destinations.
20 19
21 // Special value for GetStatus version_last_seen parameter to get the current 20 // Special value for GetStatus version_last_seen parameter to get the current
22 // status immediately. 21 // status immediately.
23 const uint64 kInitialStatus = 0; 22 const uint64 kInitialStatus = 0;
24 23
25 // Gets the clock disposition from the source.
26 GetClockDisposition() => (ClockDisposition clock_disposition);
27
28 // Gets a master clock if the sink can be master, null otherwise.
29 GetMasterClock(Clock& master_clock);
30
31 // Sets a master clock.
32 SetMasterClock(Clock? master_clock);
33
34 // Gets the consumer for the stream to be delivered. 24 // Gets the consumer for the stream to be delivered.
35 GetConsumer(MediaConsumer& consumer); 25 GetConsumer(MediaConsumer& consumer);
36 26
37 // Gets the status. To get the status immediately, call 27 // Gets the status. To get the status immediately, call
38 // GetStatus(kInitialStatus). To get updates thereafter, pass the version 28 // GetStatus(kInitialStatus). To get updates thereafter, pass the version
39 // sent in the previous callback. 29 // sent in the previous callback.
40 GetStatus(uint64 version_last_seen) 30 GetStatus(uint64 version_last_seen)
41 => (uint64 version, MediaSinkStatus status); 31 => (uint64 version, MediaSinkStatus status);
42 32
43 // Starts playback. 33 // Starts playback.
44 Play(); 34 Play();
45 35
46 // Pauses playback. 36 // Pauses playback.
47 Pause(); 37 Pause();
48 }; 38 };
49 39
50 // MediaSink status information. 40 // MediaSink status information.
51 struct MediaSinkStatus { 41 struct MediaSinkStatus {
52 // Current state of the sink. 42 // Current state of the sink.
53 MediaState state; 43 MediaState state;
54 44
55 // Transform translating local time to presentation time. Reverse translation 45 // Transform translating local time to presentation time. Reverse translation
56 // (presentation time to local time) is only valid when media is playing. 46 // (presentation time to local time) is only valid when media is playing.
57 TimelineTransform? timeline_transform; 47 TimelineTransform? timeline_transform;
58 }; 48 };
OLDNEW
« no previous file with comments | « mojo/services/media/common/interfaces/media_clock.mojom ('k') | mojo/services/media/control/interfaces/media_source.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698