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

Side by Side Diff: mojo/services/public/interfaces/media/media_renderer.mojom

Issue 491733004: media: add basic MediaRenderer mojom and TypeConverters (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 import "mojo/services/public/interfaces/media/media_types.mojom"
6
7 module mojo {
8
9 [Client=MediaRendererClient]
10 interface MediaRenderer {
11 // Initializes the Renderer, calling back with status upon completion.
12 Initialize(handle<data_pipe_consumer> demuxer_stream) =>
13 (PipelineStatus pipeline_status);
14
15 // Discards any buffered data, executing callback when completed.
16 Flush() => ();
17
18 // Starts rendering from |time|.
19 StartPlayingFrom(int64 time_delta_usec);
20
21 // Updates the current playback rate. The default playback rate should be 1.
22 SetPlaybackRate(float playback_rate);
23
24 // Sets the output volume. The default volume should be 1.
25 SetVolume(float volume);
26
27 /* TODO(tim): Figure out these
28 GetMediaTime() => (int64 time_delta_usec);
xhwang 2014/08/22 23:30:02 Since we have OnTimeAdvanced, we probably don't ne
29 HasAudio()
30 HasVideo()
31 */
32 };
33
34 interface MediaRendererClient {
35 OnNewStatistics(PipelineStatistics statistics);
xhwang 2014/08/22 23:30:02 nit: OnStatistics
36 OnTimeAdvanced(int64 time_delta_usec);
xhwang 2014/08/22 23:30:02 OnTimeUpdate() would be a more media-ish term :)
37 OnBufferingStateChange(BufferingState state);
38 OnEndOfStream();
xhwang 2014/08/22 23:30:02 OnEnded() to be more consistent with media Pipelin
39 OnPipelineError(PipelineStatus error);
xhwang 2014/08/22 23:30:02 Renderer knows nothing about Pipeline. So just OnE
40 };
41
42 }
43
44 /* REMOVE THIS
45
46 e.g
47
48 class MojoRendererImpl : public media::Renderer,
49 mojo::MediaRendererClient {
50
51 ...
52 mojo::MediaRendererPtr renderer;
53 <magic_thing>->ConnectToService("lib with InterfaceImpl<MediaRenderer>", &rend erer);
54
55
56 };
57 */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698