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

Side by Side Diff: content/common/gpu/media/vaapi_video_encode_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 CONTENT_COMMON_GPU_MEDIA_VAAPI_VIDEO_ENCODE_ACCELERATOR_H_ 5 #ifndef CONTENT_COMMON_GPU_MEDIA_VAAPI_VIDEO_ENCODE_ACCELERATOR_H_
6 #define CONTENT_COMMON_GPU_MEDIA_VAAPI_VIDEO_ENCODE_ACCELERATOR_H_ 6 #define CONTENT_COMMON_GPU_MEDIA_VAAPI_VIDEO_ENCODE_ACCELERATOR_H_
7 7
8 #include <list> 8 #include <list>
9 #include <queue> 9 #include <queue>
10 10
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 std::queue<linked_ptr<InputFrameRef> > encoder_input_queue_; 228 std::queue<linked_ptr<InputFrameRef> > encoder_input_queue_;
229 229
230 // BitstreamBuffers mapped, ready to be filled. 230 // BitstreamBuffers mapped, ready to be filled.
231 std::queue<linked_ptr<BitstreamBufferRef> > available_bitstream_buffers_; 231 std::queue<linked_ptr<BitstreamBufferRef> > available_bitstream_buffers_;
232 232
233 // Jobs submitted for encode, awaiting bitstream buffers to become available. 233 // Jobs submitted for encode, awaiting bitstream buffers to become available.
234 std::queue<linked_ptr<EncodeJob> > submitted_encode_jobs_; 234 std::queue<linked_ptr<EncodeJob> > submitted_encode_jobs_;
235 235
236 // Encoder thread. All tasks are executed on it. 236 // Encoder thread. All tasks are executed on it.
237 base::Thread encoder_thread_; 237 base::Thread encoder_thread_;
238 scoped_refptr<base::MessageLoopProxy> encoder_thread_proxy_; 238 scoped_refptr<base::SingleThreadTaskRunner> encoder_thread_proxy_;
no sievers 2015/05/12 18:11:30 nit: consider renaming |encoder_thread_proxy_|
Sami 2015/05/13 18:17:52 Done.
239 239
240 const scoped_refptr<base::MessageLoopProxy> child_message_loop_proxy_; 240 const scoped_refptr<base::SingleThreadTaskRunner> child_task_runner_;
241 241
242 // To expose client callbacks from VideoEncodeAccelerator. 242 // To expose client callbacks from VideoEncodeAccelerator.
243 // NOTE: all calls to these objects *MUST* be executed on 243 // NOTE: all calls to these objects *MUST* be executed on
244 // child_message_loop_proxy_. 244 // child_task_runner_.
245 scoped_ptr<base::WeakPtrFactory<Client> > client_ptr_factory_; 245 scoped_ptr<base::WeakPtrFactory<Client> > client_ptr_factory_;
246 base::WeakPtr<Client> client_; 246 base::WeakPtr<Client> client_;
247 247
248 // WeakPtr to post from the encoder thread back to the ChildThread, as it may 248 // WeakPtr to post from the encoder thread back to the ChildThread, as it may
249 // outlive this. Posting from the ChildThread using base::Unretained(this) 249 // outlive this. Posting from the ChildThread using base::Unretained(this)
250 // to the encoder thread is safe, because |this| always outlives the encoder 250 // to the encoder thread is safe, because |this| always outlives the encoder
251 // thread (it's a member of this class). 251 // thread (it's a member of this class).
252 base::WeakPtr<VaapiVideoEncodeAccelerator> weak_this_; 252 base::WeakPtr<VaapiVideoEncodeAccelerator> weak_this_;
253 base::WeakPtrFactory<VaapiVideoEncodeAccelerator> weak_this_ptr_factory_; 253 base::WeakPtrFactory<VaapiVideoEncodeAccelerator> weak_this_ptr_factory_;
254 254
255 DISALLOW_COPY_AND_ASSIGN(VaapiVideoEncodeAccelerator); 255 DISALLOW_COPY_AND_ASSIGN(VaapiVideoEncodeAccelerator);
256 }; 256 };
257 257
258 } // namespace content 258 } // namespace content
259 259
260 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_VIDEO_ENCODE_ACCELERATOR_H_ 260 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_VIDEO_ENCODE_ACCELERATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698