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 enum BufferingState { | |
8 // Indicates that there is no data buffered. | |
9 // | |
10 // Typical reason is data underflow and hence playback should be paused. | |
11 HAVE_NOTHING, | |
12 | |
13 // Indicates that enough data has been buffered. | |
14 // | |
15 // Typical reason is enough data has been prerolled to start playback. | |
16 HAVE_ENOUGH, | |
17 }; | |
18 | |
19 // This defines a mojo transport format for media::DecoderBuffer. | |
20 struct MediaDecoderBuffer { | |
21 // See media/base/buffers.h for details. | |
22 int64 timestamp; | |
scherkus (not reviewing)
2014/09/02 23:50:20
_usec?
tim (not reviewing)
2014/09/03 00:43:50
Done.
| |
23 int64 duration; | |
xhwang
2014/09/03 00:09:08
s/timestamp/timestamp_usec
s/duration/duration_use
tim (not reviewing)
2014/09/03 00:43:50
Done.
| |
24 | |
25 // The number of bytes in |data|. | |
26 uint32 data_size; | |
27 | |
28 // This is backed by an std::vector and results in a few copies. | |
29 // Into the vector, onto and off the MessagePipe, back into a vector. | |
30 uint8[] side_data; | |
31 uint32 side_data_size; | |
32 | |
33 // These fields indicate the amount of data to discard after decoding. | |
34 int64 front_discard_usec; | |
35 int64 back_discard_usec; | |
36 | |
37 // Indicates this buffer is part of a splice around |splice_timestamp_|. | |
scherkus (not reviewing)
2014/09/02 23:50:20
nit: drop trailing _
tim (not reviewing)
2014/09/03 00:43:50
Done.
| |
38 int64 splice_timestamp; | |
scherkus (not reviewing)
2014/09/02 23:50:20
_usec?
xhwang
2014/09/03 00:09:08
splice_timestamp_usec?
tim (not reviewing)
2014/09/03 00:43:50
Done.
| |
39 | |
40 // The payload. | |
41 // TODO(tim): This currently results in allocating a new, largeish datapipe | |
xhwang
2014/09/03 00:09:08
nit: s/datapipe/DataPipe
tim (not reviewing)
2014/09/03 00:43:50
Done.
| |
42 // for each buffer. Remove this once framed data pipes exist, but using this | |
43 // for now for prototyping audio. | |
44 handle<data_pipe_consumer> data; | |
45 }; | |
46 | |
47 } // module mojo | |
OLD | NEW |