OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 module content.mojom; |
| 6 |
| 7 import "media/mojo/interfaces/audio_parameters.mojom"; |
| 8 import "media/mojo/interfaces/media_types.mojom"; |
| 9 import "url/mojo/origin.mojom"; |
| 10 |
| 11 // On error, the message pipe is closed. |
| 12 // To close the stream, just close the message pipe. |
| 13 interface AudioOutput { |
| 14 Start(media.mojom.AudioParameters params) => |
| 15 (handle<shared_buffer> shared_buffer, |
| 16 handle socket_descriptor); |
| 17 Play(); |
| 18 Pause(); |
| 19 // Volume is in the range [0, 1]. |
| 20 SetVolume(double volume); |
| 21 }; |
| 22 |
| 23 interface RendererAudioOutputService { |
| 24 // Used to request a device. |
| 25 // An AudioOutputRequest may be supplied, in which case it will |
| 26 // be bound to an AudioOutput implementation or closed (in case of an error). |
| 27 // TODO better name. |
| 28 RequestDeviceAuthorization( |
| 29 AudioOutput&? audio_output_request, |
| 30 int64 session_id, |
| 31 string device_id, |
| 32 url.mojom.Origin origin) => |
| 33 (media.mojom.OutputDeviceStatus state, |
| 34 media.mojom.AudioParameters output_params, |
| 35 string matched_device_id); |
| 36 }; |
OLD | NEW |