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

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: Windows needs some more headers, apaprently. 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
« no previous file with comments | « media/mojo/interfaces/service_factory.mojom ('k') | media/mojo/services/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.mojom;
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);
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
« no previous file with comments | « media/mojo/interfaces/service_factory.mojom ('k') | media/mojo/services/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698