| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 contains an implementation of VideoDecoderAccelerator | 5 // This file contains an implementation of VideoDecoderAccelerator |
| 6 // that utilizes hardware video decoder present on Intel CPUs. | 6 // that utilizes hardware video decoder present on Intel CPUs. |
| 7 | 7 |
| 8 #ifndef CONTENT_COMMON_GPU_MEDIA_VAAPI_VIDEO_DECODE_ACCELERATOR_H_ | 8 #ifndef CONTENT_COMMON_GPU_MEDIA_VAAPI_VIDEO_DECODE_ACCELERATOR_H_ |
| 9 #define CONTENT_COMMON_GPU_MEDIA_VAAPI_VIDEO_DECODE_ACCELERATOR_H_ | 9 #define CONTENT_COMMON_GPU_MEDIA_VAAPI_VIDEO_DECODE_ACCELERATOR_H_ |
| 10 | 10 |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 // Signalled when input buffers are queued onto the input_buffers_ queue. | 216 // Signalled when input buffers are queued onto the input_buffers_ queue. |
| 217 base::ConditionVariable input_ready_; | 217 base::ConditionVariable input_ready_; |
| 218 | 218 |
| 219 // Current input buffer at decoder. | 219 // Current input buffer at decoder. |
| 220 linked_ptr<InputBuffer> curr_input_buffer_; | 220 linked_ptr<InputBuffer> curr_input_buffer_; |
| 221 | 221 |
| 222 // Queue for incoming output buffers (texture ids). | 222 // Queue for incoming output buffers (texture ids). |
| 223 typedef std::queue<int32> OutputBuffers; | 223 typedef std::queue<int32> OutputBuffers; |
| 224 OutputBuffers output_buffers_; | 224 OutputBuffers output_buffers_; |
| 225 | 225 |
| 226 scoped_ptr<VaapiWrapper> vaapi_wrapper_; | 226 scoped_refptr<VaapiWrapper> vaapi_wrapper_; |
| 227 | 227 |
| 228 typedef std::map<int32, linked_ptr<VaapiPicture>> Pictures; | 228 typedef std::map<int32, linked_ptr<VaapiPicture>> Pictures; |
| 229 // All allocated Pictures, regardless of their current state. | 229 // All allocated Pictures, regardless of their current state. |
| 230 // Pictures are allocated once and destroyed at the end of decode. | 230 // Pictures are allocated once and destroyed at the end of decode. |
| 231 // Comes after vaapi_wrapper_ to ensure all pictures are destroyed | 231 // Comes after vaapi_wrapper_ to ensure all pictures are destroyed |
| 232 // before vaapi_wrapper_ is destroyed. | 232 // before vaapi_wrapper_ is destroyed. |
| 233 Pictures pictures_; | 233 Pictures pictures_; |
| 234 | 234 |
| 235 // Return a VaapiPicture associated with given client-provided id. | 235 // Return a VaapiPicture associated with given client-provided id. |
| 236 VaapiPicture* PictureById(int32 picture_buffer_id); | 236 VaapiPicture* PictureById(int32 picture_buffer_id); |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 | 307 |
| 308 // The WeakPtrFactory for |weak_this_|. | 308 // The WeakPtrFactory for |weak_this_|. |
| 309 base::WeakPtrFactory<VaapiVideoDecodeAccelerator> weak_this_factory_; | 309 base::WeakPtrFactory<VaapiVideoDecodeAccelerator> weak_this_factory_; |
| 310 | 310 |
| 311 DISALLOW_COPY_AND_ASSIGN(VaapiVideoDecodeAccelerator); | 311 DISALLOW_COPY_AND_ASSIGN(VaapiVideoDecodeAccelerator); |
| 312 }; | 312 }; |
| 313 | 313 |
| 314 } // namespace content | 314 } // namespace content |
| 315 | 315 |
| 316 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_VIDEO_DECODE_ACCELERATOR_H_ | 316 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_VIDEO_DECODE_ACCELERATOR_H_ |
| OLD | NEW |