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

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

Issue 2289543003: IPC->mojo of audio_renderer_host (Closed)
Patch Set: Some changes. Comments. 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
« no previous file with comments | « media/mojo/interfaces/BUILD.gn ('k') | media/mojo/interfaces/typemaps.gni » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 {
o1ka 2016/09/02 13:07:58 naming conflict with media::AudioOutputStream. Thi
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);
o1ka 2016/09/02 13:07:58 Why not to have OnPlay/OnPause/OnError instead, an
26 };
27
28 // AudioOutput manages device authorizations and AudioOutputStreamClients
o1ka 2016/09/02 13:07:57 How does it manage AudioOutputStreamClients? There
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(
o1ka 2016/09/02 13:07:58 Make it "CreateStream" which returns a stream inte
34 int32 stream_id,
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);
o1ka 2016/09/02 13:07:58 (Those three together are OutputDeviceInfo - proba
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(
o1ka 2016/09/02 13:07:58 Make it a Start() method of AudioOUtputStream inte
27 int32 stream_id, 47 int32 stream_id,
48 int32 render_frame_id,
o1ka 2016/09/02 13:07:57 Why do we need it? stream id is a unique identifie
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);
o1ka 2016/09/02 13:07:58 Should it be called if CreateStream() has been iss
58 };
OLDNEW
« no previous file with comments | « media/mojo/interfaces/BUILD.gn ('k') | media/mojo/interfaces/typemaps.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698