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

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

Issue 551963004: media: scaffolding and plumbing for MojoRenderer{Impl, Service} (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: media/mojo/interfaces/media_types.mojom
diff --git a/media/mojo/interfaces/media_types.mojom b/media/mojo/interfaces/media_types.mojom
index 007ceb1baec2238cb5e3e4dbcad9292d0a3df5a3..709f8f0bb534258a8bf447b929003cf15ee5dace 100644
--- a/media/mojo/interfaces/media_types.mojom
+++ b/media/mojo/interfaces/media_types.mojom
@@ -4,18 +4,98 @@
module mojo {
+// See media/base/buffering_state.h for descriptions.
+// Kept in sync with media::BufferingState via COMPILE_ASSERTs.
scherkus (not reviewing) 2014/09/09 20:35:32 mojo development question: is it perhaps better to
tim (not reviewing) 2014/09/10 23:08:28 I asked an analogous question to mojo-dev about st
enum BufferingState {
- // Indicates that there is no data buffered.
- //
- // Typical reason is data underflow and hence playback should be paused.
HAVE_NOTHING,
-
- // Indicates that enough data has been buffered.
- //
- // Typical reason is enough data has been prerolled to start playback.
HAVE_ENOUGH,
};
+// See media/base/audio_decoder_config.h for descriptions.
+// Kept in sync with media::AudioCodec via COMPILE_ASSERTs.
+enum AudioCodec {
+ UNKNOWN = 0,
+ AAC = 1,
+ MP3 = 2,
+ PCM = 3,
+ Vorbis = 4,
+ FLAC = 5,
+ AMR_NB = 6,
+ AMR_WB = 7,
+ PCM_MULAW = 8,
+ GSM_MS = 9,
+ PCM_S16BE = 10,
+ PCM_S24BE = 11,
+ Opus = 12,
+ // EAC3 = 13,
+ PCM_ALAW = 14,
+ MAX = PCM_ALAW,
+};
+
+// See media/base/channel_layout.h for descriptions.
+// Kept in sync with media::ChannelLayout via COMPILE_ASSERTs.
+// TODO(tim): The bindings generators will always prepend the enum name, should
+// mojom therefore allow enum values starting with numbers?
scherkus (not reviewing) 2014/09/09 20:35:32 good question ... yeah this seems kind of gross
+enum ChannelLayout {
+ k_NONE = 0,
+ k_UNSUPPORTED = 1,
+ k_MONO = 2,
+ k_STEREO = 3,
+ k_2_1 = 4,
+ k_SURROUND = 5,
+ k_4_0 = 6,
+ k_2_2 = 7,
+ k_QUAD = 8,
+ k_5_0 = 9,
+ k_5_1 = 10,
+ k_5_0_BACK = 11,
+ k_5_1_BACK = 12,
+ k_7_0 = 13,
+ k_7_1 = 14,
+ k_7_1_WIDE = 15,
+ k_STEREO_DOWNMIX = 16,
+ k_2POINT1 = 17,
+ k_3_1 = 18,
+ k_4_1 = 19,
+ k_6_0 = 20,
+ k_6_0_FRONT = 21,
+ k_HEXAGONAL = 22,
+ k_6_1 = 23,
+ k_6_1_BACK = 24,
+ k_6_1_FRONT = 25,
+ k_7_0_FRONT = 26,
+ k_7_1_WIDE_BACK = 27,
+ k_OCTAGONAL = 28,
+ k_DISCRETE = 29,
+ k_STEREO_AND_KEYBOARD_MIC = 30,
+ k_MAX = k_STEREO_AND_KEYBOARD_MIC
+};
+
+// See media/base/sample_format.h for descriptions.
+// Kept in sync with media::SampleFormat via COMPILE_ASSERTs.
+enum SampleFormat {
+ UNKNOWN = 0,
+ U8,
+ S16,
+ S32,
+ F32,
+ PlanarS16,
+ PlanarF32,
+ Max = PlanarF32,
+};
+
+// This defines a mojo transport format for media::AudioDecoderConfig.
+// See media/base/audio_decoder_config.h for descriptions.
+struct AudioDecoderConfig {
+ AudioCodec codec;
+ SampleFormat sample_format;
+ ChannelLayout channel_layout;
+ int32 samples_per_second;
+ uint8[]? extra_data;
+ int64 seek_preroll_usec;
+ int32 codec_delay;
+};
xhwang 2014/09/10 00:00:52 I understand these are required to serialize a med
tim (not reviewing) 2014/09/10 23:08:28 Hm, well, the only real point to using mojo is tha
+
// This defines a mojo transport format for media::DecoderBuffer.
struct MediaDecoderBuffer {
// See media/base/buffers.h for details.

Powered by Google App Engine
This is Rietveld 408576698