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_common.mojom"; | 8 import "mojo/services/media/common/interfaces/media_common.mojom"; |
9 import "mojo/services/media/common/interfaces/media_types.mojom"; | 9 import "mojo/services/media/common/interfaces/media_types.mojom"; |
10 | 10 |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 const uint64 kMaxBufferLen = 0x3FFFFFFFFFFFFFFF; | 112 const uint64 kMaxBufferLen = 0x3FFFFFFFFFFFFFFF; |
113 | 113 |
114 // An enumeration used to indicate the ultimate fate of packets sent across | 114 // An enumeration used to indicate the ultimate fate of packets sent across |
115 // the pipe using the SendPacket method. | 115 // the pipe using the SendPacket method. |
116 enum SendResult { | 116 enum SendResult { |
117 CONSUMED, // Media was completely consumed. | 117 CONSUMED, // Media was completely consumed. |
118 FLUSHED, // Some or all of the media was flushed before being consumed. | 118 FLUSHED, // Some or all of the media was flushed before being consumed. |
119 }; | 119 }; |
120 | 120 |
121 // Sets the shared buffer in which packet payload will be located. | 121 // Sets the shared buffer in which packet payload will be located. |
122 SetBuffer(handle<shared_buffer> buffer, uint64 size) => (); | 122 SetBuffer(handle<shared_buffer> buffer) => (); |
123 | 123 |
124 // Sends a packet to the consumer. The callback signals that the consumer | 124 // Sends a packet to the consumer. The callback signals that the consumer |
125 // is done with the packet buffer region. | 125 // is done with the packet buffer region. |
126 SendPacket(MediaPacket packet) => (SendResult result); | 126 SendPacket(MediaPacket packet) => (SendResult result); |
127 | 127 |
128 // Primes the stream. The callback signals that the prime operation is | 128 // Primes the stream. The callback signals that the prime operation is |
129 // complete. | 129 // complete. |
130 Prime() => (); | 130 Prime() => (); |
131 | 131 |
132 // Flushes the stream. The callback signals that the flush operation is | 132 // Flushes the stream. The callback signals that the flush operation is |
133 // complete. | 133 // complete. |
134 Flush() => (); | 134 Flush() => (); |
135 }; | 135 }; |
OLD | NEW |