OLD | NEW |
(Empty) | |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef MEDIA_CAST_TEST_FAKE_MOCK_VIDEO_ENCODE_ACCELERATOR_H_ |
| 6 #define MEDIA_CAST_TEST_FAKE_MOCK_VIDEO_ENCODE_ACCELERATOR_H_ |
| 7 |
| 8 #include "media/video/video_encode_accelerator.h" |
| 9 |
| 10 #include <list> |
| 11 |
| 12 #include "media/base/bitstream_buffer.h" |
| 13 |
| 14 namespace media { |
| 15 namespace cast { |
| 16 namespace test { |
| 17 |
| 18 class FakeVideoEncodeAccelerator : public VideoEncodeAccelerator { |
| 19 public: |
| 20 explicit FakeVideoEncodeAccelerator(VideoEncodeAccelerator::Client* client); |
| 21 |
| 22 virtual void Initialize(media::VideoFrame::Format input_format, |
| 23 const gfx::Size& input_visible_size, |
| 24 VideoCodecProfile output_profile, |
| 25 uint32 initial_bitrate) OVERRIDE; |
| 26 |
| 27 virtual void Encode(const scoped_refptr<VideoFrame>& frame, |
| 28 bool force_keyframe) OVERRIDE; |
| 29 |
| 30 virtual void UseOutputBitstreamBuffer(const BitstreamBuffer& buffer) OVERRIDE; |
| 31 |
| 32 virtual void RequestEncodingParametersChange(uint32 bitrate, |
| 33 uint32 framerate) OVERRIDE; |
| 34 |
| 35 virtual void Destroy() OVERRIDE; |
| 36 |
| 37 private: |
| 38 virtual ~FakeVideoEncodeAccelerator(); |
| 39 |
| 40 VideoEncodeAccelerator::Client* client_; |
| 41 bool first_; |
| 42 |
| 43 std::list<int32> available_buffer_ids_; |
| 44 |
| 45 DISALLOW_COPY_AND_ASSIGN(FakeVideoEncodeAccelerator); |
| 46 }; |
| 47 |
| 48 } // namespace test |
| 49 } // namespace cast |
| 50 } // namespace media |
| 51 |
| 52 #endif // MEDIA_CAST_TEST_FAKE_MOCK_VIDEO_ENCODE_ACCELERATOR_H_ |
OLD | NEW |