| 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_clock.mojom"; | 8 import "mojo/services/media/common/interfaces/media_clock.mojom"; |
| 9 import "mojo/services/media/common/interfaces/media_common.mojom"; | 9 import "mojo/services/media/common/interfaces/media_common.mojom"; |
| 10 import "mojo/services/media/common/interfaces/media_metadata.mojom"; | 10 import "mojo/services/media/common/interfaces/media_metadata.mojom"; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 | 31 |
| 32 // Gets the pull mode producer for the specified stream. | 32 // Gets the pull mode producer for the specified stream. |
| 33 GetPullModeProducer(uint32 stream_index, MediaPullModeProducer& producer); | 33 GetPullModeProducer(uint32 stream_index, MediaPullModeProducer& producer); |
| 34 | 34 |
| 35 // Gets the status. To get the status immediately, call GetStatus(0). To | 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. | 36 // get updates thereafter, pass the version sent in the previous callback. |
| 37 GetStatus(uint64 version_last_seen) => | 37 GetStatus(uint64 version_last_seen) => |
| 38 (uint64 version, MediaSourceStatus status); | 38 (uint64 version, MediaSourceStatus status); |
| 39 | 39 |
| 40 // Prepares the source. | 40 // Prepares the source. |
| 41 // TODO(dalesat): Revisit. | |
| 42 Prepare() => (); | 41 Prepare() => (); |
| 42 |
| 43 // Flushes the source. |
| 44 Flush() => (); |
| 43 }; | 45 }; |
| 44 | 46 |
| 45 // Describes a media stream produced by a source. | 47 // Describes a media stream produced by a source. |
| 46 struct MediaSourceStreamDescriptor { | 48 struct MediaSourceStreamDescriptor { |
| 47 // Zero-based index. | 49 // Zero-based index. |
| 48 uint32 index; | 50 uint32 index; |
| 49 | 51 |
| 50 // Media type of the stream after conversion. | 52 // Media type of the stream after conversion. |
| 51 MediaType media_type; | 53 MediaType media_type; |
| 52 | 54 |
| 53 // Media type of the stream before conversion (as produced by the demux). | 55 // Media type of the stream before conversion (as produced by the demux). |
| 54 MediaType original_media_type; | 56 MediaType original_media_type; |
| 55 }; | 57 }; |
| 56 | 58 |
| 57 // Describes the media source. | 59 // Describes the media source. |
| 58 struct MediaSourceStatus { | 60 struct MediaSourceStatus { |
| 59 // Current state of the source. | 61 // Current state of the source. |
| 60 MediaState state; | 62 MediaState state; |
| 61 | 63 |
| 62 // Describes the media. | 64 // Describes the media. |
| 63 MediaMetadata? metadata; | 65 MediaMetadata? metadata; |
| 64 }; | 66 }; |
| OLD | NEW |