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

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

Issue 1122393004: Add support for switching the audio output device for HTMLMediaElements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes to MediaPlayers so that they invoke callbacks in the correct threads. First complete implem… Created 5 years, 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 mojo; 5 module mojo;
6 6
7 import "media/mojo/interfaces/demuxer_stream.mojom"; 7 import "media/mojo/interfaces/demuxer_stream.mojom";
8 import "media/mojo/interfaces/media_types.mojom"; 8 import "media/mojo/interfaces/media_types.mojom";
9 9
10 interface MediaRenderer { 10 interface MediaRenderer {
(...skipping 11 matching lines...) Expand all
22 Flush() => (); 22 Flush() => ();
23 23
24 // Starts rendering from |time_usec|. 24 // Starts rendering from |time_usec|.
25 StartPlayingFrom(int64 time_usec); 25 StartPlayingFrom(int64 time_usec);
26 26
27 // Updates the current playback rate. The default playback rate should be 1. 27 // Updates the current playback rate. The default playback rate should be 1.
28 SetPlaybackRate(double playback_rate); 28 SetPlaybackRate(double playback_rate);
29 29
30 // Sets the output volume. The default volume should be 1. 30 // Sets the output volume. The default volume should be 1.
31 SetVolume(float volume); 31 SetVolume(float volume);
32
33 // Switches the output device.
34 SwitchAudioOutputDevice(string device_id, string security_origin);
32 }; 35 };
33 36
34 interface MediaRendererClient { 37 interface MediaRendererClient {
35 // Called to report media time advancement by |time_usec|. 38 // Called to report media time advancement by |time_usec|.
36 // |time_usec| and |max_time_usec| can be used to interpolate time between 39 // |time_usec| and |max_time_usec| can be used to interpolate time between
37 // calls to OnTimeUpdate(). 40 // calls to OnTimeUpdate().
38 // |max_time_usec| is typically the media timestamp of the last audio frame 41 // |max_time_usec| is typically the media timestamp of the last audio frame
39 // buffered by the audio hardware. 42 // buffered by the audio hardware.
40 // |max_time_usec| must be greater or equal to |time_usec|. 43 // |max_time_usec| must be greater or equal to |time_usec|.
41 OnTimeUpdate(int64 time_usec, int64 max_time_usec); 44 OnTimeUpdate(int64 time_usec, int64 max_time_usec);
42 45
43 // Called to report buffering state changes, see media_types.mojom. 46 // Called to report buffering state changes, see media_types.mojom.
44 OnBufferingStateChange(BufferingState state); 47 OnBufferingStateChange(BufferingState state);
45 48
46 // Executed when rendering has reached the end of stream. 49 // Executed when rendering has reached the end of stream.
47 OnEnded(); 50 OnEnded();
48 51
49 // Executed if any error was encountered during decode or rendering. If 52 // Executed if any error was encountered during decode or rendering. If
50 // this error happens during an operation that has a completion callback, 53 // this error happens during an operation that has a completion callback,
51 // OnError() will be called before firing the completion callback. 54 // OnError() will be called before firing the completion callback.
52 OnError(); 55 OnError();
53 }; 56 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698