Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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() => (); |
| 68 }; | 69 }; |
| 69 | 70 |
| 70 interface VideoDecoderClient { | 71 interface VideoDecoderClient { |
| 71 // Output a decoded frame. Frames must be output in presentation order. | 72 // Output a decoded frame. Frames must be output in presentation order. If |
| 72 OnVideoFrameDecoded(VideoFrame frame); | 73 // the video decoder is still running, the callback will be called when the |
| 74 // client has finished using the video frame. (That is, when it it safe to | |
| 75 // reclaim backing resources.) | |
|
xhwang
2017/01/25 18:25:09
+jrummell since we need to solve the same problem
sandersd (OOO until July 31)
2017/01/26 23:49:05
FYI the solution proposed here only works properly
| |
| 76 OnVideoFrameDecoded(VideoFrame frame) => | |
| 77 (gpu.mojom.SyncToken? release_sync_token); | |
|
xhwang
2017/01/25 18:25:09
What does it mean to call the callback with a null
sandersd (OOO until July 31)
2017/01/26 23:49:05
Note: I've replaced this mechanism in the current
| |
| 73 }; | 78 }; |
| OLD | NEW |