| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 virtual ~FakeEncoder(); | 26 virtual ~FakeEncoder(); |
| 27 | 27 |
| 28 // Sets max bitrate. Not thread-safe, call before registering the encoder. | 28 // Sets max bitrate. Not thread-safe, call before registering the encoder. |
| 29 void SetMaxBitrate(int max_kbps); | 29 void SetMaxBitrate(int max_kbps); |
| 30 | 30 |
| 31 int32_t InitEncode(const VideoCodec* config, | 31 int32_t InitEncode(const VideoCodec* config, |
| 32 int32_t number_of_cores, | 32 int32_t number_of_cores, |
| 33 size_t max_payload_size) override; | 33 size_t max_payload_size) override; |
| 34 int32_t Encode(const VideoFrame& input_image, | 34 int32_t Encode(const VideoFrame& input_image, |
| 35 const CodecSpecificInfo* codec_specific_info, | 35 const CodecSpecificInfo* codec_specific_info, |
| 36 const std::vector<VideoFrameType>* frame_types) override; | 36 const std::vector<FrameType>* frame_types) override; |
| 37 int32_t RegisterEncodeCompleteCallback( | 37 int32_t RegisterEncodeCompleteCallback( |
| 38 EncodedImageCallback* callback) override; | 38 EncodedImageCallback* callback) override; |
| 39 int32_t Release() override; | 39 int32_t Release() override; |
| 40 int32_t SetChannelParameters(uint32_t packet_loss, int64_t rtt) override; | 40 int32_t SetChannelParameters(uint32_t packet_loss, int64_t rtt) override; |
| 41 int32_t SetRates(uint32_t new_target_bitrate, uint32_t framerate) override; | 41 int32_t SetRates(uint32_t new_target_bitrate, uint32_t framerate) override; |
| 42 | 42 |
| 43 protected: | 43 protected: |
| 44 Clock* const clock_; | 44 Clock* const clock_; |
| 45 VideoCodec config_; | 45 VideoCodec config_; |
| 46 EncodedImageCallback* callback_; | 46 EncodedImageCallback* callback_; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 67 int idr_counter_; | 67 int idr_counter_; |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 class DelayedEncoder : public test::FakeEncoder { | 70 class DelayedEncoder : public test::FakeEncoder { |
| 71 public: | 71 public: |
| 72 DelayedEncoder(Clock* clock, int delay_ms); | 72 DelayedEncoder(Clock* clock, int delay_ms); |
| 73 virtual ~DelayedEncoder() {} | 73 virtual ~DelayedEncoder() {} |
| 74 | 74 |
| 75 int32_t Encode(const VideoFrame& input_image, | 75 int32_t Encode(const VideoFrame& input_image, |
| 76 const CodecSpecificInfo* codec_specific_info, | 76 const CodecSpecificInfo* codec_specific_info, |
| 77 const std::vector<VideoFrameType>* frame_types) override; | 77 const std::vector<FrameType>* frame_types) override; |
| 78 | 78 |
| 79 private: | 79 private: |
| 80 const int delay_ms_; | 80 const int delay_ms_; |
| 81 }; | 81 }; |
| 82 } // namespace test | 82 } // namespace test |
| 83 } // namespace webrtc | 83 } // namespace webrtc |
| 84 | 84 |
| 85 #endif // WEBRTC_VIDEO_ENGINE_TEST_COMMON_FAKE_ENCODER_H_ | 85 #endif // WEBRTC_VIDEO_ENGINE_TEST_COMMON_FAKE_ENCODER_H_ |
| OLD | NEW |