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

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

Issue 1468153003: Define AudioBuffer and VideoFrame for mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: switch statement Created 5 years 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/interfaces/decryptor.mojom ('k') | media/mojo/services/BUILD.gn » ('j') | 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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
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. Will be null for EOS buffers.
259 array<uint8>? data;
260 };
261
262 // This defines a mojo transport format for media::VideoFrame.
263 // TODO(jrummell): Support shared memory based VideoFrame to avoid copying
264 // the data multiple times.
265 struct VideoFrame {
266 // Format of the frame.
267 VideoFormat format;
268
269 // Width and height of the video frame, in pixels.
270 mojo.Size coded_size;
271
272 // Visible size of the frame.
273 mojo.Rect visible_rect;
274
275 // Natural size of the frame.
276 mojo.Size natural_size;
277
278 // True if end of stream.
279 bool end_of_stream;
280
281 // Timestamp in microseconds of the associated frame.
282 int64 timestamp_usec;
283
284 // Frame data for each plane. Will be null for EOS buffers.
285 array<uint8>? y_data;
286 array<uint8>? u_data;
287 array<uint8>? v_data;
288 };
OLDNEW
« no previous file with comments | « media/mojo/interfaces/decryptor.mojom ('k') | media/mojo/services/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698