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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 scoped_ptr<base::WeakPtrFactory<Client> > client_ptr_factory_; | 242 scoped_ptr<base::WeakPtrFactory<Client> > client_ptr_factory_; |
243 base::WeakPtr<Client> client_; | 243 base::WeakPtr<Client> client_; |
244 | 244 |
245 scoped_ptr<VaapiWrapper> vaapi_wrapper_; | 245 scoped_ptr<VaapiWrapper> vaapi_wrapper_; |
246 | 246 |
247 // Comes after vaapi_wrapper_ to ensure its destructor is executed before | 247 // Comes after vaapi_wrapper_ to ensure its destructor is executed before |
248 // vaapi_wrapper_ is destroyed. | 248 // vaapi_wrapper_ is destroyed. |
249 scoped_ptr<VaapiH264Decoder> decoder_; | 249 scoped_ptr<VaapiH264Decoder> decoder_; |
250 base::Thread decoder_thread_; | 250 base::Thread decoder_thread_; |
251 // Use this to post tasks to |decoder_thread_| instead of | 251 // Use this to post tasks to |decoder_thread_| instead of |
252 // |decoder_thread_.message_loop()| because the latter will be NULL once | 252 // |decoder_thread_.message_loop()| because the latter will be nullptr once |
253 // |decoder_thread_.Stop()| returns. | 253 // |decoder_thread_.Stop()| returns. |
254 scoped_refptr<base::MessageLoopProxy> decoder_thread_proxy_; | 254 scoped_refptr<base::MessageLoopProxy> decoder_thread_proxy_; |
255 | 255 |
256 int num_frames_at_client_; | 256 int num_frames_at_client_; |
257 int num_stream_bufs_at_decoder_; | 257 int num_stream_bufs_at_decoder_; |
258 | 258 |
259 // Whether we are waiting for any pending_output_cbs_ to be run before | 259 // Whether we are waiting for any pending_output_cbs_ to be run before |
260 // NotifyingFlushDone. | 260 // NotifyingFlushDone. |
261 bool finish_flush_pending_; | 261 bool finish_flush_pending_; |
262 | 262 |
263 // Decoder requested a new surface set and we are waiting for all the surfaces | 263 // Decoder requested a new surface set and we are waiting for all the surfaces |
264 // to be returned before we can free them. | 264 // to be returned before we can free them. |
265 bool awaiting_va_surfaces_recycle_; | 265 bool awaiting_va_surfaces_recycle_; |
266 | 266 |
267 // Last requested number/resolution of output picture buffers. | 267 // Last requested number/resolution of output picture buffers. |
268 size_t requested_num_pics_; | 268 size_t requested_num_pics_; |
269 gfx::Size requested_pic_size_; | 269 gfx::Size requested_pic_size_; |
270 | 270 |
271 // The WeakPtrFactory for |weak_this_|. | 271 // The WeakPtrFactory for |weak_this_|. |
272 base::WeakPtrFactory<VaapiVideoDecodeAccelerator> weak_this_factory_; | 272 base::WeakPtrFactory<VaapiVideoDecodeAccelerator> weak_this_factory_; |
273 | 273 |
274 DISALLOW_COPY_AND_ASSIGN(VaapiVideoDecodeAccelerator); | 274 DISALLOW_COPY_AND_ASSIGN(VaapiVideoDecodeAccelerator); |
275 }; | 275 }; |
276 | 276 |
277 } // namespace content | 277 } // namespace content |
278 | 278 |
279 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_VIDEO_DECODE_ACCELERATOR_H_ | 279 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_VIDEO_DECODE_ACCELERATOR_H_ |
OLD | NEW |