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