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 "ui/gfx/geometry/mojo/geometry.mojom"; | 9 import "ui/gfx/geometry/mojo/geometry.mojom"; |
10 | 10 |
11 interface Renderer { | 11 interface Renderer { |
12 // Initializes the Renderer with one or both of an audio and video stream, | 12 // Initializes the Renderer with one or both of an audio and video stream, |
13 // executing the callback with whether the initialization succeeded. | 13 // executing the callback with whether the initialization succeeded. |
14 Initialize(RendererClient client, | 14 Initialize(RendererClient client, |
15 DemuxerStream? audio, | 15 DemuxerStream? audio, |
16 DemuxerStream? video) => (bool success); | 16 DemuxerStream? video, |
| 17 string? url) => (bool success); |
17 | 18 |
18 // Discards any buffered data, executing callback when completed. | 19 // Discards any buffered data, executing callback when completed. |
19 // NOTE: If an error occurs, RendererClient::OnError() can be called | 20 // NOTE: If an error occurs, RendererClient::OnError() can be called |
20 // before the callback is executed. | 21 // before the callback is executed. |
21 Flush() => (); | 22 Flush() => (); |
22 | 23 |
23 // Starts rendering from |time_usec|. | 24 // Starts rendering from |time_usec|. |
24 StartPlayingFrom(int64 time_usec); | 25 StartPlayingFrom(int64 time_usec); |
25 | 26 |
26 // 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. |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 OnVideoOpacityChange(bool opaque); | 62 OnVideoOpacityChange(bool opaque); |
62 | 63 |
63 // Called periodically to pass statistics to the web player. See | 64 // Called periodically to pass statistics to the web player. See |
64 // media_types.mojom. | 65 // media_types.mojom. |
65 OnStatisticsUpdate(PipelineStatistics stats); | 66 OnStatisticsUpdate(PipelineStatistics stats); |
66 | 67 |
67 // Called when the remote renderering service is waiting on the decryption | 68 // Called when the remote renderering service is waiting on the decryption |
68 // key. | 69 // key. |
69 OnWaitingForDecryptionKey(); | 70 OnWaitingForDecryptionKey(); |
70 }; | 71 }; |
OLD | NEW |