Index: media/mojo/interfaces/audio_output.mojom |
diff --git a/media/mojo/interfaces/audio_output.mojom b/media/mojo/interfaces/audio_output.mojom |
index 895a93e4967727e4d2846679b50433a2de46ff94..532aa6ab7be4586921bb032975302579a5e8151e 100644 |
--- a/media/mojo/interfaces/audio_output.mojom |
+++ b/media/mojo/interfaces/audio_output.mojom |
@@ -5,29 +5,34 @@ |
module media.mojom; |
import "media/mojo/interfaces/audio_parameters.mojom"; |
+import "media/mojo/interfaces/media_types.mojom"; |
+import "url/mojo/origin.mojom"; |
-// This interface handles audio output stream operations. |
-// It allows to close a stream. |
-// TODO(rchtara): Add methods that allow the interaction with audio output |
-// streams: Play, Pause and SetVolume to this interface. |
-// See crbug.com/606707 for more details. |
-interface AudioOutputStream { |
- Close(); |
+// On error, the message pipe is closed. |
+// To close the stream, just close the message pipe. |
+interface AudioOutput { |
+ Start(AudioParameters params) => |
+ (handle<shared_buffer> shared_buffer, |
+ handle socket_descriptor); |
+ Play(); |
+ Pause(); |
+ SetVolume(double volume); |
}; |
o1ka
2017/01/25 15:15:21
We want these two interfaces it live in separate m
|
-// This interface manages audio output streams. |
-// It allows to create an AudioOutputStream. |
-// TODO(rchtara): Add a method to request device authorization to this |
-// interface. |
-// See crbug.com/606707 for more details. |
-interface AudioOutput { |
- // TODO(rchtara): Remove |stream_id| from AudioOutput::CreateStream when all |
- // the stream operations are mojofied. |
- CreateStream( |
- int32 stream_id, |
- AudioParameters params) => |
- (int32 stream_id, |
- AudioOutputStream? stream, |
- handle<shared_buffer>? shared_buffer, |
- handle? socket_descriptor); |
-}; |
+interface AudioOutputService { |
o1ka
2017/01/25 15:15:21
RendererAudioOutputService? Or some other more des
|
+ // 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( |
+ // TODO(maxmorin): When input stream control is also switched to mojo, |
+ // change session_id to be an int32_t in the code. |
+ int64 session_id, |
+ string device_id, |
+ AudioOutput&? audio_output_request, |
+ url.mojom.Origin origin) => |
+ (// TODO make this a struct? |
+ OutputDeviceStatus state, |
+ AudioParameters output_params, |
+ string matched_device_id); |
+}; |