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

Side by Side Diff: mojo/services/media/control/interfaces/media_sink.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_common.mojom";
9 import "mojo/services/media/common/interfaces/media_state.mojom";
10 import "mojo/services/media/common/interfaces/media_transport.mojom"; 8 import "mojo/services/media/common/interfaces/media_transport.mojom";
11 import "mojo/services/media/common/interfaces/media_types.mojom"; 9 import "mojo/services/media/core/interfaces/timeline_controller.mojom";
12 import "mojo/services/media/common/interfaces/timelines.mojom";
13 10
14 // TODO(dalesat): Define a media sink that multiplexes streams. 11 // TODO(dalesat): Define a media sink that multiplexes streams.
15 12
16 // Consumes media streams and delivers them to specified destinations. 13 // Consumes media streams and delivers them to specified destinations.
17 interface MediaSink { 14 interface MediaSink {
18 // TODO(dalesat): Support fanout to many destinations. 15 // TODO(dalesat): Support fanout to many destinations.
19 16
20 // Special value for GetStatus version_last_seen parameter to get the current
21 // status immediately.
22 const uint64 kInitialStatus = 0;
23
24 // Gets the consumer for the stream to be delivered. 17 // Gets the consumer for the stream to be delivered.
25 GetConsumer(MediaConsumer& consumer); 18 GetConsumer(MediaConsumer& consumer);
26 19
27 // Gets the status. To get the status immediately, call 20 // Request the timeline control site for this sink
28 // GetStatus(kInitialStatus). To get updates thereafter, pass the version 21 GetTimelineControlSite(MediaTimelineControlSite& timeline_control_site);
29 // sent in the previous callback.
30 GetStatus(uint64 version_last_seen)
31 => (uint64 version, MediaSinkStatus status);
32
33 // Starts playback.
34 Play();
35
36 // Pauses playback.
37 Pause();
38 }; 22 };
39
40 // MediaSink status information.
41 struct MediaSinkStatus {
42 // Current state of the sink.
43 MediaState state;
44
45 // Transform translating local time to presentation time. Reverse translation
46 // (presentation time to local time) is only valid when media is playing.
47 mojo.TimelineTransform? timeline_transform;
48 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698