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

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

Issue 1945543002: Use explicit flush for ArcVideoAccelerator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file defined the mojo interface between Android and Chromium for video 5 // This file defined the mojo interface between Android and Chromium for video
6 // decoding and encoding. See comments of ArcVideoAccelerator for more info. 6 // decoding and encoding. See comments of ArcVideoAccelerator for more info.
7 7
8 module arc.mojom; 8 module arc.mojom;
9 9
10 [Extensible] 10 [Extensible]
11 enum HalPixelFormatExtension { 11 enum HalPixelFormatExtension {
12 HAL_PIXEL_FORMAT_YCbCr_420_888 = 0x23, 12 HAL_PIXEL_FORMAT_YCbCr_420_888 = 0x23,
13 HAL_PIXEL_FORMAT_H264 = 0x34363248, 13 HAL_PIXEL_FORMAT_H264 = 0x34363248,
14 HAL_PIXEL_FORMAT_VP8 = 0x00385056, 14 HAL_PIXEL_FORMAT_VP8 = 0x00385056,
15 }; 15 };
16 16
17 enum PortType { 17 enum PortType {
18 PORT_INPUT = 0, 18 PORT_INPUT = 0,
19 PORT_OUTPUT = 1, 19 PORT_OUTPUT = 1,
20 }; 20 };
21 21
22 [Extensible]
23 enum BufferFlag {
24 BUFFER_FLAG_EOS = 1,
25 };
26
27 struct BufferMetadata { 22 struct BufferMetadata {
28 int64 timestamp; // in microseconds 23 int64 timestamp; // in microseconds
29 uint32 flags; 24 uint32 flags;
30 uint32 bytes_used; 25 uint32 bytes_used;
31 }; 26 };
32 27
33 struct VideoFormat { 28 struct VideoFormat {
34 uint32 pixel_format; 29 uint32 pixel_format;
35 uint32 buffer_size; 30 uint32 buffer_size;
36 31
(...skipping 24 matching lines...) Expand all
61 BindSharedMemory@1(PortType port, uint32 index, handle ashmem_fd, 56 BindSharedMemory@1(PortType port, uint32 index, handle ashmem_fd,
62 uint32 offset, uint32 length); 57 uint32 offset, uint32 length);
63 58
64 BindDmabuf@2(PortType port, uint32 index, handle dmabuf_fd); 59 BindDmabuf@2(PortType port, uint32 index, handle dmabuf_fd);
65 60
66 UseBuffer@3(PortType port, uint32 index, BufferMetadata metadata); 61 UseBuffer@3(PortType port, uint32 index, BufferMetadata metadata);
67 62
68 SetNumberOfOutputBuffers@4(uint32 number); 63 SetNumberOfOutputBuffers@4(uint32 number);
69 64
70 Reset@5(); 65 Reset@5();
66
67 Flush@6();
dcheng 2016/05/07 06:18:11 Out of curiosity, how come we don't do something l
Owen Lin 2016/05/09 07:04:41 Just make it similar to the VDA interface: https:
dcheng 2016/05/09 21:22:00 Wouldn't the code be simpler though if we just use
Owen Lin 2016/05/10 08:26:33 I think you're right that we can use mojo primitiv
71 }; 68 };
72 69
73 interface VideoAcceleratorServiceClient { 70 interface VideoAcceleratorServiceClient {
74 enum Error { 71 enum Error {
75 NO_ERROR = 0, 72 NO_ERROR = 0,
76 ILLEGAL_STATE = 1, 73 ILLEGAL_STATE = 1,
77 INVALID_ARGUMENT = 2, 74 INVALID_ARGUMENT = 2,
78 UNREADABLE_INPUT = 3, 75 UNREADABLE_INPUT = 3,
79 PLATFORM_FAILURE = 4, 76 PLATFORM_FAILURE = 4,
80 }; 77 };
81 78
82 Init@0(VideoAcceleratorService service_ptr); 79 Init@0(VideoAcceleratorService service_ptr);
83 80
84 OnError@1(Error error); 81 OnError@1(Error error);
85 82
86 OnBufferDone@2(PortType port, uint32 index, BufferMetadata metadata); 83 OnBufferDone@2(PortType port, uint32 index, BufferMetadata metadata);
87 84
88 OnResetDone@3(); 85 OnResetDone@3();
89 86
90 OnOutputFormatChanged@4(VideoFormat format); 87 OnOutputFormatChanged@4(VideoFormat format);
88
89 OnFlushDone@5();
91 }; 90 };
OLDNEW
« chrome/gpu/arc_video_accelerator.h ('K') | « chrome/gpu/gpu_arc_video_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698