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

Side by Side Diff: content/common/gpu/media/v4l2_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: address piman's comment -- create codecs_ lazily Created 6 years, 3 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_V4L2_VIDEO_ENCODE_ACCELERATOR_H_ 5 #ifndef CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_ENCODE_ACCELERATOR_H_
6 #define CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_ENCODE_ACCELERATOR_H_ 6 #define CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_ENCODE_ACCELERATOR_H_
7 7
8 #include <list> 8 #include <list>
9 #include <linux/videodev2.h> 9 #include <linux/videodev2.h>
10 #include <vector> 10 #include <vector>
(...skipping 28 matching lines...) Expand all
39 // This class may try to instantiate and use a V4L2ImageProcessor for input 39 // This class may try to instantiate and use a V4L2ImageProcessor for input
40 // format conversion, if the input format requested via Initialize() is not 40 // format conversion, if the input format requested via Initialize() is not
41 // accepted by the hardware codec. 41 // accepted by the hardware codec.
42 class CONTENT_EXPORT V4L2VideoEncodeAccelerator 42 class CONTENT_EXPORT V4L2VideoEncodeAccelerator
43 : public media::VideoEncodeAccelerator { 43 : public media::VideoEncodeAccelerator {
44 public: 44 public:
45 explicit V4L2VideoEncodeAccelerator(scoped_ptr<V4L2Device> device); 45 explicit V4L2VideoEncodeAccelerator(scoped_ptr<V4L2Device> device);
46 virtual ~V4L2VideoEncodeAccelerator(); 46 virtual ~V4L2VideoEncodeAccelerator();
47 47
48 // media::VideoEncodeAccelerator implementation. 48 // media::VideoEncodeAccelerator implementation.
49 virtual std::vector<media::VideoEncodeAccelerator::SupportedProfile>
50 GetSupportedProfiles() OVERRIDE;
49 virtual bool Initialize(media::VideoFrame::Format format, 51 virtual bool Initialize(media::VideoFrame::Format format,
50 const gfx::Size& input_visible_size, 52 const gfx::Size& input_visible_size,
51 media::VideoCodecProfile output_profile, 53 media::VideoCodecProfile output_profile,
52 uint32 initial_bitrate, 54 uint32 initial_bitrate,
53 Client* client) OVERRIDE; 55 Client* client) OVERRIDE;
54 virtual void Encode(const scoped_refptr<media::VideoFrame>& frame, 56 virtual void Encode(const scoped_refptr<media::VideoFrame>& frame,
55 bool force_keyframe) OVERRIDE; 57 bool force_keyframe) OVERRIDE;
56 virtual void UseOutputBitstreamBuffer(const media::BitstreamBuffer& buffer) 58 virtual void UseOutputBitstreamBuffer(const media::BitstreamBuffer& buffer)
57 OVERRIDE; 59 OVERRIDE;
58 virtual void RequestEncodingParametersChange(uint32 bitrate, 60 virtual void RequestEncodingParametersChange(uint32 bitrate,
59 uint32 framerate) OVERRIDE; 61 uint32 framerate) OVERRIDE;
60 virtual void Destroy() OVERRIDE; 62 virtual void Destroy() OVERRIDE;
61 63
62 static std::vector<media::VideoEncodeAccelerator::SupportedProfile>
63 GetSupportedProfiles();
64
65 private: 64 private:
66 // Auto-destroy reference for BitstreamBuffer, for tracking buffers passed to 65 // Auto-destroy reference for BitstreamBuffer, for tracking buffers passed to
67 // this instance. 66 // this instance.
68 struct BitstreamBufferRef; 67 struct BitstreamBufferRef;
69 68
70 // Record for codec input buffers. 69 // Record for codec input buffers.
71 struct InputRecord { 70 struct InputRecord {
72 InputRecord(); 71 InputRecord();
73 bool at_device; 72 bool at_device;
74 scoped_refptr<media::VideoFrame> frame; 73 scoped_refptr<media::VideoFrame> frame;
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 // as both threads will not outlive this object. 268 // as both threads will not outlive this object.
270 base::WeakPtr<V4L2VideoEncodeAccelerator> weak_this_; 269 base::WeakPtr<V4L2VideoEncodeAccelerator> weak_this_;
271 base::WeakPtrFactory<V4L2VideoEncodeAccelerator> weak_this_ptr_factory_; 270 base::WeakPtrFactory<V4L2VideoEncodeAccelerator> weak_this_ptr_factory_;
272 271
273 DISALLOW_COPY_AND_ASSIGN(V4L2VideoEncodeAccelerator); 272 DISALLOW_COPY_AND_ASSIGN(V4L2VideoEncodeAccelerator);
274 }; 273 };
275 274
276 } // namespace content 275 } // namespace content
277 276
278 #endif // CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_ENCODE_ACCELERATOR_H_ 277 #endif // CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_ENCODE_ACCELERATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698