Chromium Code Reviews| Index: media/gpu/mojo/jpeg_decoder.mojom |
| diff --git a/media/gpu/mojo/jpeg_decoder.mojom b/media/gpu/mojo/jpeg_decoder.mojom |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..c4a899741763f78743fe35c927de87d8e11237af |
| --- /dev/null |
| +++ b/media/gpu/mojo/jpeg_decoder.mojom |
| @@ -0,0 +1,45 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +module media.mojom; |
| + |
| +import "media/mojo/interfaces/media_types.mojom"; |
| +import "ui/gfx/geometry/mojo/geometry.mojom"; |
| + |
| +enum Error { |
| + NO_ERRORS, |
| + INVALID_ARGUMENT, |
| + UNREADABLE_INPUT, |
| + PARSE_JPEG_FAILED, |
| + UNSUPPORTED_JPEG, |
| + PLATFORM_FAILURE, |
| +}; |
| + |
| +struct JpegDecodeInfo { |
| + BitstreamBuffer input_buffer; |
| + gfx.mojom.Size coded_size; |
| + handle<shared_buffer> output_handle; |
| + uint32 output_buffer_size; |
| +}; |
| + |
| +interface GpuJpegDecodeAcceleratorClient { |
| + // Report decode status. |
| + OnDecodeAck(int32 bitstream_buffer_id, Error error); |
| +}; |
| + |
| +// Initialize() must be called before using Decode(). |
| +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
|
| + Initialize(GpuJpegDecodeAcceleratorClient client) => (bool success); |
| + |
| + // Decode one JPEG image from shared memory |input_buffer_handle| with size |
| + // |input_buffer_size|. The input buffer is associated with |input_buffer_id| |
| + // 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
|
| + // 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,
|
| + // with size limit |output_buffer_size|. |
| + 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
|
| + |
| + // TODO(c.padhi): This method might not be required, see |
| + // http://crbug.com/699255. |
| + Uninitialize(); |
| +}; |