Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(562)

Side by Side Diff: content/common/gpu/media/vaapi_video_decode_accelerator.h

Issue 1134113002: content/common: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Android build fix. Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 // Accelerators come after vaapi_wrapper_ to ensure they are destroyed first. 275 // Accelerators come after vaapi_wrapper_ to ensure they are destroyed first.
276 scoped_ptr<VaapiH264Accelerator> h264_accelerator_; 276 scoped_ptr<VaapiH264Accelerator> h264_accelerator_;
277 scoped_ptr<VaapiVP8Accelerator> vp8_accelerator_; 277 scoped_ptr<VaapiVP8Accelerator> vp8_accelerator_;
278 // After *_accelerator_ to ensure correct destruction order. 278 // After *_accelerator_ to ensure correct destruction order.
279 scoped_ptr<AcceleratedVideoDecoder> decoder_; 279 scoped_ptr<AcceleratedVideoDecoder> decoder_;
280 280
281 base::Thread decoder_thread_; 281 base::Thread decoder_thread_;
282 // Use this to post tasks to |decoder_thread_| instead of 282 // Use this to post tasks to |decoder_thread_| instead of
283 // |decoder_thread_.message_loop()| because the latter will be NULL once 283 // |decoder_thread_.message_loop()| because the latter will be NULL once
284 // |decoder_thread_.Stop()| returns. 284 // |decoder_thread_.Stop()| returns.
285 scoped_refptr<base::MessageLoopProxy> decoder_thread_proxy_; 285 scoped_refptr<base::SingleThreadTaskRunner> decoder_thread_proxy_;
no sievers 2015/05/12 18:11:30 nit: consider renaming |decoder_thread_proxy_|
Sami 2015/05/13 18:17:52 Done.
286 286
287 int num_frames_at_client_; 287 int num_frames_at_client_;
288 int num_stream_bufs_at_decoder_; 288 int num_stream_bufs_at_decoder_;
289 289
290 // Whether we are waiting for any pending_output_cbs_ to be run before 290 // Whether we are waiting for any pending_output_cbs_ to be run before
291 // NotifyingFlushDone. 291 // NotifyingFlushDone.
292 bool finish_flush_pending_; 292 bool finish_flush_pending_;
293 293
294 // Decoder requested a new surface set and we are waiting for all the surfaces 294 // Decoder requested a new surface set and we are waiting for all the surfaces
295 // to be returned before we can free them. 295 // to be returned before we can free them.
296 bool awaiting_va_surfaces_recycle_; 296 bool awaiting_va_surfaces_recycle_;
297 297
298 // Last requested number/resolution of output picture buffers. 298 // Last requested number/resolution of output picture buffers.
299 size_t requested_num_pics_; 299 size_t requested_num_pics_;
300 gfx::Size requested_pic_size_; 300 gfx::Size requested_pic_size_;
301 301
302 // Binds the provided GLImage to a givenr client texture ID & texture target 302 // Binds the provided GLImage to a givenr client texture ID & texture target
303 // combination in GLES. 303 // combination in GLES.
304 base::Callback<void(uint32, uint32, scoped_refptr<gfx::GLImage>)> bind_image_; 304 base::Callback<void(uint32, uint32, scoped_refptr<gfx::GLImage>)> bind_image_;
305 305
306 // The WeakPtrFactory for |weak_this_|. 306 // The WeakPtrFactory for |weak_this_|.
307 base::WeakPtrFactory<VaapiVideoDecodeAccelerator> weak_this_factory_; 307 base::WeakPtrFactory<VaapiVideoDecodeAccelerator> weak_this_factory_;
308 308
309 DISALLOW_COPY_AND_ASSIGN(VaapiVideoDecodeAccelerator); 309 DISALLOW_COPY_AND_ASSIGN(VaapiVideoDecodeAccelerator);
310 }; 310 };
311 311
312 } // namespace content 312 } // namespace content
313 313
314 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_VIDEO_DECODE_ACCELERATOR_H_ 314 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_VIDEO_DECODE_ACCELERATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698