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

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

Issue 568413002: Add VEA supported profiles to GPUInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use GPUInfo Created 6 years, 2 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 11 matching lines...) Expand all
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
26 : public media::VideoEncodeAccelerator { 26 : public media::VideoEncodeAccelerator {
27 public: 27 public:
28 explicit VaapiVideoEncodeAccelerator(Display* x_display); 28 explicit VaapiVideoEncodeAccelerator(Display* x_display);
29 virtual ~VaapiVideoEncodeAccelerator(); 29 virtual ~VaapiVideoEncodeAccelerator();
30 30
31 // media::VideoEncodeAccelerator implementation. 31 // media::VideoEncodeAccelerator implementation.
32 virtual std::vector<media::VideoEncodeAccelerator::SupportedProfile>
33 GetSupportedProfiles() OVERRIDE;
32 virtual bool Initialize(media::VideoFrame::Format format, 34 virtual bool Initialize(media::VideoFrame::Format format,
33 const gfx::Size& input_visible_size, 35 const gfx::Size& input_visible_size,
34 media::VideoCodecProfile output_profile, 36 media::VideoCodecProfile output_profile,
35 uint32 initial_bitrate, 37 uint32 initial_bitrate,
36 Client* client) OVERRIDE; 38 Client* client) OVERRIDE;
37 virtual void Encode(const scoped_refptr<media::VideoFrame>& frame, 39 virtual void Encode(const scoped_refptr<media::VideoFrame>& frame,
38 bool force_keyframe) OVERRIDE; 40 bool force_keyframe) OVERRIDE;
39 virtual void UseOutputBitstreamBuffer( 41 virtual void UseOutputBitstreamBuffer(
40 const media::BitstreamBuffer& buffer) OVERRIDE; 42 const media::BitstreamBuffer& buffer) OVERRIDE;
41 virtual void RequestEncodingParametersChange(uint32 bitrate, 43 virtual void RequestEncodingParametersChange(uint32 bitrate,
42 uint32 framerate) OVERRIDE; 44 uint32 framerate) OVERRIDE;
43 virtual void Destroy() OVERRIDE; 45 virtual void Destroy() OVERRIDE;
44 46
45 static std::vector<media::VideoEncodeAccelerator::SupportedProfile>
46 GetSupportedProfiles();
47
48 private: 47 private:
49 // Reference picture list. 48 // Reference picture list.
50 typedef std::list<scoped_refptr<VASurface> > RefPicList; 49 typedef std::list<scoped_refptr<VASurface> > RefPicList;
51 50
52 // Encode job for one frame. Created when an input frame is awaiting and 51 // Encode job for one frame. Created when an input frame is awaiting and
53 // enough resources are available to proceed. Once the job is prepared and 52 // enough resources are available to proceed. Once the job is prepared and
54 // submitted to the hardware, it awaits on the submitted_encode_jobs_ queue 53 // submitted to the hardware, it awaits on the submitted_encode_jobs_ queue
55 // for an output bitstream buffer to become available. Once one is ready, 54 // for an output bitstream buffer to become available. Once one is ready,
56 // the encoded bytes are downloaded to it and job resources are released 55 // the encoded bytes are downloaded to it and job resources are released
57 // and become available for reuse. 56 // and become available for reuse.
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 // thread (it's a member of this class). 254 // thread (it's a member of this class).
256 base::WeakPtr<VaapiVideoEncodeAccelerator> weak_this_; 255 base::WeakPtr<VaapiVideoEncodeAccelerator> weak_this_;
257 base::WeakPtrFactory<VaapiVideoEncodeAccelerator> weak_this_ptr_factory_; 256 base::WeakPtrFactory<VaapiVideoEncodeAccelerator> weak_this_ptr_factory_;
258 257
259 DISALLOW_COPY_AND_ASSIGN(VaapiVideoEncodeAccelerator); 258 DISALLOW_COPY_AND_ASSIGN(VaapiVideoEncodeAccelerator);
260 }; 259 };
261 260
262 } // namespace content 261 } // namespace content
263 262
264 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_VIDEO_ENCODE_ACCELERATOR_H_ 263 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_VIDEO_ENCODE_ACCELERATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698