| 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 MEDIA_VIDEO_FAKE_VIDEO_ENCODE_ACCELERATOR_H_ | 5 #ifndef MEDIA_VIDEO_FAKE_VIDEO_ENCODE_ACCELERATOR_H_ |
| 6 #define MEDIA_VIDEO_FAKE_VIDEO_ENCODE_ACCELERATOR_H_ | 6 #define MEDIA_VIDEO_FAKE_VIDEO_ENCODE_ACCELERATOR_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <queue> | 9 #include <queue> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 } // namespace base | 21 } // namespace base |
| 22 | 22 |
| 23 namespace media { | 23 namespace media { |
| 24 | 24 |
| 25 class MEDIA_EXPORT FakeVideoEncodeAccelerator : public VideoEncodeAccelerator { | 25 class MEDIA_EXPORT FakeVideoEncodeAccelerator : public VideoEncodeAccelerator { |
| 26 public: | 26 public: |
| 27 explicit FakeVideoEncodeAccelerator( | 27 explicit FakeVideoEncodeAccelerator( |
| 28 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner); | 28 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner); |
| 29 ~FakeVideoEncodeAccelerator() override; | 29 ~FakeVideoEncodeAccelerator() override; |
| 30 | 30 |
| 31 std::vector<VideoEncodeAccelerator::SupportedProfile> GetSupportedProfiles() | 31 VideoEncodeAccelerator::SupportedProfiles GetSupportedProfiles() override; |
| 32 override; | |
| 33 bool Initialize(VideoFrame::Format input_format, | 32 bool Initialize(VideoFrame::Format input_format, |
| 34 const gfx::Size& input_visible_size, | 33 const gfx::Size& input_visible_size, |
| 35 VideoCodecProfile output_profile, | 34 VideoCodecProfile output_profile, |
| 36 uint32 initial_bitrate, | 35 uint32 initial_bitrate, |
| 37 Client* client) override; | 36 Client* client) override; |
| 38 void Encode(const scoped_refptr<VideoFrame>& frame, | 37 void Encode(const scoped_refptr<VideoFrame>& frame, |
| 39 bool force_keyframe) override; | 38 bool force_keyframe) override; |
| 40 void UseOutputBitstreamBuffer(const BitstreamBuffer& buffer) override; | 39 void UseOutputBitstreamBuffer(const BitstreamBuffer& buffer) override; |
| 41 void RequestEncodingParametersChange(uint32 bitrate, | 40 void RequestEncodingParametersChange(uint32 bitrate, |
| 42 uint32 framerate) override; | 41 uint32 framerate) override; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 std::list<BitstreamBuffer> available_buffers_; | 75 std::list<BitstreamBuffer> available_buffers_; |
| 77 | 76 |
| 78 base::WeakPtrFactory<FakeVideoEncodeAccelerator> weak_this_factory_; | 77 base::WeakPtrFactory<FakeVideoEncodeAccelerator> weak_this_factory_; |
| 79 | 78 |
| 80 DISALLOW_COPY_AND_ASSIGN(FakeVideoEncodeAccelerator); | 79 DISALLOW_COPY_AND_ASSIGN(FakeVideoEncodeAccelerator); |
| 81 }; | 80 }; |
| 82 | 81 |
| 83 } // namespace media | 82 } // namespace media |
| 84 | 83 |
| 85 #endif // MEDIA_VIDEO_FAKE_VIDEO_ENCODE_ACCELERATOR_H_ | 84 #endif // MEDIA_VIDEO_FAKE_VIDEO_ENCODE_ACCELERATOR_H_ |
| OLD | NEW |