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

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

Issue 1040513003: VAVDA: Use the new, generic video decoder and accelerator infrastructure. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 8 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
11 #include "base/memory/linked_ptr.h" 11 #include "base/memory/linked_ptr.h"
12 #include "base/threading/thread.h" 12 #include "base/threading/thread.h"
13 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
14 #include "content/common/gpu/media/h264_dpb.h"
14 #include "content/common/gpu/media/va_surface.h" 15 #include "content/common/gpu/media/va_surface.h"
15 #include "content/common/gpu/media/vaapi_h264_dpb.h"
16 #include "content/common/gpu/media/vaapi_wrapper.h" 16 #include "content/common/gpu/media/vaapi_wrapper.h"
17 #include "media/filters/h264_bitstream_buffer.h" 17 #include "media/filters/h264_bitstream_buffer.h"
18 #include "media/video/video_encode_accelerator.h" 18 #include "media/video/video_encode_accelerator.h"
19 19
20 namespace content { 20 namespace content {
21 21
22 // A VideoEncodeAccelerator implementation that uses VA-API 22 // A VideoEncodeAccelerator implementation that uses VA-API
23 // (http://www.freedesktop.org/wiki/Software/vaapi) for HW-accelerated 23 // (http://www.freedesktop.org/wiki/Software/vaapi) for HW-accelerated
24 // video encode. 24 // video encode.
25 class CONTENT_EXPORT VaapiVideoEncodeAccelerator 25 class CONTENT_EXPORT VaapiVideoEncodeAccelerator
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 203
204 // Current SPS, PPS and their packed versions. Packed versions are their NALUs 204 // Current SPS, PPS and their packed versions. Packed versions are their NALUs
205 // in AnnexB format *without* emulation prevention three-byte sequences 205 // in AnnexB format *without* emulation prevention three-byte sequences
206 // (those will be added by the driver). 206 // (those will be added by the driver).
207 media::H264SPS current_sps_; 207 media::H264SPS current_sps_;
208 media::H264BitstreamBuffer packed_sps_; 208 media::H264BitstreamBuffer packed_sps_;
209 media::H264PPS current_pps_; 209 media::H264PPS current_pps_;
210 media::H264BitstreamBuffer packed_pps_; 210 media::H264BitstreamBuffer packed_pps_;
211 211
212 // Picture currently being prepared for encode. 212 // Picture currently being prepared for encode.
213 VaapiH264Picture current_pic_; 213 scoped_refptr<H264Picture> current_pic_;
214 214
215 // VA surfaces available for reuse. 215 // VA surfaces available for reuse.
216 std::vector<VASurfaceID> available_va_surface_ids_; 216 std::vector<VASurfaceID> available_va_surface_ids_;
217 217
218 // VA buffers for coded frames. 218 // VA buffers for coded frames.
219 std::vector<VABufferID> available_va_buffer_ids_; 219 std::vector<VABufferID> available_va_buffer_ids_;
220 220
221 // Currently active reference surfaces. 221 // Currently active reference surfaces.
222 RefPicList ref_pic_list0_; 222 RefPicList ref_pic_list0_;
223 223
(...skipping 27 matching lines...) Expand all
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
« no previous file with comments | « content/common/gpu/media/vaapi_video_decode_accelerator.cc ('k') | content/common/gpu/media/vaapi_video_encode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698