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 <queue> | 10 #include <queue> |
10 #include <vector> | 11 #include <vector> |
11 | 12 |
12 #include "base/callback.h" | 13 #include "base/callback.h" |
13 #include "base/memory/scoped_ptr.h" | |
14 #include "base/threading/thread_checker.h" | 14 #include "base/threading/thread_checker.h" |
15 #include "chrome/gpu/arc_video_accelerator.h" | 15 #include "chrome/gpu/arc_video_accelerator.h" |
16 #include "gpu/command_buffer/service/gpu_preferences.h" | 16 #include "gpu/command_buffer/service/gpu_preferences.h" |
17 #include "media/video/video_decode_accelerator.h" | 17 #include "media/video/video_decode_accelerator.h" |
18 | 18 |
19 namespace chromeos { | 19 namespace chromeos { |
20 namespace arc { | 20 namespace arc { |
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 |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 int64_t timestamp); | 101 int64_t timestamp); |
102 | 102 |
103 // Finds the InputRecord which matches to given |bitstream_buffer_id|. | 103 // Finds the InputRecord which matches to given |bitstream_buffer_id|. |
104 // Returns |nullptr| if it cannot be found. | 104 // Returns |nullptr| if it cannot be found. |
105 InputRecord* FindInputRecord(int32_t bitstream_buffer_id); | 105 InputRecord* FindInputRecord(int32_t bitstream_buffer_id); |
106 | 106 |
107 // When true, an EOS output buffer need to be sent to |arc_client_| once an | 107 // When true, an EOS output buffer need to be sent to |arc_client_| once an |
108 // output buffer is available. | 108 // output buffer is available. |
109 bool pending_eos_output_buffer_; | 109 bool pending_eos_output_buffer_; |
110 | 110 |
111 scoped_ptr<media::VideoDecodeAccelerator> vda_; | 111 std::unique_ptr<media::VideoDecodeAccelerator> vda_; |
112 | 112 |
113 // It's safe to use the pointer here, the life cycle of the |arc_client_| | 113 // It's safe to use the pointer here, the life cycle of the |arc_client_| |
114 // is longer than this ArcGpuVideoDecodeAccelerator. | 114 // is longer than this ArcGpuVideoDecodeAccelerator. |
115 ArcVideoAccelerator::Client* arc_client_; | 115 ArcVideoAccelerator::Client* arc_client_; |
116 | 116 |
117 // The next ID for the bitstream buffer, started from 0. | 117 // The next ID for the bitstream buffer, started from 0. |
118 int32_t next_bitstream_buffer_id_; | 118 int32_t next_bitstream_buffer_id_; |
119 | 119 |
120 gfx::Size coded_size_; | 120 gfx::Size coded_size_; |
121 | 121 |
(...skipping 21 matching lines...) Expand all Loading... |
143 | 143 |
144 gpu::GpuPreferences gpu_preferences_; | 144 gpu::GpuPreferences gpu_preferences_; |
145 | 145 |
146 DISALLOW_COPY_AND_ASSIGN(ArcGpuVideoDecodeAccelerator); | 146 DISALLOW_COPY_AND_ASSIGN(ArcGpuVideoDecodeAccelerator); |
147 }; | 147 }; |
148 | 148 |
149 } // namespace arc | 149 } // namespace arc |
150 } // namespace chromeos | 150 } // namespace chromeos |
151 | 151 |
152 #endif // CHROME_GPU_ARC_GPU_VIDEO_DECODE_ACCELERATOR_H_ | 152 #endif // CHROME_GPU_ARC_GPU_VIDEO_DECODE_ACCELERATOR_H_ |
OLD | NEW |