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

Unified Diff: media/mojo/interfaces/media_types.mojom

Issue 491733004: media: add basic MediaRenderer mojom and TypeConverters (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: mojo > media Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/mojo/interfaces/media_renderer.mojom ('k') | media/mojo/services/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/interfaces/media_types.mojom
diff --git a/media/mojo/interfaces/media_types.mojom b/media/mojo/interfaces/media_types.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..a4c2d57a4a77ad43d232f544cb3014f6fc07f583
--- /dev/null
+++ b/media/mojo/interfaces/media_types.mojom
@@ -0,0 +1,48 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+module mojo {
+
+// Buffer state reporting. See media/base/buffering_state.h.
+enum BufferingState {
+ // Indicates that there is no data buffered.
+ //
+ // Typical reason is data underflow and hence playback should be paused.
+ BUFFERING_HAVE_NOTHING,
darin (slow to review) 2014/09/02 20:51:47 doesn't this mean we end up with BUFFERING_STATE_B
tim (not reviewing) 2014/09/02 21:55:50 Ah yes. Done.
+
+ // Indicates that enough data has been buffered.
+ //
+ // Typical reason is enough data has been prerolled to start playback.
+ BUFFERING_HAVE_ENOUGH,
+};
+
+// This defines a mojo transport format for media::DecoderBuffer.
+struct MediaDecoderBuffer {
+ // See media/base/buffers.h for details.
+ int64 timestamp;
+ int64 duration;
+
+ // The number of bytes in |data|.
+ uint32 data_size;
+
+ // This is backed by an std::vector and results in a few copies.
+ // Into the vector, onto and off the MessagePipe, back into a vector.
+ uint8[] side_data;
+ uint32 side_data_size;
+
+ // These fields indicate the amount of data to discard after decoding.
+ int64 front_discard_usec;
+ int64 back_discard_usec;
+
+ // Indicates this buffer is part of a splice around |splice_timestamp_|.
+ int64 splice_timestamp;
+
+ // The payload.
+ // TODO(tim): This currently results in allocating a new, largeish datapipe
+ // for each buffer. Remove this once framed data pipes exist, but using this
+ // for now for prototyping audio.
+ handle<data_pipe_consumer> data;
+};
+
+} // module mojo
« no previous file with comments | « media/mojo/interfaces/media_renderer.mojom ('k') | media/mojo/services/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698