| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 module mojo; | 5 module mojo; |
| 6 | 6 |
| 7 import "mojo/services/public/interfaces/geometry/geometry.mojom"; | 7 import "mojo/services/public/interfaces/geometry/geometry.mojom"; |
| 8 | 8 |
| 9 // See media/base/buffering_state.h for descriptions. | 9 // See media/base/buffering_state.h for descriptions. |
| 10 // Kept in sync with media::BufferingState via COMPILE_ASSERTs. | 10 // Kept in sync with media::BufferingState via COMPILE_ASSERTs. |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 | 171 |
| 172 // This defines a mojo transport format for media::DecoderBuffer. | 172 // This defines a mojo transport format for media::DecoderBuffer. |
| 173 struct MediaDecoderBuffer { | 173 struct MediaDecoderBuffer { |
| 174 // See media/base/buffers.h for details. | 174 // See media/base/buffers.h for details. |
| 175 int64 timestamp_usec; | 175 int64 timestamp_usec; |
| 176 int64 duration_usec; | 176 int64 duration_usec; |
| 177 | 177 |
| 178 // The number of bytes in |data|. | 178 // The number of bytes in |data|. |
| 179 uint32 data_size; | 179 uint32 data_size; |
| 180 | 180 |
| 181 // Indicates whether or not this buffer is a random access point. |
| 182 bool is_key_frame; |
| 183 |
| 181 // This is backed by an std::vector and results in a few copies. | 184 // This is backed by an std::vector and results in a few copies. |
| 182 // Into the vector, onto and off the MessagePipe, back into a vector. | 185 // Into the vector, onto and off the MessagePipe, back into a vector. |
| 183 array<uint8>? side_data; | 186 array<uint8>? side_data; |
| 184 uint32 side_data_size; | 187 uint32 side_data_size; |
| 185 | 188 |
| 186 // These fields indicate the amount of data to discard after decoding. | 189 // These fields indicate the amount of data to discard after decoding. |
| 187 int64 front_discard_usec; | 190 int64 front_discard_usec; |
| 188 int64 back_discard_usec; | 191 int64 back_discard_usec; |
| 189 | 192 |
| 190 // Indicates this buffer is part of a splice around |splice_timestamp_usec|. | 193 // Indicates this buffer is part of a splice around |splice_timestamp_usec|. |
| 191 int64 splice_timestamp_usec; | 194 int64 splice_timestamp_usec; |
| 192 | 195 |
| 193 // The payload. Invalid handle indicates an end-of-stream (EOS) buffer. | 196 // The payload. Invalid handle indicates an end-of-stream (EOS) buffer. |
| 194 // TODO(tim): This currently results in allocating a new, largeish DataPipe | 197 // TODO(tim): This currently results in allocating a new, largeish DataPipe |
| 195 // for each buffer. Remove this once framed data pipes exist, but using this | 198 // for each buffer. Remove this once framed data pipes exist, but using this |
| 196 // for now for prototyping audio. | 199 // for now for prototyping audio. |
| 197 handle<data_pipe_consumer>? data; | 200 handle<data_pipe_consumer>? data; |
| 198 }; | 201 }; |
| OLD | NEW |