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

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

Issue 1896883002: Mojo interfaces needed for switching audio rendering stream creation and closing from IPC to Mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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/BUILD.gn ('k') | media/mojo/interfaces/mojo_bindings.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/interfaces/audio_output.mojom
diff --git a/media/mojo/interfaces/audio_output.mojom b/media/mojo/interfaces/audio_output.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..1867766bf365c01bad6a2629213dc4c5e6d920c6
--- /dev/null
+++ b/media/mojo/interfaces/audio_output.mojom
@@ -0,0 +1,146 @@
+// Copyright 2015 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 content.mojom;
+
+struct AudioOutputStreamParameters {
+
+ enum Format {
+ AUDIO_PCM_LINEAR = 0, // PCM is 'raw' amplitude samples.
+ AUDIO_PCM_LOW_LATENCY, // Linear PCM, low latency requested.
+ AUDIO_FAKE, // Creates a fake AudioOutputStream object.
+ AUDIO_FORMAT_LAST = AUDIO_FAKE, // Only used for validation of format.
+ };
+
+ // Enumerates the various representations of the ordering of audio channels.
+ // Logged to UMA, so never reuse a value, always add new/greater ones!
+ enum ChannelLayout {
+ CHANNEL_LAYOUT_NONE = 0,
+ CHANNEL_LAYOUT_UNSUPPORTED = 1,
+
+ // Front C
+ CHANNEL_LAYOUT_MONO = 2,
+
+ // Front L, Front R
+ CHANNEL_LAYOUT_STEREO = 3,
+
+ // Front L, Front R, Back C
+ CHANNEL_LAYOUT_2_1 = 4,
+
+ // Front L, Front R, Front C
+ CHANNEL_LAYOUT_SURROUND = 5,
+
+ // Front L, Front R, Front C, Back C
+ CHANNEL_LAYOUT_4_0 = 6,
+
+ // Front L, Front R, Side L, Side R
+ CHANNEL_LAYOUT_2_2 = 7,
+
+ // Front L, Front R, Back L, Back R
+ CHANNEL_LAYOUT_QUAD = 8,
+
+ // Front L, Front R, Front C, Side L, Side R
+ CHANNEL_LAYOUT_5_0 = 9,
+
+ // Front L, Front R, Front C, LFE, Side L, Side R
+ CHANNEL_LAYOUT_5_1 = 10,
+
+ // Front L, Front R, Front C, Back L, Back R
+ CHANNEL_LAYOUT_5_0_BACK = 11,
+
+ // Front L, Front R, Front C, LFE, Back L, Back R
+ CHANNEL_LAYOUT_5_1_BACK = 12,
+
+ // Front L, Front R, Front C, Side L, Side R, Back L, Back R
+ CHANNEL_LAYOUT_7_0 = 13,
+
+ // Front L, Front R, Front C, LFE, Side L, Side R, Back L, Back R
+ CHANNEL_LAYOUT_7_1 = 14,
+
+ // Front L, Front R, Front C, LFE, Side L, Side R, Front LofC, Front RofC
+ CHANNEL_LAYOUT_7_1_WIDE = 15,
+
+ // Stereo L, Stereo R
+ CHANNEL_LAYOUT_STEREO_DOWNMIX = 16,
+
+ // Stereo L, Stereo R, LFE
+ CHANNEL_LAYOUT_2POINT1 = 17,
+
+ // Stereo L, Stereo R, Front C, LFE
+ CHANNEL_LAYOUT_3_1 = 18,
+
+ // Stereo L, Stereo R, Front C, Rear C, LFE
+ CHANNEL_LAYOUT_4_1 = 19,
+
+ // Stereo L, Stereo R, Front C, Side L, Side R, Back C
+ CHANNEL_LAYOUT_6_0 = 20,
+
+ // Stereo L, Stereo R, Side L, Side R, Front LofC, Front RofC
+ CHANNEL_LAYOUT_6_0_FRONT = 21,
+
+ // Stereo L, Stereo R, Front C, Rear L, Rear R, Rear C
+ CHANNEL_LAYOUT_HEXAGONAL = 22,
+
+ // Stereo L, Stereo R, Front C, LFE, Side L, Side R, Rear Center
+ CHANNEL_LAYOUT_6_1 = 23,
+
+ // Stereo L, Stereo R, Front C, LFE, Back L, Back R, Rear Center
+ CHANNEL_LAYOUT_6_1_BACK = 24,
+
+ // Stereo L, Stereo R, Side L, Side R, Front LofC, Front RofC, LFE
+ CHANNEL_LAYOUT_6_1_FRONT = 25,
+
+ // Front L, Front R, Front C, Side L, Side R, Front LofC, Front RofC
+ CHANNEL_LAYOUT_7_0_FRONT = 26,
+
+ // Front L, Front R, Front C, LFE, Back L, Back R, Front LofC, Front RofC
+ CHANNEL_LAYOUT_7_1_WIDE_BACK = 27,
+
+ // Front L, Front R, Front C, Side L, Side R, Rear L, Back R, Back C.
+ CHANNEL_LAYOUT_OCTAGONAL = 28,
+
+ // Channels are not explicitly mapped to speakers.
+ CHANNEL_LAYOUT_DISCRETE = 29,
+
+ // Front L, Front R, Front C. Front C contains the keyboard mic audio. This
+ // layout is only intended for input for WebRTC. The Front C channel
+ // is stripped away in the WebRTC audio input pipeline and never seen outside
Henrik Grunell 2016/04/19 15:36:08 Nit: 80 chars.
rchtara 2016/04/21 09:10:17 Done.
+ // of that.
+ CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC = 30,
+
+ // Front L, Front R, Side L, Side R, LFE
+ CHANNEL_LAYOUT_4_1_QUAD_SIDE = 31,
+
+ // Max value, must always equal the largest entry ever logged.
+ CHANNEL_LAYOUT_MAX = CHANNEL_LAYOUT_4_1_QUAD_SIDE
+ };
+
+
+ Format format_; // Format of the stream.
+ ChannelLayout channel_layout_; // Order of surround sound channels.
+ int32 channels_; // Number of channels. Value set based on
Henrik Grunell 2016/04/19 15:36:08 Align the comments.
rchtara 2016/04/21 09:10:17 Done.
+ // |channel_layout|.
+ int32 sample_rate_; // Sampling frequency/rate.
+ int32 bits_per_sample_; // Number of bits per sample.
+ int32 frames_per_buffer_; // Number of frames in a buffer.
+ int32 effects_; // Bitmask using PlatformEffectsMask.
+
+};
+
+// Used on the renderer side.
Henrik Grunell 2016/04/19 15:36:08 Remove this comment and same below. The interface
rchtara 2016/04/21 09:10:17 Acknowledged.
+interface AudioOutputStream {
+ Close();
Henrik Grunell 2016/04/19 15:36:08 Did you look into if it's possible to use delete/u
rchtara 2016/04/21 09:10:17 yes, I did. but as you probably remember, we decid
+};
+
+// Used on the renderer side.
+interface AudioOutput {
+ CreateStream(
+ int32 stream_id_,
Henrik Grunell 2016/04/19 15:36:08 Add a comment (before CreateStream) and explain wh
Henrik Grunell 2016/04/19 15:36:08 No trailing _ in these variables.
rchtara 2016/04/21 09:10:17 Done.
rchtara 2016/04/21 09:10:17 Done.
+ int32 render_frame_id_,
+ AudioOutputStreamParameters params) =>
+ (AudioOutputStream? stream,
+ int32 stream_id,
Henrik Grunell 2016/04/19 15:36:08 Put stream_id first.
rchtara 2016/04/21 09:10:17 Done.
+ handle<shared_buffer>? shared_buffer,
+ handle? socket_descriptor);
+};
« no previous file with comments | « media/mojo/interfaces/BUILD.gn ('k') | media/mojo/interfaces/mojo_bindings.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698