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

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

Issue 1935873002: Implement disabling and enabling media tracks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@track-control2
Patch Set: Updated comments + dchecks in ffmpeg demux stream 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) => (bool success);
17 17
18 // Discards any buffered data, executing callback when completed. 18 // Discards any buffered data, executing callback when completed.
19 // NOTE: If an error occurs, RendererClient::OnError() can be called 19 // NOTE: If an error occurs, RendererClient::OnError() can be called
20 // before the callback is executed. 20 // before the callback is executed.
21 Flush() => (); 21 Flush() => ();
22 22
23 // Starts rendering from |time_usec|. 23 // Starts rendering from |time_usec|.
24 StartPlayingFrom(int64 time_usec); 24 StartPlayingFrom(int64 time_usec);
25 25
26 // Restarts rendering a given stream after it has been reenabled.
27 RestartStreamPlayback(bool video_stream, int64 time_usec);
28
26 // 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.
27 SetPlaybackRate(double playback_rate); 30 SetPlaybackRate(double playback_rate);
28 31
29 // Sets the output volume. The default volume should be 1. 32 // Sets the output volume. The default volume should be 1.
30 SetVolume(float volume); 33 SetVolume(float volume);
31 34
32 // Attaches the CDM associated with |cdm_id| to the renderer service, 35 // Attaches the CDM associated with |cdm_id| to the renderer service,
33 // executing the callback with whether the CDM was successfully attached. 36 // executing the callback with whether the CDM was successfully attached.
34 SetCdm(int32 cdm_id) => (bool success); 37 SetCdm(int32 cdm_id) => (bool success);
35 }; 38 };
(...skipping 17 matching lines...) Expand all
53 // this error happens during an operation that has a completion callback, 56 // this error happens during an operation that has a completion callback,
54 // OnError() will be called before firing the completion callback. 57 // OnError() will be called before firing the completion callback.
55 OnError(); 58 OnError();
56 59
57 // Executed for the first video frame and whenever natural size changes. 60 // Executed for the first video frame and whenever natural size changes.
58 OnVideoNaturalSizeChange(mojo.Size size); 61 OnVideoNaturalSizeChange(mojo.Size size);
59 62
60 // Executed for the first video frame and whenever opacity changes. 63 // Executed for the first video frame and whenever opacity changes.
61 OnVideoOpacityChange(bool opaque); 64 OnVideoOpacityChange(bool opaque);
62 }; 65 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698