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

Unified Diff: components/arc/common/video_accelerator.mojom

Issue 1567623006: Implement GpuArcVideoService::AcceleratorStub using mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@arc-1-video-service
Patch Set: rebase, update interface Created 4 years, 11 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 | « components/arc/BUILD.gn ('k') | content/common/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/arc/common/video_accelerator.mojom
diff --git a/components/arc/common/video_accelerator.mojom b/components/arc/common/video_accelerator.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..faea05f0981d5f435950de779c92bfc475907645
--- /dev/null
+++ b/components/arc/common/video_accelerator.mojom
@@ -0,0 +1,93 @@
+// Copyright 2016 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 arc;
+
+[Client=VideoAcceleratorServiceClient]
+
+enum HalPixelFormatExtension {
+ HAL_PIXEL_FORMAT_H264 = 0x34363248,
+ HAL_PIXEL_FORMAT_VP8 = 0x00385056,
+};
+
+enum PortType {
+ PORT_INPUT = 0,
+ PORT_OUTPUT = 1,
+};
+
+// TODO(kcwu): move into VideoAcceleratorService
+enum DeviceType {
+ DEVICE_ENCODER = 0,
+ DEVICE_DECODER = 1,
+};
+
+// TODO(kcwu): move into BufferFormat
+enum MemoryType {
+ MEMORY_SHARED_MEMORY = 1,
+ MEMORY_DMABUF = 2,
+};
+
+enum BufferFlag {
+ BUFFER_FLAG_EOS = 1,
+};
+
+struct BufferMetadata {
+ int64 timestamp; // in microseconds
+ uint32 flags;
+ uint32 bytes_used;
+};
+
+struct BufferFormat {
+ uint32 pixel_format; // the v4l2 fourcc format
+ MemoryType memory_type;
+};
+
+struct VideoFormat {
+ uint32 pixel_format;
+ uint32 image_size;
+
+ // minimal number of buffers required to process the video.
+ uint32 min_num_buffers;
+ uint32 coded_width;
+ uint32 coded_height;
+ uint32 crop_left;
+ uint32 crop_width;
+ uint32 crop_top;
+ uint32 crop_height;
+};
+
+interface VideoAcceleratorService {
+ Initialize(DeviceType device) => (bool result);
+
+ BindSharedMemory(PortType port, uint32 index, handle ashmem_fd,
+ uint64 offset, uint64 length) => (bool result);
+
+ BindDmabuf(PortType port, uint32 index, handle dmabuf_fd) => (bool result);
+
+ UseBuffer(PortType port, uint32 index, BufferMetadata metadata);
+
+ SetBufferCount(PortType port, uint64 set_count) => (bool result, uint64 reply_count);
+
+ Reset() => ();
+
+ SetBufferFormat(PortType port, BufferFormat format) => (bool result);
+};
+
+interface VideoAcceleratorServiceClient {
+ enum Error {
+ NO_ERROR = 0,
+ ILLEGAL_STATE = 1,
+ INVALID_ARGUMENT = 2,
+ UNREADABLE_INPUT = 3,
+ PLATFORM_FAILURE = 4,
+ };
+
+ SetService(VideoAcceleratorService service_ptr);
+
+ OnError(Error error);
+
+ OnBufferDone(PortType port, uint32 index, BufferMetadata metadata);
+
+ OnOutputFormatChanged(VideoFormat format);
+};
« no previous file with comments | « components/arc/BUILD.gn ('k') | content/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698