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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 bool end_of_stream; | 259 bool end_of_stream; |
260 | 260 |
261 // Timestamp in microseconds of the first frame. | 261 // Timestamp in microseconds of the first frame. |
262 int64 timestamp_usec; | 262 int64 timestamp_usec; |
263 | 263 |
264 // Channel data. Will be null for EOS buffers. | 264 // Channel data. Will be null for EOS buffers. |
265 array<uint8>? data; | 265 array<uint8>? data; |
266 }; | 266 }; |
267 | 267 |
268 // This defines a mojo transport format for media::VideoFrame. | 268 // This defines a mojo transport format for media::VideoFrame. |
| 269 // TODO(jrummell): Support shared memory based VideoFrame to avoid copying |
| 270 // the data multiple times. |
269 struct VideoFrame { | 271 struct VideoFrame { |
270 // Format of the frame. | 272 // Format of the frame. |
271 VideoFormat format; | 273 VideoFormat format; |
272 | 274 |
273 // Width and height of the video frame, in pixels. | 275 // Width and height of the video frame, in pixels. |
274 mojo.Size coded_size; | 276 mojo.Size coded_size; |
275 | 277 |
276 // Visible size of the frame. | 278 // Visible size of the frame. |
277 mojo.Rect visible_rect; | 279 mojo.Rect visible_rect; |
278 | 280 |
279 // Natural size of the frame. | 281 // Natural size of the frame. |
280 mojo.Size natural_size; | 282 mojo.Size natural_size; |
281 | 283 |
282 // True if end of stream. | 284 // True if end of stream. |
283 bool end_of_stream; | 285 bool end_of_stream; |
284 | 286 |
285 // Timestamp in microseconds of the associated frame. | 287 // Timestamp in microseconds of the associated frame. |
286 int64 timestamp_usec; | 288 int64 timestamp_usec; |
287 | 289 |
288 // Reference to the shared memory containing the frame's data. | 290 // Frame data for each plane. Will be null for EOS buffers. |
289 handle<shared_buffer> frame_data; | 291 array<uint8>? y_data; |
290 uint64 frame_data_size; | 292 array<uint8>? u_data; |
291 | 293 array<uint8>? v_data; |
292 // Stride and offsets for each plane. Offsets are relative to the start | |
293 // of |frame_data|. | |
294 int32 y_stride; | |
295 int32 u_stride; | |
296 int32 v_stride; | |
297 int32 y_offset; | |
298 int32 u_offset; | |
299 int32 v_offset; | |
300 }; | 294 }; |
OLD | NEW |