| 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/time.mojom"; | 9 import "mojo/common/time.mojom"; |
| 10 import "mojo/common/unguessable_token.mojom"; | 10 import "mojo/common/unguessable_token.mojom"; |
| 11 import "ui/gfx/geometry/mojo/geometry.mojom"; | 11 import "ui/gfx/geometry/mojo/geometry.mojom"; |
| 12 import "url/mojo/url.mojom"; | 12 import "url/mojo/url.mojom"; |
| 13 | 13 |
| 14 interface Renderer { | 14 interface Renderer { |
| 15 // Initializes the Renderer with one or both of an audio and video stream, | 15 // Initializes the Renderer with either one or more audio / video |streams|, |
| 16 // executing the callback with whether the initialization succeeded. | 16 // or a |media_url| executing the callback with whether the initialization |
| 17 // succeeded. |
| 17 Initialize(associated RendererClient client, | 18 Initialize(associated RendererClient client, |
| 18 DemuxerStream? audio, | 19 array<DemuxerStream>? streams, |
| 19 DemuxerStream? video, | |
| 20 url.mojom.Url? media_url, | 20 url.mojom.Url? media_url, |
| 21 url.mojom.Url? first_party_for_cookies) => (bool success); | 21 url.mojom.Url? first_party_for_cookies) => (bool success); |
| 22 | 22 |
| 23 // Discards any buffered data, executing callback when completed. | 23 // Discards any buffered data, executing callback when completed. |
| 24 // NOTE: If an error occurs, RendererClient::OnError() can be called | 24 // NOTE: If an error occurs, RendererClient::OnError() can be called |
| 25 // before the callback is executed. | 25 // before the callback is executed. |
| 26 Flush() => (); | 26 Flush() => (); |
| 27 | 27 |
| 28 // Starts rendering from |time|. | 28 // Starts rendering from |time|. |
| 29 StartPlayingFrom(mojo.common.mojom.TimeDelta time); | 29 StartPlayingFrom(mojo.common.mojom.TimeDelta time); |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 OnStatisticsUpdate(PipelineStatistics stats); | 83 OnStatisticsUpdate(PipelineStatistics stats); |
| 84 | 84 |
| 85 // Called when the remote renderering service is waiting on the decryption | 85 // Called when the remote renderering service is waiting on the decryption |
| 86 // key. | 86 // key. |
| 87 OnWaitingForDecryptionKey(); | 87 OnWaitingForDecryptionKey(); |
| 88 | 88 |
| 89 // Executed the first time the metadata is updated, and whenever the duration | 89 // Executed the first time the metadata is updated, and whenever the duration |
| 90 // changes. | 90 // changes. |
| 91 OnDurationChange(mojo.common.mojom.TimeDelta duration); | 91 OnDurationChange(mojo.common.mojom.TimeDelta duration); |
| 92 }; | 92 }; |
| OLD | NEW |