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

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

Issue 551963004: media: scaffolding and plumbing for MojoRenderer{Impl, Service} (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 import "media/mojo/interfaces/demuxer_stream.mojom"
5 import "media/mojo/interfaces/media_types.mojom" 6 import "media/mojo/interfaces/media_types.mojom"
6 7
7 module mojo { 8 module mojo {
8 9
9 [Client=MediaRendererClient] 10 [Client=MediaRendererClient]
10 interface MediaRenderer { 11 interface MediaRenderer {
11 // Initializes the Renderer, calling back upon completion. 12 // Initializes the Renderer with |stream|, calling back upon completion.
12 // NOTE: If an error occurs, MediaRendererClient::OnError() will be called 13 // NOTE: If an error occurs, MediaRendererClient::OnError() will be called
13 // before the callback is executed. 14 // before the callback is executed.
14 Initialize() => (); 15 Initialize(DemuxerStream stream) => ();
scherkus (not reviewing) 2014/09/09 20:35:32 FYI this will likely change in response to https:/
tim (not reviewing) 2014/09/10 23:08:28 OK... I'll loop back to this once I address the bu
15
16 // Decodes and renders |buffer|, calling back when more data is required.
17 // NOTE: If an error occurs, MediaRendererClient::OnError() will be called
18 // before the callback is executed.
19 // TODO(tim): Switch decoding model to use framed data pipe when available.
20 // In that world, the signalling for more would be implicit by a writable
21 // pipe handle on the client side so this entire method + callback goes away.
22 DecodeAndRender(MediaDecoderBuffer buffer) => ();
23 16
24 // Discards any buffered data, executing callback when completed. 17 // Discards any buffered data, executing callback when completed.
25 // NOTE: If an error occurs, MediaRendererClient::OnError() can be called 18 // NOTE: If an error occurs, MediaRendererClient::OnError() can be called
26 // before the callback is executed. 19 // before the callback is executed.
27 Flush() => (); 20 Flush() => ();
28 21
29 // Starts rendering from |time_usec|. 22 // Starts rendering from |time_usec|.
30 StartPlayingFrom(int64 time_usec); 23 StartPlayingFrom(int64 time_usec);
31 24
32 // Updates the current playback rate. The default playback rate should be 1. 25 // Updates the current playback rate. The default playback rate should be 1.
(...skipping 18 matching lines...) Expand all
51 // Executed when rendering has reached the end of stream. 44 // Executed when rendering has reached the end of stream.
52 OnEnded(); 45 OnEnded();
53 46
54 // Executed if any error was encountered during decode or rendering. If 47 // Executed if any error was encountered during decode or rendering. If
55 // this error happens during an operation that has a completion callback, 48 // this error happens during an operation that has a completion callback,
56 // OnError() will be called before firing the completion callback. 49 // OnError() will be called before firing the completion callback.
57 OnError(); 50 OnError();
58 }; 51 };
59 52
60 } // module mojo 53 } // module mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698