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

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

Issue 2411573002: media: Use new wrapper types for media mojo interfaces (Closed)
Patch Set: comments addressed Created 4 years, 2 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
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.mojom; 5 module media.mojom;
6 6
7 import "ui/gfx/geometry/mojo/geometry.mojom"; 7 import "ui/gfx/geometry/mojo/geometry.mojom";
8 import "mojo/common/common_custom_types.mojom"; 8 import "mojo/common/common_custom_types.mojom";
9 9
10 // See media/base/buffering_state.h for descriptions. 10 // See media/base/buffering_state.h for descriptions.
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 Pattern pattern; 213 Pattern pattern;
214 }; 214 };
215 215
216 // This defines a mojo transport format for media::AudioDecoderConfig. 216 // This defines a mojo transport format for media::AudioDecoderConfig.
217 // See media/base/audio_decoder_config.h for descriptions. 217 // See media/base/audio_decoder_config.h for descriptions.
218 struct AudioDecoderConfig { 218 struct AudioDecoderConfig {
219 AudioCodec codec; 219 AudioCodec codec;
220 SampleFormat sample_format; 220 SampleFormat sample_format;
221 ChannelLayout channel_layout; 221 ChannelLayout channel_layout;
222 int32 samples_per_second; 222 int32 samples_per_second;
223 array<uint8>? extra_data; 223 array<uint8> extra_data;
224 mojo.common.mojom.TimeDelta seek_preroll; 224 mojo.common.mojom.TimeDelta seek_preroll;
225 int32 codec_delay; 225 int32 codec_delay;
226 EncryptionScheme encryption_scheme; 226 EncryptionScheme encryption_scheme;
227 }; 227 };
228 228
229 // This defines a mojo transport format for media::VideoDecoderConfig. 229 // This defines a mojo transport format for media::VideoDecoderConfig.
230 // See media/base/video_decoder_config.h for descriptions. 230 // See media/base/video_decoder_config.h for descriptions.
231 struct VideoDecoderConfig { 231 struct VideoDecoderConfig {
232 VideoCodec codec; 232 VideoCodec codec;
233 VideoCodecProfile profile; 233 VideoCodecProfile profile;
234 VideoFormat format; 234 VideoFormat format;
235 ColorSpace color_space; 235 ColorSpace color_space;
236 gfx.mojom.Size coded_size; 236 gfx.mojom.Size coded_size;
237 gfx.mojom.Rect visible_rect; 237 gfx.mojom.Rect visible_rect;
238 gfx.mojom.Size natural_size; 238 gfx.mojom.Size natural_size;
239 array<uint8>? extra_data; 239 array<uint8> extra_data;
240 EncryptionScheme encryption_scheme; 240 EncryptionScheme encryption_scheme;
241 }; 241 };
242 242
243 // Native struct media::SubsampleEntry; 243 // Native struct media::SubsampleEntry;
244 [Native] 244 [Native]
245 struct SubsampleEntry; 245 struct SubsampleEntry;
246 246
247 // This defines a mojo transport format for media::DecryptConfig. 247 // This defines a mojo transport format for media::DecryptConfig.
248 // See media/base/decrypt_config.h for descriptions. 248 // See media/base/decrypt_config.h for descriptions.
249 struct DecryptConfig { 249 struct DecryptConfig {
250 string key_id; 250 string key_id;
251 string iv; 251 string iv;
252 array<SubsampleEntry> subsamples; 252 array<SubsampleEntry> subsamples;
253 }; 253 };
254 254
255 // This defines a mojo transport format for media::DecoderBuffer. 255 // This defines a mojo transport format for media::DecoderBuffer.
256 struct DecoderBuffer { 256 struct DecoderBuffer {
257 mojo.common.mojom.TimeDelta timestamp; 257 mojo.common.mojom.TimeDelta timestamp;
258 mojo.common.mojom.TimeDelta duration; 258 mojo.common.mojom.TimeDelta duration;
259 259
260 // The number of bytes present in this buffer. The data is not serialized 260 // The number of bytes present in this buffer. The data is not serialized
261 // along with this structure and must be read from a separate DataPipe. 261 // along with this structure and must be read from a separate DataPipe.
262 uint32 data_size; 262 uint32 data_size;
263 263
264 // Indicates whether or not this buffer is a random access point. 264 // Indicates whether or not this buffer is a random access point.
265 bool is_key_frame; 265 bool is_key_frame;
266 266
267 // This is backed by an std::vector and results in a few copies. 267 // Empty when |side_data| doesn't exist.
268 // Into the vector, onto and off the MessagePipe, back into a vector. 268 array<uint8> side_data;
269 array<uint8>? side_data;
270 269
271 // DecryptConfig for a encrypted buffer. NULL if the buffer is not encrypted. 270 // DecryptConfig for a encrypted buffer. NULL if the buffer is not encrypted.
272 DecryptConfig? decrypt_config; 271 DecryptConfig? decrypt_config;
273 272
274 // These fields indicate the amount of data to discard after decoding. 273 // These fields indicate the amount of data to discard after decoding.
275 mojo.common.mojom.TimeDelta front_discard; 274 mojo.common.mojom.TimeDelta front_discard;
276 mojo.common.mojom.TimeDelta back_discard; 275 mojo.common.mojom.TimeDelta back_discard;
277 276
278 // Indicates this buffer is part of a splice around |splice_timestamp|. 277 // Indicates this buffer is part of a splice around |splice_timestamp|.
279 mojo.common.mojom.TimeDelta splice_timestamp; 278 mojo.common.mojom.TimeDelta splice_timestamp;
(...skipping 15 matching lines...) Expand all
295 294
296 // Number of frames in the buffer. 295 // Number of frames in the buffer.
297 int32 frame_count; 296 int32 frame_count;
298 297
299 // True if end of stream. 298 // True if end of stream.
300 bool end_of_stream; 299 bool end_of_stream;
301 300
302 // Timestamp in microseconds of the first frame. 301 // Timestamp in microseconds of the first frame.
303 mojo.common.mojom.TimeDelta timestamp; 302 mojo.common.mojom.TimeDelta timestamp;
304 303
305 // Channel data. Will be null for EOS buffers. 304 // Channel data. Will be empty for EOS buffers.
306 array<uint8>? data; 305 array<uint8> data;
307 }; 306 };
308 307
309 // This defines a mojo transport format for media::VideoFrame. 308 // This defines a mojo transport format for media::VideoFrame.
310 struct VideoFrame { 309 struct VideoFrame {
311 // Format of the frame. 310 // Format of the frame.
312 VideoFormat format; 311 VideoFormat format;
313 312
314 // Width and height of the video frame, in pixels. 313 // Width and height of the video frame, in pixels.
315 gfx.mojom.Size coded_size; 314 gfx.mojom.Size coded_size;
316 315
(...skipping 24 matching lines...) Expand all
341 }; 340 };
342 341
343 struct PipelineStatistics { 342 struct PipelineStatistics {
344 uint64 audio_bytes_decoded; 343 uint64 audio_bytes_decoded;
345 uint64 video_bytes_decoded; 344 uint64 video_bytes_decoded;
346 uint32 video_frames_decoded; 345 uint32 video_frames_decoded;
347 uint32 video_frames_dropped; 346 uint32 video_frames_dropped;
348 int64 audio_memory_usage; 347 int64 audio_memory_usage;
349 int64 video_memory_usage; 348 int64 video_memory_usage;
350 }; 349 };
OLDNEW
« no previous file with comments | « media/mojo/interfaces/decryptor.mojom ('k') | media/mojo/interfaces/platform_verification.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698