| 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_metadata.mojom"; | 8 import "mojo/services/media/common/interfaces/media_metadata.mojom"; |
| 9 import "mojo/services/media/common/interfaces/media_transport.mojom"; | 9 import "mojo/services/media/common/interfaces/media_transport.mojom"; |
| 10 import "mojo/services/media/common/interfaces/media_types.mojom"; | 10 import "mojo/services/media/common/interfaces/media_types.mojom"; |
| 11 | 11 |
| 12 // Produces media streams delivered from a specified origin. | 12 // Produces media streams delivered from a specified origin. |
| 13 interface MediaSource { | 13 interface MediaSource { |
| 14 // Special value for GetStatus version_last_seen parameter to get the current | 14 // Special value for GetStatus version_last_seen parameter to get the current |
| 15 // status immediately. | 15 // status immediately. |
| 16 const uint64 kInitialStatus = 0; | 16 const uint64 kInitialStatus = 0; |
| 17 | 17 |
| 18 // Gets the streams produced by this source. | 18 // Gets the streams produced by this source. |
| 19 GetStreams() => (array<MediaSourceStreamDescriptor> streams); | 19 GetStreams() => (array<MediaSourceStreamDescriptor> streams); |
| 20 | 20 |
| 21 // Gets the producer for the specified stream. | 21 // Gets the packet producer for the specified stream. |
| 22 GetProducer(uint32 stream_index, MediaProducer& producer); | 22 GetPacketProducer(uint32 stream_index, MediaPacketProducer& packet_producer); |
| 23 | |
| 24 // Gets the pull mode producer for the specified stream. | |
| 25 GetPullModeProducer(uint32 stream_index, MediaPullModeProducer& producer); | |
| 26 | 23 |
| 27 // Gets the status. To get the status immediately, call | 24 // Gets the status. To get the status immediately, call |
| 28 // GetStatus(kInitialStatus). To get updates thereafter, pass the version | 25 // GetStatus(kInitialStatus). To get updates thereafter, pass the version |
| 29 // sent in the previous callback. | 26 // sent in the previous callback. |
| 30 GetStatus(uint64 version_last_seen) | 27 GetStatus(uint64 version_last_seen) |
| 31 => (uint64 version, MediaSourceStatus status); | 28 => (uint64 version, MediaSourceStatus status); |
| 32 | 29 |
| 33 // Prepares the source. | 30 // Prepares the source. |
| 34 Prepare() => (); | 31 Prepare() => (); |
| 35 | 32 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 53 | 50 |
| 54 // Media type of the stream before conversion (as produced by the demux). | 51 // Media type of the stream before conversion (as produced by the demux). |
| 55 MediaType original_media_type; | 52 MediaType original_media_type; |
| 56 }; | 53 }; |
| 57 | 54 |
| 58 // Describes the media source. | 55 // Describes the media source. |
| 59 struct MediaSourceStatus { | 56 struct MediaSourceStatus { |
| 60 // Describes the media. | 57 // Describes the media. |
| 61 MediaMetadata? metadata; | 58 MediaMetadata? metadata; |
| 62 }; | 59 }; |
| OLD | NEW |