OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
776 uint8_t payload[kPayloadLengthBytes]= {0}; | 776 uint8_t payload[kPayloadLengthBytes]= {0}; |
777 int16_t dummy_output[kPayloadLengthSamples * kChannels] = {0}; | 777 int16_t dummy_output[kPayloadLengthSamples * kChannels] = {0}; |
778 WebRtcRTPHeader rtp_header; | 778 WebRtcRTPHeader rtp_header; |
779 rtp_header.header.payloadType = kPayloadType; | 779 rtp_header.header.payloadType = kPayloadType; |
780 rtp_header.header.sequenceNumber = 0x1234; | 780 rtp_header.header.sequenceNumber = 0x1234; |
781 rtp_header.header.timestamp = 0x12345678; | 781 rtp_header.header.timestamp = 0x12345678; |
782 rtp_header.header.ssrc = 0x87654321; | 782 rtp_header.header.ssrc = 0x87654321; |
783 | 783 |
784 class MockAudioDecoder : public AudioDecoder { | 784 class MockAudioDecoder : public AudioDecoder { |
785 public: | 785 public: |
786 // TODO(nisse): Valid overrides commented out, because the gmock | 786 void Reset() override {} |
787 // methods don't use any override declarations, and we want to avoid | |
788 // warnings from -Winconsistent-missing-override. See | |
789 // http://crbug.com/428099. | |
790 void Reset() /* override */ {} | |
791 MOCK_CONST_METHOD2(PacketDuration, int(const uint8_t*, size_t)); | 787 MOCK_CONST_METHOD2(PacketDuration, int(const uint8_t*, size_t)); |
792 MOCK_METHOD5(DecodeInternal, int(const uint8_t*, size_t, int, int16_t*, | 788 MOCK_METHOD5(DecodeInternal, int(const uint8_t*, size_t, int, int16_t*, |
793 SpeechType*)); | 789 SpeechType*)); |
794 size_t Channels() const /* override */ { return kChannels; } | 790 size_t Channels() const override { return kChannels; } |
795 } decoder_; | 791 } decoder_; |
796 | 792 |
797 const uint8_t kFirstPayloadValue = 1; | 793 const uint8_t kFirstPayloadValue = 1; |
798 const uint8_t kSecondPayloadValue = 2; | 794 const uint8_t kSecondPayloadValue = 2; |
799 | 795 |
800 EXPECT_CALL(decoder_, PacketDuration(Pointee(kFirstPayloadValue), | 796 EXPECT_CALL(decoder_, PacketDuration(Pointee(kFirstPayloadValue), |
801 kPayloadLengthBytes)) | 797 kPayloadLengthBytes)) |
802 .Times(AtLeast(1)) | 798 .Times(AtLeast(1)) |
803 .WillRepeatedly(Return(kNetEqMaxFrameSize + 1)); | 799 .WillRepeatedly(Return(kNetEqMaxFrameSize + 1)); |
804 | 800 |
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1183 UseNoMocks(); | 1179 UseNoMocks(); |
1184 CreateInstance(); | 1180 CreateInstance(); |
1185 ASSERT_TRUE(tick_timer_); | 1181 ASSERT_TRUE(tick_timer_); |
1186 EXPECT_EQ(0u, tick_timer_->ticks()); | 1182 EXPECT_EQ(0u, tick_timer_->ticks()); |
1187 AudioFrame output; | 1183 AudioFrame output; |
1188 EXPECT_EQ(NetEq::kOK, neteq_->GetAudio(&output)); | 1184 EXPECT_EQ(NetEq::kOK, neteq_->GetAudio(&output)); |
1189 EXPECT_EQ(1u, tick_timer_->ticks()); | 1185 EXPECT_EQ(1u, tick_timer_->ticks()); |
1190 } | 1186 } |
1191 | 1187 |
1192 }// namespace webrtc | 1188 }// namespace webrtc |
OLD | NEW |