Index: content/common/media/audio_output.mojom |
diff --git a/content/common/media/audio_output.mojom b/content/common/media/audio_output.mojom |
new file mode 100644 |
index 0000000000000000000000000000000000000000..21fad2aec3e61fd85d725a4c0507b9834b914dfa |
--- /dev/null |
+++ b/content/common/media/audio_output.mojom |
@@ -0,0 +1,36 @@ |
+// Copyright 2016 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; |
+ |
+import "media/mojo/interfaces/audio_parameters.mojom"; |
+import "media/mojo/interfaces/media_types.mojom"; |
+import "url/mojo/origin.mojom"; |
+ |
+// On error, the message pipe is closed. |
+// To close the stream, just close the message pipe. |
+interface AudioOutput { |
+ Start(media.mojom.AudioParameters params) => |
+ (handle<shared_buffer> shared_buffer, |
+ handle socket_descriptor); |
+ Play(); |
+ Pause(); |
+ // Volume is in the range [0, 1]. |
+ SetVolume(double volume); |
+}; |
+ |
+interface RendererAudioOutputService { |
+ // Used to request a device. |
+ // An AudioOutputRequest may be supplied, in which case it will |
+ // be bound to an AudioOutput implementation or closed (in case of an error). |
+ // TODO better name. |
+ RequestDeviceAuthorization( |
+ AudioOutput&? audio_output_request, |
+ int64 session_id, |
+ string device_id, |
+ url.mojom.Origin origin) => |
+ (media.mojom.OutputDeviceStatus state, |
+ media.mojom.AudioParameters output_params, |
+ string matched_device_id); |
+}; |