Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(675)

Side by Side Diff: media/mojo/interfaces/media_types.mojom

Issue 1769673002: Transfer media::VideoFrame using mojo shared memory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/mojo/common/mojo_shared_buffer_video_frame.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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.
271 struct VideoFrame { 269 struct VideoFrame {
272 // Format of the frame. 270 // Format of the frame.
273 VideoFormat format; 271 VideoFormat format;
274 272
275 // Width and height of the video frame, in pixels. 273 // Width and height of the video frame, in pixels.
276 mojo.Size coded_size; 274 mojo.Size coded_size;
277 275
278 // Visible size of the frame. 276 // Visible size of the frame.
279 mojo.Rect visible_rect; 277 mojo.Rect visible_rect;
280 278
281 // Natural size of the frame. 279 // Natural size of the frame.
282 mojo.Size natural_size; 280 mojo.Size natural_size;
283 281
284 // True if end of stream. 282 // True if end of stream.
285 bool end_of_stream; 283 bool end_of_stream;
286 284
287 // Timestamp in microseconds of the associated frame. 285 // Timestamp in microseconds of the associated frame.
288 int64 timestamp_usec; 286 int64 timestamp_usec;
289 287
290 // Frame data for each plane. Will be null for EOS buffers. 288 // Reference to the shared memory containing the frame's data.
291 array<uint8>? y_data; 289 handle<shared_buffer> frame_data;
292 array<uint8>? u_data; 290 uint64 frame_data_size;
293 array<uint8>? v_data; 291
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;
294 }; 300 };
OLDNEW
« no previous file with comments | « media/mojo/common/mojo_shared_buffer_video_frame.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698