Chromium Code Reviews| OLD | NEW |
|---|---|
| 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] |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 43 DEVICE_ENCODER = 0, | 43 DEVICE_ENCODER = 0, |
| 44 DEVICE_DECODER = 1, | 44 DEVICE_DECODER = 1, |
| 45 }; | 45 }; |
| 46 | 46 |
| 47 DeviceType device_type; | 47 DeviceType device_type; |
| 48 uint32 num_input_buffers; | 48 uint32 num_input_buffers; |
| 49 uint32 input_pixel_format; | 49 uint32 input_pixel_format; |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 interface VideoAcceleratorService { | 52 interface VideoAcceleratorService { |
| 53 Initialize@0(ArcVideoAcceleratorConfig config) => (bool result); | 53 enum Error { |
| 54 NO_ERROR = 0, | |
| 55 ILLEGAL_STATE = 1, | |
| 56 INVALID_ARGUMENT = 2, | |
| 57 UNREADABLE_INPUT = 3, | |
| 58 PLATFORM_FAILURE = 4, | |
| 59 INSUFFICIENT_RESOURCES = 5, | |
| 60 }; | |
| 61 | |
| 62 Initialize@0(ArcVideoAcceleratorConfig config) => (bool result, [MinVersion=1] Error error); | |
|
owenlin_google
2016/06/03 02:26:54
line too long?
kcwu
2016/06/03 13:14:15
Done.
| |
| 54 | 63 |
| 55 BindSharedMemory@1(PortType port, uint32 index, handle ashmem_fd, | 64 BindSharedMemory@1(PortType port, uint32 index, handle ashmem_fd, |
| 56 uint32 offset, uint32 length); | 65 uint32 offset, uint32 length); |
| 57 | 66 |
| 58 BindDmabuf@2(PortType port, uint32 index, handle dmabuf_fd, int32 stride); | 67 BindDmabuf@2(PortType port, uint32 index, handle dmabuf_fd, int32 stride); |
| 59 | 68 |
| 60 UseBuffer@3(PortType port, uint32 index, BufferMetadata metadata); | 69 UseBuffer@3(PortType port, uint32 index, BufferMetadata metadata); |
| 61 | 70 |
| 62 SetNumberOfOutputBuffers@4(uint32 number); | 71 SetNumberOfOutputBuffers@4(uint32 number); |
| 63 | 72 |
| 64 Reset@5(); | 73 Reset@5(); |
| 65 | 74 |
| 66 Flush@6(); | 75 Flush@6(); |
| 67 }; | 76 }; |
| 68 | 77 |
| 69 interface VideoAcceleratorServiceClient { | 78 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@0(VideoAcceleratorService service_ptr); | 79 Init@0(VideoAcceleratorService service_ptr); |
| 79 | 80 |
| 80 OnError@1(Error error); | 81 OnError@1(VideoAcceleratorService.Error error); |
| 81 | 82 |
| 82 OnBufferDone@2(PortType port, uint32 index, BufferMetadata metadata); | 83 OnBufferDone@2(PortType port, uint32 index, BufferMetadata metadata); |
| 83 | 84 |
| 84 OnResetDone@3(); | 85 OnResetDone@3(); |
| 85 | 86 |
| 86 OnOutputFormatChanged@4(VideoFormat format); | 87 OnOutputFormatChanged@4(VideoFormat format); |
| 87 | 88 |
| 88 OnFlushDone@5(); | 89 OnFlushDone@5(); |
| 89 }; | 90 }; |
| OLD | NEW |