OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 [DartPackage="mojo_services"] | |
6 module mojo.media; | |
7 | |
8 import "mojo/services/media/common/interfaces/media_clock.mojom"; | |
9 import "mojo/services/media/common/interfaces/media_common.mojom"; | |
10 import "mojo/services/media/common/interfaces/media_metadata.mojom"; | |
11 import "mojo/services/media/common/interfaces/media_state.mojom"; | |
12 import "mojo/services/media/common/interfaces/media_transport.mojom"; | |
13 import "mojo/services/media/common/interfaces/media_types.mojom"; | |
14 | |
15 // Produces media streams delivered from a specified origin. | |
16 interface MediaSource { | |
17 // Gets the streams produced by this source. | |
18 GetStreams() => (array<MediaSourceStreamDescriptor> streams); | |
19 | |
20 // Gets the clock disposition from the source. | |
21 GetClockDisposition() => (ClockDisposition clock_disposition); | |
22 | |
23 // Gets a master clock if the source can be master, null otherwise. | |
24 GetMasterClock(Clock& master_clock); | |
25 | |
26 // Sets a master clock. | |
27 SetMasterClock(Clock? master_clock); | |
28 | |
29 // Gets the producer for the specified stream. | |
30 GetProducer(uint8 stream_index, MediaProducer& producer); | |
31 | |
32 // Gets the pull mode producer for the specified stream. | |
33 GetPullModeProducer(uint8 stream_index, MediaPullModeProducer& producer); | |
34 | |
35 // Gets the status. To get the status immediately, call GetStatus(0). To | |
36 // get updates thereafter, pass the version sent in the previous callback. | |
37 GetStatus(uint64 version_last_seen) => | |
jeffbrown
2015/12/10 20:01:00
Same comment here. Consider changing to an ACK-ba
dalesat
2015/12/10 22:33:39
See previous reply.
| |
38 (uint64 version, MediaSourceStatus status); | |
39 | |
40 // Prepares the source. | |
41 // TODO(dalesat): Revisit. | |
42 Prepare() => (); | |
43 }; | |
44 | |
45 // Describes a media stream produced by a source. | |
46 struct MediaSourceStreamDescriptor { | |
47 // Zero-based index. | |
48 uint8 index; | |
49 | |
50 // Media type of the stream after conversion. | |
51 MediaType media_type; | |
52 | |
53 // Media type of the stream before conversion (as produced by the demux). | |
54 MediaType original_media_type; | |
55 }; | |
56 | |
57 // Describes the media source. | |
58 struct MediaSourceStatus { | |
59 // Current state of the source. | |
60 MediaState state; | |
61 | |
62 // Describes the media. | |
63 MediaMetadata? metadata; | |
64 }; | |
OLD | NEW |