Chromium Code Reviews| 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 media.interfaces; | 5 module media.interfaces; |
| 6 | 6 |
| 7 import "ui/mojo/geometry/geometry.mojom"; | 7 import "ui/mojo/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 static_asserts. | 10 // Kept in sync with media::BufferingState via static_asserts. |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 224 // DecryptConfig for a encrypted buffer. NULL if the buffer is not encrypted. | 224 // DecryptConfig for a encrypted buffer. NULL if the buffer is not encrypted. |
| 225 DecryptConfig? decrypt_config; | 225 DecryptConfig? decrypt_config; |
| 226 | 226 |
| 227 // These fields indicate the amount of data to discard after decoding. | 227 // These fields indicate the amount of data to discard after decoding. |
| 228 int64 front_discard_usec; | 228 int64 front_discard_usec; |
| 229 int64 back_discard_usec; | 229 int64 back_discard_usec; |
| 230 | 230 |
| 231 // Indicates this buffer is part of a splice around |splice_timestamp_usec|. | 231 // Indicates this buffer is part of a splice around |splice_timestamp_usec|. |
| 232 int64 splice_timestamp_usec; | 232 int64 splice_timestamp_usec; |
| 233 }; | 233 }; |
| 234 | |
| 235 // This defines a mojo transport format for media::AudioBuffer. | |
| 236 struct AudioBuffer { | |
| 237 // Format of the audio. | |
| 238 SampleFormat sample_format; | |
| 239 | |
| 240 // How the channels are laid out. | |
| 241 ChannelLayout channel_layout; | |
| 242 | |
| 243 // Number of channels. | |
| 244 int32 channel_count; | |
| 245 | |
| 246 // Sample rate of the buffer. | |
| 247 int32 sample_rate; | |
| 248 | |
| 249 // Number of frames in the buffer. | |
| 250 int32 frame_count; | |
| 251 | |
| 252 // True if end of stream. | |
| 253 bool end_of_stream; | |
| 254 | |
| 255 // Timestamp in microseconds of the first frame. | |
| 256 int64 timestamp_usec; | |
| 257 | |
| 258 // Channel data. | |
| 259 array<uint8>? data; | |
|
xhwang
2015/11/23 22:22:18
"?" makes it nullable. In what case can we have nu
jrummell
2015/11/24 02:37:53
Done.
| |
| 260 }; | |
| 261 | |
| 262 // This defines a mojo transport format for media::VideoFrame. | |
|
xhwang
2015/11/23 22:22:18
Add a TODO to support shared memory based VideoFra
jrummell
2015/11/24 02:37:53
Done.
| |
| 263 struct VideoFrame { | |
| 264 // Format of the decrypted frame. | |
|
xhwang
2015/11/23 22:22:18
"decrypted" not needed as this is a generic VideoF
jrummell
2015/11/24 02:37:53
Done.
| |
| 265 VideoFormat format; | |
| 266 | |
| 267 // Width and height of the video frame, in pixels. | |
| 268 int32 width; | |
| 269 int32 height; | |
|
xhwang
2015/11/23 22:22:18
mojo.Rect coded_size?
"coded" would be consistent
jrummell
2015/11/24 02:37:53
Done.
| |
| 270 | |
| 271 // Visible size of the frame. | |
| 272 int32 visible_width; | |
| 273 int32 visible_height; | |
|
xhwang
2015/11/23 22:22:18
Use mojo.Rect
jrummell
2015/11/24 02:37:53
Done.
| |
| 274 | |
| 275 // Natural size of the frame. | |
| 276 int32 natural_width; | |
| 277 int32 natural_height; | |
|
xhwang
2015/11/23 22:22:18
Use mojo.Rect
jrummell
2015/11/24 02:37:53
It's actually mojo.Size. Done.
| |
| 278 | |
| 279 // True if end of stream. | |
| 280 bool end_of_stream; | |
| 281 | |
| 282 // Timestamp in microseconds of the associated frame. | |
| 283 int64 timestamp_usec; | |
| 284 | |
| 285 // Frame data for each plane. | |
| 286 array<uint8>? y_data; | |
|
xhwang
2015/11/23 22:22:18
ditto about nullable data.
jrummell
2015/11/24 02:37:53
Done.
| |
| 287 array<uint8>? u_data; | |
| 288 array<uint8>? v_data; | |
| 289 }; | |
| OLD | NEW |