Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Side by Side Diff: media/gpu/mojo/jpeg_decoder.mojom

Issue 2905823002: Add Mojo interfaces for GpuJpegDecodeAccelerator and GpuJpegDecodeAcceleratorHost (Closed)
Patch Set: mojo interface Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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/capture/mojo/video_capture_types.mojom";
8
9 enum Error {
10 NO_ERRORS,
11 INVALID_ARGUMENT,
12 UNREADABLE_INPUT,
13 PARSE_JPEG_FAILED,
14 UNSUPPORTED_JPEG,
15 PLATFORM_FAILURE,
16 };
mcasas 2017/05/26 14:39:59 I would move struct JpegDecodeInfo here, what'd be
Chandan 2017/05/26 15:10:11 Initial idea behind this CL was only to add these
Chandan 2017/05/29 13:02:33 Done.
17
18 interface GpuJpegDecodeAcceleratorClient {
19 // Report decode status.
20 OnDecodeAck(int32 bitstream_buffer_id, Error error);
21 };
22
23 interface GpuJpegDecodeAccelerator {
24 // Create and initialize a hardware jpeg decoder.
25 // Created decoder should be freed with Destroy() when no longer needed.
26 CreateJpegDecoder(GpuJpegDecodeAcceleratorClient client) => (bool success);
mcasas 2017/05/26 14:39:59 Why not: CreateJpegDecoder() => (GpuJpegDeco
Chandan 2017/05/26 15:10:11 You mean return a null GpuJpegDecodeAcceleratorCli
mcasas 2017/05/26 15:36:14 OIC, so it's an inout param. Hmmm. See my comments
chfremer 2017/05/26 18:12:13 Since this does not seem to produce and return an
Chandan 2017/05/29 13:02:33 Done.
27
28 // Decode one JPEG image from shared memory |input_buffer_handle| with size
29 // |input_buffer_size|. The input buffer is associated with |input_buffer_id|
30 // and the size of JPEG image is |coded_size|. Decoded I420 frame data will
31 // be put onto shared memory associated with |output_video_frame_handle|
32 // with size limit |output_buffer_size|.
33 Decode(media.mojom.JpegDecodeInfo info);
mcasas 2017/05/26 14:39:59 Same idea here: Decode() => (JpegDecodeInfo
Chandan 2017/05/29 13:02:33 Deleted media.mojom.
34
35 // Destroy request to the decoder.
36 Destroy();
mcasas 2017/05/26 14:39:59 This method is confusing: does it destroy a Decode
Chandan 2017/05/26 15:10:11 I think existing implementation in GpuJpegDecodeAc
mcasas 2017/05/26 15:36:13 If it's a verbatim copy, then it's fine to progres
Chandan 2017/05/29 13:02:33 Done.
37 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698