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

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

Issue 1432963003: [Ozone] Extends the lifetime of VaapiWrapper (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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_
OLDNEW
« no previous file with comments | « content/common/gpu/media/vaapi_tfp_picture.cc ('k') | content/common/gpu/media/vaapi_video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698