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

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

Issue 2240213003: Update media mojom files to use TimeDelta instead of int64 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@OnDurationChanged_CL
Patch Set: Created 4 years, 4 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/interfaces/BUILD.gn ('k') | media/mojo/interfaces/renderer.mojom » ('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.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 9
9 // See media/base/buffering_state.h for descriptions. 10 // See media/base/buffering_state.h for descriptions.
10 // Kept in sync with media::BufferingState via static_asserts. 11 // Kept in sync with media::BufferingState via static_asserts.
11 enum BufferingState { 12 enum BufferingState {
12 HAVE_NOTHING, 13 HAVE_NOTHING,
13 HAVE_ENOUGH, 14 HAVE_ENOUGH,
14 }; 15 };
15 16
16 // See media/base/decode_status.h for descriptions. 17 // See media/base/decode_status.h for descriptions.
17 // Kept in sync with media::DecodeStatus via static_asserts. 18 // Kept in sync with media::DecodeStatus via static_asserts.
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 }; 209 };
209 210
210 // This defines a mojo transport format for media::AudioDecoderConfig. 211 // This defines a mojo transport format for media::AudioDecoderConfig.
211 // See media/base/audio_decoder_config.h for descriptions. 212 // See media/base/audio_decoder_config.h for descriptions.
212 struct AudioDecoderConfig { 213 struct AudioDecoderConfig {
213 AudioCodec codec; 214 AudioCodec codec;
214 SampleFormat sample_format; 215 SampleFormat sample_format;
215 ChannelLayout channel_layout; 216 ChannelLayout channel_layout;
216 int32 samples_per_second; 217 int32 samples_per_second;
217 array<uint8>? extra_data; 218 array<uint8>? extra_data;
218 int64 seek_preroll_usec; 219 mojo.common.mojom.TimeDelta seek_preroll;
219 int32 codec_delay; 220 int32 codec_delay;
220 EncryptionScheme encryption_scheme; 221 EncryptionScheme encryption_scheme;
221 }; 222 };
222 223
223 // This defines a mojo transport format for media::VideoDecoderConfig. 224 // This defines a mojo transport format for media::VideoDecoderConfig.
224 // See media/base/video_decoder_config.h for descriptions. 225 // See media/base/video_decoder_config.h for descriptions.
225 struct VideoDecoderConfig { 226 struct VideoDecoderConfig {
226 VideoCodec codec; 227 VideoCodec codec;
227 VideoCodecProfile profile; 228 VideoCodecProfile profile;
228 VideoFormat format; 229 VideoFormat format;
(...skipping 15 matching lines...) Expand all
244 // This defines a mojo transport format for media::DecryptConfig. 245 // This defines a mojo transport format for media::DecryptConfig.
245 // See media/base/decrypt_config.h for descriptions. 246 // See media/base/decrypt_config.h for descriptions.
246 struct DecryptConfig { 247 struct DecryptConfig {
247 string key_id; 248 string key_id;
248 string iv; 249 string iv;
249 array<SubsampleEntry> subsamples; 250 array<SubsampleEntry> subsamples;
250 }; 251 };
251 252
252 // This defines a mojo transport format for media::DecoderBuffer. 253 // This defines a mojo transport format for media::DecoderBuffer.
253 struct DecoderBuffer { 254 struct DecoderBuffer {
254 int64 timestamp_usec; 255 mojo.common.mojom.TimeDelta timestamp;
255 int64 duration_usec; 256 mojo.common.mojom.TimeDelta duration;
256 257
257 // The number of bytes present in this buffer. The data is not serialized 258 // The number of bytes present in this buffer. The data is not serialized
258 // along with this structure and must be read from a separate DataPipe. 259 // along with this structure and must be read from a separate DataPipe.
259 uint32 data_size; 260 uint32 data_size;
260 261
261 // Indicates whether or not this buffer is a random access point. 262 // Indicates whether or not this buffer is a random access point.
262 bool is_key_frame; 263 bool is_key_frame;
263 264
264 // This is backed by an std::vector and results in a few copies. 265 // This is backed by an std::vector and results in a few copies.
265 // Into the vector, onto and off the MessagePipe, back into a vector. 266 // Into the vector, onto and off the MessagePipe, back into a vector.
266 array<uint8>? side_data; 267 array<uint8>? side_data;
267 268
268 // DecryptConfig for a encrypted buffer. NULL if the buffer is not encrypted. 269 // DecryptConfig for a encrypted buffer. NULL if the buffer is not encrypted.
269 DecryptConfig? decrypt_config; 270 DecryptConfig? decrypt_config;
270 271
271 // These fields indicate the amount of data to discard after decoding. 272 // These fields indicate the amount of data to discard after decoding.
272 int64 front_discard_usec; 273 mojo.common.mojom.TimeDelta front_discard;
273 int64 back_discard_usec; 274 mojo.common.mojom.TimeDelta back_discard;
274 275
275 // Indicates this buffer is part of a splice around |splice_timestamp_usec|. 276 // Indicates this buffer is part of a splice around |splice_timestamp|.
276 int64 splice_timestamp_usec; 277 mojo.common.mojom.TimeDelta splice_timestamp;
277 }; 278 };
278 279
279 // This defines a mojo transport format for media::AudioBuffer. 280 // This defines a mojo transport format for media::AudioBuffer.
280 struct AudioBuffer { 281 struct AudioBuffer {
281 // Format of the audio. 282 // Format of the audio.
282 SampleFormat sample_format; 283 SampleFormat sample_format;
283 284
284 // How the channels are laid out. 285 // How the channels are laid out.
285 ChannelLayout channel_layout; 286 ChannelLayout channel_layout;
286 287
287 // Number of channels. 288 // Number of channels.
288 int32 channel_count; 289 int32 channel_count;
289 290
290 // Sample rate of the buffer. 291 // Sample rate of the buffer.
291 int32 sample_rate; 292 int32 sample_rate;
292 293
293 // Number of frames in the buffer. 294 // Number of frames in the buffer.
294 int32 frame_count; 295 int32 frame_count;
295 296
296 // True if end of stream. 297 // True if end of stream.
297 bool end_of_stream; 298 bool end_of_stream;
298 299
299 // Timestamp in microseconds of the first frame. 300 // Timestamp in microseconds of the first frame.
300 int64 timestamp_usec; 301 mojo.common.mojom.TimeDelta timestamp;
301 302
302 // Channel data. Will be null for EOS buffers. 303 // Channel data. Will be null for EOS buffers.
303 array<uint8>? data; 304 array<uint8>? data;
304 }; 305 };
305 306
306 // This defines a mojo transport format for media::VideoFrame. 307 // This defines a mojo transport format for media::VideoFrame.
307 struct VideoFrame { 308 struct VideoFrame {
308 // Format of the frame. 309 // Format of the frame.
309 VideoFormat format; 310 VideoFormat format;
310 311
311 // Width and height of the video frame, in pixels. 312 // Width and height of the video frame, in pixels.
312 gfx.mojom.Size coded_size; 313 gfx.mojom.Size coded_size;
313 314
314 // Visible size of the frame. 315 // Visible size of the frame.
315 gfx.mojom.Rect visible_rect; 316 gfx.mojom.Rect visible_rect;
316 317
317 // Natural size of the frame. 318 // Natural size of the frame.
318 gfx.mojom.Size natural_size; 319 gfx.mojom.Size natural_size;
319 320
320 // True if end of stream. 321 // True if end of stream.
321 bool end_of_stream; 322 bool end_of_stream;
322 323
323 // Timestamp in microseconds of the associated frame. 324 // Timestamp in microseconds of the associated frame.
324 int64 timestamp_usec; 325 mojo.common.mojom.TimeDelta timestamp;
325 326
326 // Reference to the shared memory containing the frame's data. 327 // Reference to the shared memory containing the frame's data.
327 handle<shared_buffer> frame_data; 328 handle<shared_buffer> frame_data;
328 uint64 frame_data_size; 329 uint64 frame_data_size;
329 330
330 // Stride and offsets for each plane. Offsets are relative to the start 331 // Stride and offsets for each plane. Offsets are relative to the start
331 // of |frame_data|. 332 // of |frame_data|.
332 int32 y_stride; 333 int32 y_stride;
333 int32 u_stride; 334 int32 u_stride;
334 int32 v_stride; 335 int32 v_stride;
335 uint64 y_offset; 336 uint64 y_offset;
336 uint64 u_offset; 337 uint64 u_offset;
337 uint64 v_offset; 338 uint64 v_offset;
338 }; 339 };
339 340
340 struct PipelineStatistics { 341 struct PipelineStatistics {
341 uint64 audio_bytes_decoded; 342 uint64 audio_bytes_decoded;
342 uint64 video_bytes_decoded; 343 uint64 video_bytes_decoded;
343 uint32 video_frames_decoded; 344 uint32 video_frames_decoded;
344 uint32 video_frames_dropped; 345 uint32 video_frames_dropped;
345 int64 audio_memory_usage; 346 int64 audio_memory_usage;
346 int64 video_memory_usage; 347 int64 video_memory_usage;
347 }; 348 };
OLDNEW
« no previous file with comments | « media/mojo/interfaces/BUILD.gn ('k') | media/mojo/interfaces/renderer.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698