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 media.mojom; | 5 module media.mojom; |
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 import "mojo/common/common_custom_types.mojom"; | 9 import "mojo/common/common_custom_types.mojom"; |
10 import "ui/gfx/geometry/mojo/geometry.mojom"; | 10 import "ui/gfx/geometry/mojo/geometry.mojom"; |
(...skipping 17 matching lines...) Expand all Loading... |
28 | 28 |
29 // Updates the current playback rate. The default playback rate should be 1. | 29 // Updates the current playback rate. The default playback rate should be 1. |
30 SetPlaybackRate(double playback_rate); | 30 SetPlaybackRate(double playback_rate); |
31 | 31 |
32 // Sets the output volume. The default volume should be 1. | 32 // Sets the output volume. The default volume should be 1. |
33 SetVolume(float volume); | 33 SetVolume(float volume); |
34 | 34 |
35 // Attaches the CDM associated with |cdm_id| to the renderer service, | 35 // Attaches the CDM associated with |cdm_id| to the renderer service, |
36 // executing the callback with whether the CDM was successfully attached. | 36 // executing the callback with whether the CDM was successfully attached. |
37 SetCdm(int32 cdm_id) => (bool success); | 37 SetCdm(int32 cdm_id) => (bool success); |
| 38 |
| 39 // Registers a new request in the ScopedSurfaceRequestManager, and returns |
| 40 // its token. |
| 41 // |
| 42 // NOTE: Should only be called on Android. Only used for WMPI's fallback path |
| 43 // (i.e. HLS playback), when the MojoRendererService wraps a |
| 44 // content::MediaPlayerRenderer. |
| 45 // Unexpected calls to this method will close the connection. |
| 46 InitiateScopedSurfaceRequest() |
| 47 => (mojo.common.mojom.UnguessableToken request_token); |
38 }; | 48 }; |
39 | 49 |
40 interface RendererClient { | 50 interface RendererClient { |
41 // Called to report media time advancement by |time|. | 51 // Called to report media time advancement by |time|. |
42 // |time| and |max_time| can be used to interpolate time between | 52 // |time| and |max_time| can be used to interpolate time between |
43 // calls to OnTimeUpdate(). | 53 // calls to OnTimeUpdate(). |
44 // |max_time| is typically the media timestamp of the last audio frame | 54 // |max_time| is typically the media timestamp of the last audio frame |
45 // buffered by the audio hardware. | 55 // buffered by the audio hardware. |
46 // |capture_time| is monotonic clock time at which the times were captured. | 56 // |capture_time| is monotonic clock time at which the times were captured. |
47 // |max_time| must be greater or equal to |time|. | 57 // |max_time| must be greater or equal to |time|. |
(...skipping 23 matching lines...) Expand all Loading... |
71 OnStatisticsUpdate(PipelineStatistics stats); | 81 OnStatisticsUpdate(PipelineStatistics stats); |
72 | 82 |
73 // Called when the remote renderering service is waiting on the decryption | 83 // Called when the remote renderering service is waiting on the decryption |
74 // key. | 84 // key. |
75 OnWaitingForDecryptionKey(); | 85 OnWaitingForDecryptionKey(); |
76 | 86 |
77 // Executed the first time the metadata is updated, and whenever the duration | 87 // Executed the first time the metadata is updated, and whenever the duration |
78 // changes. | 88 // changes. |
79 OnDurationChange(mojo.common.mojom.TimeDelta duration); | 89 OnDurationChange(mojo.common.mojom.TimeDelta duration); |
80 }; | 90 }; |
OLD | NEW |