| 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 #ifndef CHROME_GPU_ARC_VIDEO_ACCELERATOR_H_ | 5 #ifndef CHROME_GPU_ARC_VIDEO_ACCELERATOR_H_ |
| 6 #define CHROME_GPU_ARC_VIDEO_ACCELERATOR_H_ | 6 #define CHROME_GPU_ARC_VIDEO_ACCELERATOR_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/files/scoped_file.h" | 10 #include "base/files/scoped_file.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 uint32_t crop_top = 0; | 49 uint32_t crop_top = 0; |
| 50 uint32_t crop_height = 0; | 50 uint32_t crop_height = 0; |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 // The IPC interface between Android and Chromium for video decoding and | 53 // The IPC interface between Android and Chromium for video decoding and |
| 54 // encoding. Input buffers are sent from Android side and get processed in | 54 // encoding. Input buffers are sent from Android side and get processed in |
| 55 // Chromium and the output buffers are returned back to Android side. | 55 // Chromium and the output buffers are returned back to Android side. |
| 56 class ArcVideoAccelerator { | 56 class ArcVideoAccelerator { |
| 57 public: | 57 public: |
| 58 enum Result { | 58 enum Result { |
| 59 // Note: this enum is used for UMA reporting. The existing values should not |
| 60 // be rearranged, reused or removed and any additions should include updates |
| 61 // to UMA reporting and histograms.xml. |
| 59 SUCCESS = 0, | 62 SUCCESS = 0, |
| 60 ILLEGAL_STATE = 1, | 63 ILLEGAL_STATE = 1, |
| 61 INVALID_ARGUMENT = 2, | 64 INVALID_ARGUMENT = 2, |
| 62 UNREADABLE_INPUT = 3, | 65 UNREADABLE_INPUT = 3, |
| 63 PLATFORM_FAILURE = 4, | 66 PLATFORM_FAILURE = 4, |
| 64 INSUFFICIENT_RESOURCES = 5, | 67 INSUFFICIENT_RESOURCES = 5, |
| 68 RESULT_MAX = 6, |
| 65 }; | 69 }; |
| 66 | 70 |
| 67 struct Config { | 71 struct Config { |
| 68 enum DeviceType { | 72 enum DeviceType { |
| 69 DEVICE_ENCODER = 0, | 73 DEVICE_ENCODER = 0, |
| 70 DEVICE_DECODER = 1, | 74 DEVICE_DECODER = 1, |
| 71 }; | 75 }; |
| 72 | 76 |
| 73 DeviceType device_type = DEVICE_DECODER; | 77 DeviceType device_type = DEVICE_DECODER; |
| 74 size_t num_input_buffers = 0; | 78 size_t num_input_buffers = 0; |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 // called. | 161 // called. |
| 158 virtual void Flush() = 0; | 162 virtual void Flush() = 0; |
| 159 | 163 |
| 160 virtual ~ArcVideoAccelerator() {} | 164 virtual ~ArcVideoAccelerator() {} |
| 161 }; | 165 }; |
| 162 | 166 |
| 163 } // namespace arc | 167 } // namespace arc |
| 164 } // namespace chromeos | 168 } // namespace chromeos |
| 165 | 169 |
| 166 #endif // CHROME_GPU_ARC_VIDEO_ACCELERATOR_H_ | 170 #endif // CHROME_GPU_ARC_VIDEO_ACCELERATOR_H_ |
| OLD | NEW |