Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 module mojo { | |
| 6 | |
| 7 // Buffer state reporting. See media/base/buffering_state.h. | |
| 8 enum BufferingState { | |
| 9 // Indicates that there is no data buffered. | |
| 10 // | |
| 11 // Typical reason is data underflow and hence playback should be paused. | |
| 12 BUFFERING_HAVE_NOTHING, | |
|
darin (slow to review)
2014/09/02 20:51:47
doesn't this mean we end up with BUFFERING_STATE_B
tim (not reviewing)
2014/09/02 21:55:50
Ah yes. Done.
| |
| 13 | |
| 14 // Indicates that enough data has been buffered. | |
| 15 // | |
| 16 // Typical reason is enough data has been prerolled to start playback. | |
| 17 BUFFERING_HAVE_ENOUGH, | |
| 18 }; | |
| 19 | |
| 20 // This defines a mojo transport format for media::DecoderBuffer. | |
| 21 struct MediaDecoderBuffer { | |
| 22 // See media/base/buffers.h for details. | |
| 23 int64 timestamp; | |
| 24 int64 duration; | |
| 25 | |
| 26 // The number of bytes in |data|. | |
| 27 uint32 data_size; | |
| 28 | |
| 29 // This is backed by an std::vector and results in a few copies. | |
| 30 // Into the vector, onto and off the MessagePipe, back into a vector. | |
| 31 uint8[] side_data; | |
| 32 uint32 side_data_size; | |
| 33 | |
| 34 // These fields indicate the amount of data to discard after decoding. | |
| 35 int64 front_discard_usec; | |
| 36 int64 back_discard_usec; | |
| 37 | |
| 38 // Indicates this buffer is part of a splice around |splice_timestamp_|. | |
| 39 int64 splice_timestamp; | |
| 40 | |
| 41 // The payload. | |
| 42 // TODO(tim): This currently results in allocating a new, largeish datapipe | |
| 43 // for each buffer. Remove this once framed data pipes exist, but using this | |
| 44 // for now for prototyping audio. | |
| 45 handle<data_pipe_consumer> data; | |
| 46 }; | |
| 47 | |
| 48 } // module mojo | |
| OLD | NEW |