Chromium Code Reviews| Index: media/mojo/interfaces/media_types.mojom |
| diff --git a/media/mojo/interfaces/media_types.mojom b/media/mojo/interfaces/media_types.mojom |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..043de5bc8625dafdc805e4c45a4dff03f968c71a |
| --- /dev/null |
| +++ b/media/mojo/interfaces/media_types.mojom |
| @@ -0,0 +1,47 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +module mojo { |
| + |
| +enum BufferingState { |
| + // Indicates that there is no data buffered. |
| + // |
| + // Typical reason is data underflow and hence playback should be paused. |
| + HAVE_NOTHING, |
| + |
| + // Indicates that enough data has been buffered. |
| + // |
| + // Typical reason is enough data has been prerolled to start playback. |
| + HAVE_ENOUGH, |
| +}; |
| + |
| +// This defines a mojo transport format for media::DecoderBuffer. |
| +struct MediaDecoderBuffer { |
| + // See media/base/buffers.h for details. |
| + int64 timestamp; |
|
scherkus (not reviewing)
2014/09/02 23:50:20
_usec?
tim (not reviewing)
2014/09/03 00:43:50
Done.
|
| + 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.
|
| + |
| + // The number of bytes in |data|. |
| + uint32 data_size; |
| + |
| + // This is backed by an std::vector and results in a few copies. |
| + // Into the vector, onto and off the MessagePipe, back into a vector. |
| + uint8[] side_data; |
| + uint32 side_data_size; |
| + |
| + // These fields indicate the amount of data to discard after decoding. |
| + int64 front_discard_usec; |
| + int64 back_discard_usec; |
| + |
| + // 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.
|
| + 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.
|
| + |
| + // The payload. |
| + // 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.
|
| + // for each buffer. Remove this once framed data pipes exist, but using this |
| + // for now for prototyping audio. |
| + handle<data_pipe_consumer> data; |
| +}; |
| + |
| +} // module mojo |