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 // Initialize() must be called before using Decode(). | |
32 interface GpuJpegDecodeAccelerator { | |
xhwang
2017/06/01 05:17:19
Depending on how this interface interacts with Gpu
Chandan
2017/06/01 05:54:26
GpuJpegDecodeAccelerator will use GpuJpegDecodeAcc
| |
33 Initialize(GpuJpegDecodeAcceleratorClient client) => (bool success); | |
34 | |
35 // Decode one JPEG image from shared memory |input_buffer_handle| with size | |
36 // |input_buffer_size|. The input buffer is associated with |input_buffer_id| | |
37 // and the size of JPEG image is |coded_size|. Decoded I420 frame data will | |
xhwang
2017/06/01 05:17:19
These seem to belong to line 18.
Chandan
2017/06/01 05:54:25
May be I need to rename these fields here similar
Chandan
2017/06/01 05:54:26
I have mapped the existing browser to gpu IPC mess
| |
38 // be put onto shared memory associated with |output_video_frame_handle| | |
xhwang
2017/06/01 05:17:19
|output_video_frame_handle| not defined anywhere,
| |
39 // with size limit |output_buffer_size|. | |
40 Decode(JpegDecodeInfo info); | |
xhwang
2017/06/01 05:17:19
Is it a one-to-one mapping between Decode() and On
Chandan
2017/06/01 05:54:26
Decode() and OnDecodeAck() are seperate calls, eac
| |
41 | |
42 // TODO(c.padhi): This method might not be required, see | |
43 // http://crbug.com/699255. | |
44 Uninitialize(); | |
45 }; | |
OLD | NEW |