| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 // Demuxes content to produce media streams. | 12 // Demuxes content to produce media streams. |
| 13 interface MediaDemux { | 13 interface MediaDemux { |
| 14 // Special value for GetMetadata version_last_seen parameter to get the | 14 // Special value for GetMetadata version_last_seen parameter to get the |
| 15 // current metadata immediately. | 15 // current metadata immediately. |
| 16 const uint64 kInitialMetadata = 0; | 16 const uint64 kInitialMetadata = 0; |
| 17 | 17 |
| 18 // Describes the demux. | 18 // Describes the demux. |
| 19 Describe() => (array<MediaType> stream_types); | 19 Describe() => (array<MediaType> stream_types); |
| 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 | 23 |
| 24 // Gets the metadata. To get the metadata immediately, call | 24 // Gets the metadata. To get the metadata immediately, call |
| 25 // GetMetadata(kInitialMetadata). To get updates thereafter, pass the version | 25 // GetMetadata(kInitialMetadata). To get updates thereafter, pass the version |
| 26 // sent in the previous callback. | 26 // sent in the previous callback. |
| 27 GetMetadata(uint64 version_last_seen) => | 27 GetMetadata(uint64 version_last_seen) => |
| 28 (uint64 version, MediaMetadata? metadata); | 28 (uint64 version, MediaMetadata? metadata); |
| 29 | 29 |
| 30 // Primes the demux and downstream components. | 30 // Primes the demux and downstream components. |
| 31 Prime() => (); | 31 Prime() => (); |
| 32 | 32 |
| 33 // Flushes the demux and downstream components. | 33 // Flushes the demux and downstream components. |
| 34 Flush() => (); | 34 Flush() => (); |
| 35 | 35 |
| 36 // Seeks to the specified position, specified in nanoseconds. | 36 // Seeks to the specified position, specified in nanoseconds. |
| 37 Seek(int64 position) => (); | 37 Seek(int64 position) => (); |
| 38 }; | 38 }; |
| OLD | NEW |