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_GPU_VIDEO_DECODE_ACCELERATOR_H_ | 5 #ifndef CHROME_GPU_ARC_GPU_VIDEO_DECODE_ACCELERATOR_H_ |
6 #define CHROME_GPU_ARC_GPU_VIDEO_DECODE_ACCELERATOR_H_ | 6 #define CHROME_GPU_ARC_GPU_VIDEO_DECODE_ACCELERATOR_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <memory> | 9 #include <memory> |
10 #include <queue> | 10 #include <queue> |
(...skipping 10 matching lines...) Expand all Loading... |
21 | 21 |
22 // This class is executed in the GPU process. It takes decoding requests from | 22 // This class is executed in the GPU process. It takes decoding requests from |
23 // ARC via IPC channels and translates and sends those requests to an | 23 // ARC via IPC channels and translates and sends those requests to an |
24 // implementation of media::VideoDecodeAccelerator. It also returns the decoded | 24 // implementation of media::VideoDecodeAccelerator. It also returns the decoded |
25 // frames back to the ARC side. | 25 // frames back to the ARC side. |
26 class ArcGpuVideoDecodeAccelerator | 26 class ArcGpuVideoDecodeAccelerator |
27 : public ArcVideoAccelerator, | 27 : public ArcVideoAccelerator, |
28 public media::VideoDecodeAccelerator::Client, | 28 public media::VideoDecodeAccelerator::Client, |
29 public base::SupportsWeakPtr<ArcGpuVideoDecodeAccelerator> { | 29 public base::SupportsWeakPtr<ArcGpuVideoDecodeAccelerator> { |
30 public: | 30 public: |
31 ArcGpuVideoDecodeAccelerator(); | 31 explicit ArcGpuVideoDecodeAccelerator( |
| 32 const gpu::GpuPreferences& gpu_preferences); |
32 ~ArcGpuVideoDecodeAccelerator() override; | 33 ~ArcGpuVideoDecodeAccelerator() override; |
33 | 34 |
34 // Implementation of the ArcVideoAccelerator interface. | 35 // Implementation of the ArcVideoAccelerator interface. |
35 ArcVideoAccelerator::Result Initialize( | 36 ArcVideoAccelerator::Result Initialize( |
36 const Config& config, | 37 const Config& config, |
37 ArcVideoAccelerator::Client* client) override; | 38 ArcVideoAccelerator::Client* client) override; |
38 void SetNumberOfOutputBuffers(size_t number) override; | 39 void SetNumberOfOutputBuffers(size_t number) override; |
39 void BindSharedMemory(PortType port, | 40 void BindSharedMemory(PortType port, |
40 uint32_t index, | 41 uint32_t index, |
41 base::ScopedFD ashmem_fd, | 42 base::ScopedFD ashmem_fd, |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 | 158 |
158 gpu::GpuPreferences gpu_preferences_; | 159 gpu::GpuPreferences gpu_preferences_; |
159 | 160 |
160 DISALLOW_COPY_AND_ASSIGN(ArcGpuVideoDecodeAccelerator); | 161 DISALLOW_COPY_AND_ASSIGN(ArcGpuVideoDecodeAccelerator); |
161 }; | 162 }; |
162 | 163 |
163 } // namespace arc | 164 } // namespace arc |
164 } // namespace chromeos | 165 } // namespace chromeos |
165 | 166 |
166 #endif // CHROME_GPU_ARC_GPU_VIDEO_DECODE_ACCELERATOR_H_ | 167 #endif // CHROME_GPU_ARC_GPU_VIDEO_DECODE_ACCELERATOR_H_ |
OLD | NEW |