OLD | NEW |
---|---|
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 [Client=MediaRendererClient] | 10 [Client=MediaRendererClient] |
(...skipping 10 matching lines...) Expand all Loading... | |
21 Flush() => (); | 21 Flush() => (); |
22 | 22 |
23 // Starts rendering from |time_usec|. | 23 // Starts rendering from |time_usec|. |
24 StartPlayingFrom(int64 time_usec); | 24 StartPlayingFrom(int64 time_usec); |
25 | 25 |
26 // Updates the current playback rate. The default playback rate should be 1. | 26 // Updates the current playback rate. The default playback rate should be 1. |
27 SetPlaybackRate(float playback_rate); | 27 SetPlaybackRate(float playback_rate); |
28 | 28 |
29 // Sets the output volume. The default volume should be 1. | 29 // Sets the output volume. The default volume should be 1. |
30 SetVolume(float volume); | 30 SetVolume(float volume); |
31 | |
32 // Sets the CDM to be used by the renderer. Returns whether the CDM is | |
33 // successfully attached. | |
ddorwin
2015/01/06 00:57:28
It returns the result of something that is not men
xhwang
2015/01/06 19:54:54
Done.
| |
34 SetCdm(int32 cdm_id) => (bool success); | |
31 }; | 35 }; |
32 | 36 |
33 interface MediaRendererClient { | 37 interface MediaRendererClient { |
34 // Called to report media time advancement by |time_usec|. | 38 // Called to report media time advancement by |time_usec|. |
35 // |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 |
36 // calls to OnTimeUpdate(). | 40 // calls to OnTimeUpdate(). |
37 // |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 |
38 // buffered by the audio hardware. | 42 // buffered by the audio hardware. |
39 // |max_time_usec| must be greater or equal to |time_usec|. | 43 // |max_time_usec| must be greater or equal to |time_usec|. |
40 OnTimeUpdate(int64 time_usec, int64 max_time_usec); | 44 OnTimeUpdate(int64 time_usec, int64 max_time_usec); |
41 | 45 |
42 // Called to report buffering state changes, see media_types.mojom. | 46 // Called to report buffering state changes, see media_types.mojom. |
43 OnBufferingStateChange(BufferingState state); | 47 OnBufferingStateChange(BufferingState state); |
44 | 48 |
45 // Executed when rendering has reached the end of stream. | 49 // Executed when rendering has reached the end of stream. |
46 OnEnded(); | 50 OnEnded(); |
47 | 51 |
48 // Executed if any error was encountered during decode or rendering. If | 52 // Executed if any error was encountered during decode or rendering. If |
49 // this error happens during an operation that has a completion callback, | 53 // this error happens during an operation that has a completion callback, |
50 // OnError() will be called before firing the completion callback. | 54 // OnError() will be called before firing the completion callback. |
51 OnError(); | 55 OnError(); |
52 }; | 56 }; |
OLD | NEW |