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 { | |
xhwang
2017/06/01 16:59:01
This struct is not documented. You probably want t
Chandan
2017/06/01 18:38:22
Sure. I will add comments wherever necessary in th
| |
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); | |
xhwang
2017/06/01 16:59:01
I see that you copied the old comments here. But I
Chandan
2017/06/01 18:38:23
I am new to this part of the code. However, as I s
| |
29 }; | |
30 | |
31 // Initialize() must be called before using Decode(). | |
32 interface GpuJpegDecodeAccelerator { | |
33 [Sync] | |
Chandan
2017/06/01 13:37:50
Sorry, didn't realize that the existing equivalent
xhwang
2017/06/01 16:59:01
Is there a compelling reason why this must be sync
Chandan
2017/06/01 18:38:23
Since the existing implementation is synchronous,
xhwang
2017/06/01 18:49:18
I see. It's probably because it's copying the patt
| |
34 Initialize(GpuJpegDecodeAcceleratorClient client) => (bool success); | |
35 | |
36 // Decode one JPEG image from shared memory |input_buffer.memory_handle| with | |
37 // size |input_buffer.size|. The input buffer is associated with | |
38 // |input_buffer.id|and the and the size of JPEG image is |coded_size|. | |
39 // Decoded I420 frame data will be put onto shared memory associated with | |
40 // |output_handle| with size limit |output_buffer_size|. | |
xhwang
2017/06/01 16:59:01
For |output_buffer_size|, if it's a limit, it shou
xhwang
2017/06/01 16:59:01
I know you are copying this from the IPC message.
Chandan
2017/06/01 18:38:23
Sure.
xhwang
2017/06/01 18:49:18
You don't need a struct if you only have 4 paramet
| |
41 Decode(JpegDecodeInfo info); | |
42 | |
43 // TODO(c.padhi): This method might not be required, see | |
44 // http://crbug.com/699255. | |
45 Uninitialize(); | |
46 }; | |
OLD | NEW |