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

Unified Diff: media/gpu/mojo/jpeg_decoder.mojom

Issue 2905823002: Add Mojo interfaces for GpuJpegDecodeAccelerator and GpuJpegDecodeAcceleratorHost (Closed)
Patch Set: added //ui/gfx/geometry/mojo to deps 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
« no previous file with comments | « media/gpu/mojo/OWNERS ('k') | media/mojo/interfaces/media_types.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..15a5c92e63eeafd756560f2566f7cfe976fb212a
--- /dev/null
+++ b/media/gpu/mojo/jpeg_decoder.mojom
@@ -0,0 +1,47 @@
+// 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);
+};
+
+interface GpuJpegDecodeAccelerator {
+ // Create and initialize a hardware jpeg decoder.
+ // Created decoder should be freed with Uninitialize() when no longer needed.
+ Initialize(GpuJpegDecodeAcceleratorClient client) => (bool success);
chfremer 2017/05/30 18:07:24 nit: Comment is slightly confusing. If we say "Cre
Chandan 2017/05/31 13:19:58 Uninitialize() is most likely to be removed. Hence
+
+ // 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(JpegDecodeInfo info);
+
+ // TODO(c.padhi): This method might not be required, see
+ // http://crbug.com/699255.
+ // Destroy request to the decoder.
+ Uninitialize();
+};
« no previous file with comments | « media/gpu/mojo/OWNERS ('k') | media/mojo/interfaces/media_types.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698