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