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

Side by Side Diff: components/arc/common/video_accelerator.mojom

Issue 1641353003: GpuArcVideoService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@arc-4-owen-ArcGpuVideoDecodeAccelerator
Patch Set: modify content gui client hook Created 4 years, 9 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 2016 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 arc;
6
7 [Client=VideoAcceleratorServiceClient]
8
9 enum HalPixelFormatExtension {
Luis Héctor Chávez 2016/03/24 17:24:20 Do you think all these enums will need modificatio
kcwu 2016/03/28 13:17:35 Done.
10 HAL_PIXEL_FORMAT_H264 = 0x34363248,
11 HAL_PIXEL_FORMAT_VP8 = 0x00385056,
12 };
13
14 enum PortType {
15 PORT_INPUT = 0,
16 PORT_OUTPUT = 1,
17 };
18
19 enum BufferFlag {
20 BUFFER_FLAG_EOS = 1,
21 };
22
23 struct BufferMetadata {
24 int64 timestamp; // in microseconds
25 uint32 flags;
26 uint32 bytes_used;
27 };
28
29 struct VideoFormat {
30 uint32 pixel_format;
31 uint32 buffer_size;
32
33 // minimal number of buffers required to process the video.
34 uint32 min_num_buffers;
35 uint32 coded_width;
36 uint32 coded_height;
37 uint32 crop_left;
38 uint32 crop_width;
39 uint32 crop_top;
40 uint32 crop_height;
41 };
42
43 struct ArcVideoAcceleratorConfig {
44 enum DeviceType {
45 DEVICE_ENCODER = 0,
46 DEVICE_DECODER = 1,
47 };
48
49 DeviceType device_type;
50 uint64 num_input_buffers;
51 uint32 input_pixel_format;
52 };
53
54 interface VideoAcceleratorService {
55 Initialize(ArcVideoAcceleratorConfig config) => (bool result);
Luis Héctor Chávez 2016/03/24 17:24:20 Can you add explicit ordinals?
kcwu 2016/03/28 13:17:35 Done.
56
57 BindSharedMemory(PortType port, uint32 index, handle ashmem_fd,
58 uint64 offset, uint64 length);
59
60 BindDmabuf(PortType port, uint32 index, handle dmabuf_fd);
61
62 UseBuffer(PortType port, uint32 index, BufferMetadata metadata);
63
64 SetNumberOfOutputBuffers(uint64 number);
65
66 Reset();
67 };
68
69 interface VideoAcceleratorServiceClient {
70 enum Error {
71 NO_ERROR = 0,
72 ILLEGAL_STATE = 1,
73 INVALID_ARGUMENT = 2,
74 UNREADABLE_INPUT = 3,
75 PLATFORM_FAILURE = 4,
76 };
77
78 Init(VideoAcceleratorService service_ptr);
79
80 OnError(Error error);
81
82 OnBufferDone(PortType port, uint32 index, BufferMetadata metadata);
83
84 OnResetDone();
85
86 OnOutputFormatChanged(VideoFormat format);
87 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698