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

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

Issue 1899363002: Finish plumbing MojoVideoDecoder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Spaaace. Created 4 years, 7 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
(Empty)
1 // Copyright 2016 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 module media.interfaces;
6
7 import "media/mojo/interfaces/media_types.mojom";
8
9 interface VideoDecoder {
10 // Initialize the decoder. This must be called before any other method.
11 //
12 // |decoder_buffer_pipe| will be used to transfer encoded data for each
13 // DecoderBuffer.
14 //
15 // TODO(sandersd): Rename to Initialize() if/when
16 // media::VideoDecoder::Initialize() is renamed to Configure().
17 Construct(VideoDecoderClient client,
18 handle<data_pipe_consumer> decoder_buffer_pipe);
19
20 // Configure (or reconfigure) the decoder. This must be called before decoding
21 // any frames, and must not be called while there are pending Initialize(),
22 // Decode(), or Reset() requests.
23 //
24 // If |low_delay| is true, the decoder must output frames as soon as possible;
25 // in particular, it must not wait for another Decode() request, except as
26 // required for frame reordering.
27 Initialize(VideoDecoderConfig config, bool low_delay) => (bool success);
dcheng 2016/05/11 07:37:45 It's a bit weird to have a Construct() and Initial
sandersd (OOO until July 31) 2016/05/11 18:20:18 They have significantly different semantics. As th
dcheng 2016/05/11 22:15:06 Can we at least fix the names in the mojom interfa
sandersd (OOO until July 31) 2016/05/11 23:00:50 I'll have to defer this discussion to xhwang@, as
sandersd (OOO until July 31) 2016/05/17 23:05:00 xhwang@: ping.
xhwang 2016/05/17 23:15:37 dcheng: We already have C++ VideoDecoder::Initia
28
29 // Request decoding of exactly one frame or an EOS buffer. This must not be
30 // called while there are pending Configure(), Reset(), or Decode() requests.
31 //
32 // Implementations must eventually execute the callback, even if Decode() is
33 // not called again. It is not required that the decode status match the
34 // actual result of decoding a frame; only that decode errors are eventually
35 // reported (such as at EOS). The purpose of the callback is primarily for
36 // Decode() rate control.
37 //
38 // If |buffer| is an EOS buffer, implementations execute all other pending
39 // Decode() callbacks and output all pending frames before executing the EOS
40 // buffer Decode() callback. (That is, they must flush.)
41 //
42 // TODO(sandersd): Plumb GetMaxDecodeRequests() so that parallel Decode()
43 // requests can be allowed.
44 Decode(DecoderBuffer buffer) => (DecodeStatus status);
45
46 // Reset the decoder. All ongoing Decode() requests must be completed or
47 // aborted before executing the callback. This must not be called while there
48 // is a pending Initialize() request.
49 Reset() => ();
50 };
51
52 interface VideoDecoderClient {
53 // Output a decoded frame. Frames must be output in presentation order.
54 OnVideoFrameDecoded(VideoFrame frame);
55 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698