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

Unified Diff: content/common/media/audio_output.mojom

Issue 2319493002: Add mojo interface for audio rendering. (Closed)
Patch Set: ++docs Created 3 years, 10 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 | « content/common/media/audio_messages.h ('k') | content/test/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
+};
« no previous file with comments | « content/common/media/audio_messages.h ('k') | content/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698