OLD | NEW |
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_types.mojom"; | 8 import "mojo/services/media/common/interfaces/media_types.mojom"; |
9 import "mojo/services/media/control/interfaces/media_player.mojom"; | 9 import "mojo/services/media/control/interfaces/media_player.mojom"; |
10 import "mojo/services/media/control/interfaces/media_sink.mojom"; | 10 import "mojo/services/media/control/interfaces/media_sink.mojom"; |
11 import "mojo/services/media/control/interfaces/media_source.mojom"; | 11 import "mojo/services/media/control/interfaces/media_source.mojom"; |
12 import "mojo/services/media/core/interfaces/media_type_converter.mojom"; | 12 import "mojo/services/media/core/interfaces/media_type_converter.mojom"; |
13 | 13 |
14 // Exposed by the factory service to create media-related agents. | 14 // Exposed by the factory service to create media-related agents. |
15 [ServiceName="mojo::media::MediaFactory"] | 15 [ServiceName="mojo::media::MediaFactory"] |
16 interface MediaFactory { | 16 interface MediaFactory { |
17 // Creates a player. | 17 // Creates a player. |
18 // TODO(dalesat): Add means of specifying destinations. | 18 // TODO(dalesat): Add means of specifying destinations. |
19 CreatePlayer(string origin_url, MediaPlayer& player); | 19 CreatePlayer(string origin_url, MediaPlayer& player); |
20 | 20 |
21 // Creates a source. If allowed_media_types is supplied, conversions will be | 21 // Creates a source. If allowed_media_types is supplied, conversions will be |
22 // added to each stream as needed to make the media type of the stream match | 22 // added to each stream as needed to make the media type of the stream match |
23 // one of the allowed types. If a stream cannot be converted to one of the | 23 // one of the allowed types. If a stream cannot be converted to one of the |
24 // allowed types, its media type will have the scheme NONE, and the stream | 24 // allowed types, its media type will have the scheme NONE, and the stream |
25 // will not be usable. | 25 // will not be usable. |
26 CreateSource( | 26 CreateSource(string origin_url, |
27 string origin_url, | 27 array<MediaTypeSet>? allowed_media_types, |
28 array<MediaTypeSet>? allowed_media_types, | 28 MediaSource& source); |
29 MediaSource& source); | |
30 | 29 |
31 // Creates a sink. Conversions are added to the pipeline as appropriate to | 30 // Creates a sink. Conversions are added to the pipeline as appropriate to |
32 // convert the indicated media type to a type compatible with the | 31 // convert the indicated media type to a type compatible with the |
33 // destination. | 32 // destination. |
34 CreateSink(string destination_url, MediaType media_type, MediaSink& sink); | 33 CreateSink(string destination_url, MediaType media_type, MediaSink& sink); |
35 | 34 |
36 // Creates a decoder. | 35 // Creates a decoder. |
37 CreateDecoder(MediaType input_media_type, MediaTypeConverter& decoder); | 36 CreateDecoder(MediaType input_media_type, MediaTypeConverter& decoder); |
38 }; | 37 }; |
OLD | NEW |