| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 21 matching lines...) Expand all Loading... |
| 32 MOCK_CONST_METHOD0(NumChannels, size_t()); | 32 MOCK_CONST_METHOD0(NumChannels, size_t()); |
| 33 MOCK_CONST_METHOD0(RtpTimestampRateHz, int()); | 33 MOCK_CONST_METHOD0(RtpTimestampRateHz, int()); |
| 34 MOCK_CONST_METHOD0(Num10MsFramesInNextPacket, size_t()); | 34 MOCK_CONST_METHOD0(Num10MsFramesInNextPacket, size_t()); |
| 35 MOCK_CONST_METHOD0(Max10MsFramesInAPacket, size_t()); | 35 MOCK_CONST_METHOD0(Max10MsFramesInAPacket, size_t()); |
| 36 MOCK_CONST_METHOD0(GetTargetBitrate, int()); | 36 MOCK_CONST_METHOD0(GetTargetBitrate, int()); |
| 37 MOCK_METHOD0(Reset, void()); | 37 MOCK_METHOD0(Reset, void()); |
| 38 MOCK_METHOD1(SetFec, bool(bool enable)); | 38 MOCK_METHOD1(SetFec, bool(bool enable)); |
| 39 MOCK_METHOD1(SetDtx, bool(bool enable)); | 39 MOCK_METHOD1(SetDtx, bool(bool enable)); |
| 40 MOCK_METHOD1(SetApplication, bool(Application application)); | 40 MOCK_METHOD1(SetApplication, bool(Application application)); |
| 41 MOCK_METHOD1(SetMaxPlaybackRate, void(int frequency_hz)); | 41 MOCK_METHOD1(SetMaxPlaybackRate, void(int frequency_hz)); |
| 42 MOCK_METHOD1(SetProjectedPacketLossRate, void(double fraction)); |
| 43 MOCK_METHOD1(SetTargetBitrate, void(int target_bps)); |
| 42 MOCK_METHOD1(SetMaxBitrate, void(int max_bps)); | 44 MOCK_METHOD1(SetMaxBitrate, void(int max_bps)); |
| 43 MOCK_METHOD1(SetMaxPayloadSize, void(int max_payload_size_bytes)); | 45 MOCK_METHOD1(SetMaxPayloadSize, void(int max_payload_size_bytes)); |
| 44 MOCK_METHOD1(OnReceivedTargetAudioBitrate, | |
| 45 void(int target_audio_bitrate_bps)); | |
| 46 MOCK_METHOD1(OnReceivedUplinkPacketLossFraction, | |
| 47 void(float uplink_packet_loss_fraction)); | |
| 48 | 46 |
| 49 // Note, we explicitly chose not to create a mock for the Encode method. | 47 // Note, we explicitly chose not to create a mock for the Encode method. |
| 50 MOCK_METHOD3(EncodeImpl, | 48 MOCK_METHOD3(EncodeImpl, |
| 51 EncodedInfo(uint32_t timestamp, | 49 EncodedInfo(uint32_t timestamp, |
| 52 rtc::ArrayView<const int16_t> audio, | 50 rtc::ArrayView<const int16_t> audio, |
| 53 rtc::Buffer* encoded)); | 51 rtc::Buffer* encoded)); |
| 54 | 52 |
| 55 class FakeEncoding { | 53 class FakeEncoding { |
| 56 public: | 54 public: |
| 57 // Creates a functor that will return |info| and adjust the rtc::Buffer | 55 // Creates a functor that will return |info| and adjust the rtc::Buffer |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 | 89 |
| 92 private: | 90 private: |
| 93 AudioEncoder::EncodedInfo info_; | 91 AudioEncoder::EncodedInfo info_; |
| 94 rtc::ArrayView<const uint8_t> payload_; | 92 rtc::ArrayView<const uint8_t> payload_; |
| 95 }; | 93 }; |
| 96 }; | 94 }; |
| 97 | 95 |
| 98 } // namespace webrtc | 96 } // namespace webrtc |
| 99 | 97 |
| 100 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_MOCK_MOCK_AUDIO_ENCODER_H_ | 98 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_MOCK_MOCK_AUDIO_ENCODER_H_ |
| OLD | NEW |