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

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

Issue 1432963003: [Ozone] Extends the lifetime of VaapiWrapper (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 void TryToReturnBitstreamBuffer(); 143 void TryToReturnBitstreamBuffer();
144 144
145 // Puts the encoder into en error state and notifies client about the error. 145 // Puts the encoder into en error state and notifies client about the error.
146 void NotifyError(Error error); 146 void NotifyError(Error error);
147 147
148 // Sets the encoder state on the correct thread. 148 // Sets the encoder state on the correct thread.
149 void SetState(State state); 149 void SetState(State state);
150 150
151 // VaapiWrapper is the owner of all HW resources (surfaces and buffers) 151 // VaapiWrapper is the owner of all HW resources (surfaces and buffers)
152 // and will free them on destruction. 152 // and will free them on destruction.
153 scoped_ptr<VaapiWrapper> vaapi_wrapper_; 153 scoped_refptr<VaapiWrapper> vaapi_wrapper_;
154 154
155 // Input profile and sizes. 155 // Input profile and sizes.
156 media::VideoCodecProfile profile_; 156 media::VideoCodecProfile profile_;
157 gfx::Size visible_size_; 157 gfx::Size visible_size_;
158 gfx::Size coded_size_; // Macroblock-aligned. 158 gfx::Size coded_size_; // Macroblock-aligned.
159 // Width/height in macroblocks. 159 // Width/height in macroblocks.
160 unsigned int mb_width_; 160 unsigned int mb_width_;
161 unsigned int mb_height_; 161 unsigned int mb_height_;
162 162
163 // Maximum size of the reference list 0. 163 // Maximum size of the reference list 0.
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
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