Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(275)

Side by Side Diff: media/mojo/interfaces/renderer.mojom

Issue 2075303002: [DO NOT COMMIT] Initial MediaPlayerRenderer plumbing and basic features (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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,
xhwang 2016/06/22 17:39:02 In the future we may want to wrap audio, video and
18 int64 surface_id) => (bool success);
xhwang 2016/06/22 17:39:02 In C++, currently we pass the |request_surface_cb|
xhwang 2016/06/22 17:43:09 For more background, we try to keep the mojo part
sandersd (OOO until July 31) 2016/06/23 18:43:35 The last time we talked, we decided against parame
17 19
18 // Discards any buffered data, executing callback when completed. 20 // Discards any buffered data, executing callback when completed.
19 // NOTE: If an error occurs, RendererClient::OnError() can be called 21 // NOTE: If an error occurs, RendererClient::OnError() can be called
20 // before the callback is executed. 22 // before the callback is executed.
21 Flush() => (); 23 Flush() => ();
22 24
23 // Starts rendering from |time_usec|. 25 // Starts rendering from |time_usec|.
24 StartPlayingFrom(int64 time_usec); 26 StartPlayingFrom(int64 time_usec);
25 27
26 // Updates the current playback rate. The default playback rate should be 1. 28 // Updates the current playback rate. The default playback rate should be 1.
(...skipping 25 matching lines...) Expand all
52 // Executed if any error was encountered during decode or rendering. If 54 // Executed if any error was encountered during decode or rendering. If
53 // this error happens during an operation that has a completion callback, 55 // this error happens during an operation that has a completion callback,
54 // OnError() will be called before firing the completion callback. 56 // OnError() will be called before firing the completion callback.
55 OnError(); 57 OnError();
56 58
57 // Executed for the first video frame and whenever natural size changes. 59 // Executed for the first video frame and whenever natural size changes.
58 OnVideoNaturalSizeChange(gfx.mojom.Size size); 60 OnVideoNaturalSizeChange(gfx.mojom.Size size);
59 61
60 // Executed for the first video frame and whenever opacity changes. 62 // Executed for the first video frame and whenever opacity changes.
61 OnVideoOpacityChange(bool opaque); 63 OnVideoOpacityChange(bool opaque);
64
65 // Executed the first time the metadata is updated, and whenever the duration
66 // changes.
67 OnDurationChange(int64 duration_usec);
62 }; 68 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698