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

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

Issue 2640153004: Add mailbox-based Mojo VideoFrame variant. (Closed)
Patch Set: Rebase. Created 3 years, 9 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 2016 The Chromium Authors. All rights reserved. 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 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 "gpu/ipc/common/sync_token.mojom";
7 import "media/mojo/interfaces/media_types.mojom"; 8 import "media/mojo/interfaces/media_types.mojom";
8 import "mojo/common/unguessable_token.mojom"; 9 import "mojo/common/unguessable_token.mojom";
9 10
10 // Identifies a GpuCommandBufferStub. MediaGpuChannelManager is responsible 11 // Identifies a GpuCommandBufferStub. MediaGpuChannelManager is responsible
11 // for minting |channel_token| objects. 12 // for minting |channel_token| objects.
12 struct CommandBufferId { 13 struct CommandBufferId {
13 mojo.common.mojom.UnguessableToken channel_token; 14 mojo.common.mojom.UnguessableToken channel_token;
14 int32 route_id; 15 int32 route_id;
15 }; 16 };
16 17
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 // 59 //
59 // If |buffer| is an EOS buffer, implementations must execute all other 60 // If |buffer| is an EOS buffer, implementations must execute all other
60 // pending Decode() callbacks and output all pending frames before executing 61 // pending Decode() callbacks and output all pending frames before executing
61 // the Decode(EOS) callback. (That is, they must flush.) 62 // the Decode(EOS) callback. (That is, they must flush.)
62 Decode(DecoderBuffer buffer) => (DecodeStatus status); 63 Decode(DecoderBuffer buffer) => (DecodeStatus status);
63 64
64 // Reset the decoder. All ongoing Decode() requests must be completed or 65 // Reset the decoder. All ongoing Decode() requests must be completed or
65 // aborted before executing the callback. This must not be called while there 66 // aborted before executing the callback. This must not be called while there
66 // is a pending Initialize() request. 67 // is a pending Initialize() request.
67 Reset() => (); 68 Reset() => ();
69
70 // Inform the decoder that the client is finished with a frame.
71 // |release_sync_token| is a (possibly empty) sync point after which the
72 // frame's backing textures will be safe to overwrite.
73 OnReleaseMailbox(mojo.common.mojom.UnguessableToken release_token,
74 gpu.mojom.SyncToken release_sync_token);
68 }; 75 };
69 76
70 interface VideoDecoderClient { 77 interface VideoDecoderClient {
71 // Output a decoded frame. Frames must be output in presentation order. 78 // Output a decoded frame. Frames must be output in presentation order. If
72 OnVideoFrameDecoded(VideoFrame frame); 79 // |release_token| is provided, the client should call OnReleaseMailbox() when
80 // it is finished with the frame.
81 OnVideoFrameDecoded(VideoFrame frame,
82 mojo.common.mojom.UnguessableToken? release_token);
73 }; 83 };
OLDNEW
« no previous file with comments | « media/mojo/interfaces/media_types.mojom ('k') | media/mojo/services/mojo_video_decoder_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698