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

Side by Side Diff: media/mojo/interfaces/audio_output.mojom

Issue 2289543003: IPC->mojo of audio_renderer_host (Closed)
Patch Set: It builds \o/. Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 module media.mojom; 5 module media.mojom;
6 6
7 import "media/mojo/interfaces/audio_parameters.mojom"; 7 import "media/mojo/interfaces/audio_parameters.mojom";
8 import "url/mojo/origin.mojom";
8 9
9 // This interface handles audio output stream operations. 10 enum AudioOutputStreamState {
10 // It allows to close a stream. 11 PLAYING,
11 // TODO(rchtara): Add methods that allow the interaction with audio output 12 PAUSED,
12 // streams: Play, Pause and SetVolume to this interface. 13 ERROR
13 // See crbug.com/606707 for more details.
14 interface AudioOutputStream {
15 Close();
16 }; 14 };
17 15
18 // This interface manages audio output streams. 16 interface AudioOutputStream {
19 // It allows to create an AudioOutputStream. 17 Play();
20 // TODO(rchtara): Add a method to request device authorization to this 18 Pause();
21 // interface. 19 SetVolume(double volume);
22 // See crbug.com/606707 for more details. 20 };
21
22 interface AudioOutputStreamClient {
23 // Called by the AudioOutputStreamService after any stream
24 // manipulation by the AudioOutputStreamClient.
25 OnStreamStateChange(AudioOutputStreamState state);
Henrik Grunell 2016/09/01 15:09:07 I believe we can replace this with responses. Play
Max Morin 2016/09/02 10:27:07 I agree. I'll change this.
26 };
27
28 // AudioOutput manages device authorizations and AudioOutputStreamClients
23 interface AudioOutput { 29 interface AudioOutput {
24 // TODO(rchtara): Remove |stream_id| from AudioOutput::CreateStream when all 30 // Used to request device authorization from the AudioOutputService.
25 // the stream operations are mojofied. 31 // Returns |authorization_id| which will need to be used in CreateStream
32 // if device authorization is successful.
33 RequestDeviceAuthorization(
34 int32 stream_id,
Henrik Grunell 2016/09/01 15:09:07 A follow-up CL should remove the stream id, but it
35 int32 render_frame_id,
36 int32 session_id,
37 string device_id,
38 url.mojom.Origin origin) =>
39 (int32 state,
40 AudioParameters output_params,
41 string matched_device_id);
42
43 // Returns a bound AudioOutputStream that will be used to directly
44 // communicate with an AudioOutputStreamService. It must use the
45 // provided AudioOutputStreamClient to signal errors.
26 CreateStream( 46 CreateStream(
27 int32 stream_id, 47 int32 stream_id,
48 int32 render_frame_id,
Henrik Grunell 2016/09/01 15:09:07 Do you know what happened with the discussion arou
Max Morin 2016/09/02 10:27:07 I haven't read that discussion. Why would we have
49 AudioOutputStreamClient client,
28 AudioParameters params) => 50 AudioParameters params) =>
29 (int32 stream_id, 51 (AudioOutputStream stream,
30 AudioOutputStream? stream, 52 handle<shared_buffer> shared_buffer,
31 handle<shared_buffer>? shared_buffer, 53 handle socket_descriptor);
32 handle? socket_descriptor); 54
33 }; 55 // Closes a (possibly) active AudioOutputStreamService. Clears
56 // authorization data and any associated info with |stream_id|.
57 CloseStream(int32 stream_id);
Henrik Grunell 2016/09/01 15:09:07 This should not be needed. Deleting the AudioOutpu
Max Morin 2016/09/02 10:27:07 Ok, I'll remove it.
58 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698