| OLD | NEW |
| 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 27 matching lines...) Expand all Loading... |
| 38 // was designed). | 38 // was designed). |
| 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 static std::vector<media::VideoEncodeAccelerator::SupportedProfile> | 48 static std::vector<gpu::VideoEncodeAcceleratorSupportedProfile> |
| 49 GetSupportedProfilesStatic(); | 49 GetSupportedProfilesStatic(); |
| 50 | 50 |
| 51 // media::VideoEncodeAccelerator implementation. | 51 // media::VideoEncodeAccelerator implementation. |
| 52 virtual std::vector<media::VideoEncodeAccelerator::SupportedProfile> | 52 virtual std::vector<gpu::VideoEncodeAcceleratorSupportedProfile> |
| 53 GetSupportedProfiles() override; | 53 GetSupportedProfiles() override; |
| 54 virtual bool Initialize(media::VideoFrame::Format format, | 54 virtual bool Initialize(media::VideoFrame::Format format, |
| 55 const gfx::Size& input_visible_size, | 55 const gfx::Size& input_visible_size, |
| 56 media::VideoCodecProfile output_profile, | 56 media::VideoCodecProfile output_profile, |
| 57 uint32 initial_bitrate, | 57 uint32 initial_bitrate, |
| 58 Client* client) override; | 58 Client* client) override; |
| 59 virtual void Encode(const scoped_refptr<media::VideoFrame>& frame, | 59 virtual void Encode(const scoped_refptr<media::VideoFrame>& frame, |
| 60 bool force_keyframe) override; | 60 bool force_keyframe) override; |
| 61 virtual void UseOutputBitstreamBuffer(const media::BitstreamBuffer& buffer) | 61 virtual void UseOutputBitstreamBuffer(const media::BitstreamBuffer& buffer) |
| 62 override; | 62 override; |
| 63 virtual void RequestEncodingParametersChange(uint32 bitrate, | 63 virtual void RequestEncodingParametersChange(uint32 bitrate, |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 // as both threads will not outlive this object. | 271 // as both threads will not outlive this object. |
| 272 base::WeakPtr<V4L2VideoEncodeAccelerator> weak_this_; | 272 base::WeakPtr<V4L2VideoEncodeAccelerator> weak_this_; |
| 273 base::WeakPtrFactory<V4L2VideoEncodeAccelerator> weak_this_ptr_factory_; | 273 base::WeakPtrFactory<V4L2VideoEncodeAccelerator> weak_this_ptr_factory_; |
| 274 | 274 |
| 275 DISALLOW_COPY_AND_ASSIGN(V4L2VideoEncodeAccelerator); | 275 DISALLOW_COPY_AND_ASSIGN(V4L2VideoEncodeAccelerator); |
| 276 }; | 276 }; |
| 277 | 277 |
| 278 } // namespace content | 278 } // namespace content |
| 279 | 279 |
| 280 #endif // CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_ENCODE_ACCELERATOR_H_ | 280 #endif // CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_ENCODE_ACCELERATOR_H_ |
| OLD | NEW |