OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 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 import "ui/gfx/geometry/mojo/geometry.mojom"; | |
9 | |
10 enum Error { | |
11 NO_ERRORS, | |
12 INVALID_ARGUMENT, | |
13 UNREADABLE_INPUT, | |
14 PARSE_JPEG_FAILED, | |
15 UNSUPPORTED_JPEG, | |
16 PLATFORM_FAILURE, | |
17 }; | |
18 | |
19 struct JpegDecodeInfo { | |
20 BitstreamBuffer input_buffer; | |
21 gfx.mojom.Size coded_size; | |
22 handle<shared_buffer> output_handle; | |
23 uint32 output_buffer_size; | |
24 }; | |
25 | |
26 interface GpuJpegDecodeAcceleratorClient { | |
27 // Report decode status. | |
28 OnDecodeAck(int32 bitstream_buffer_id, Error error); | |
29 }; | |
30 | |
31 interface GpuJpegDecodeAccelerator { | |
32 // Create and initialize a hardware jpeg decoder. | |
33 // Created decoder should be freed with Uninitialize() when no longer needed. | |
34 Initialize(GpuJpegDecodeAcceleratorClient client) => (bool success); | |
chfremer
2017/05/30 18:07:24
nit: Comment is slightly confusing. If we say "Cre
Chandan
2017/05/31 13:19:58
Uninitialize() is most likely to be removed. Hence
| |
35 | |
36 // Decode one JPEG image from shared memory |input_buffer_handle| with size | |
37 // |input_buffer_size|. The input buffer is associated with |input_buffer_id| | |
38 // and the size of JPEG image is |coded_size|. Decoded I420 frame data will | |
39 // be put onto shared memory associated with |output_video_frame_handle| | |
40 // with size limit |output_buffer_size|. | |
41 Decode(JpegDecodeInfo info); | |
42 | |
43 // TODO(c.padhi): This method might not be required, see | |
44 // http://crbug.com/699255. | |
45 // Destroy request to the decoder. | |
46 Uninitialize(); | |
47 }; | |
OLD | NEW |