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

Unified 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 side-by-side diff with in-line comments
Download patch
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..ec80ea61eafda7e086c861f6adbefbd6d0e4084d
--- /dev/null
+++ b/media/gpu/mojo/jpeg_decoder.mojom
@@ -0,0 +1,37 @@
+// 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/capture/mojo/video_capture_types.mojom";
+
+enum Error {
+ NO_ERRORS,
+ INVALID_ARGUMENT,
+ UNREADABLE_INPUT,
+ PARSE_JPEG_FAILED,
+ UNSUPPORTED_JPEG,
+ PLATFORM_FAILURE,
+};
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.
+
+interface GpuJpegDecodeAcceleratorClient {
+ // Report decode status.
+ OnDecodeAck(int32 bitstream_buffer_id, Error error);
+};
+
+interface GpuJpegDecodeAccelerator {
+ // Create and initialize a hardware jpeg decoder.
+ // Created decoder should be freed with Destroy() when no longer needed.
+ 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.
+
+ // 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
+ // be put onto shared memory associated with |output_video_frame_handle|
+ // with size limit |output_buffer_size|.
+ 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.
+
+ // Destroy request to the decoder.
+ 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.
+};

Powered by Google App Engine
This is Rietveld 408576698