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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 } | 68 } |
69 }; | 69 }; |
70 | 70 |
71 class RTPCallback : public NullRtpFeedback { | 71 class RTPCallback : public NullRtpFeedback { |
72 public: | 72 public: |
73 int32_t OnInitializeDecoder(const int8_t payloadType, | 73 int32_t OnInitializeDecoder(const int8_t payloadType, |
74 const char payloadName[RTP_PAYLOAD_NAME_SIZE], | 74 const char payloadName[RTP_PAYLOAD_NAME_SIZE], |
75 const int frequency, | 75 const int frequency, |
76 const size_t channels, | 76 const size_t channels, |
77 const uint32_t rate) override { | 77 const uint32_t rate) override { |
78 if (payloadType == kPcmuPayloadType) { | 78 EXPECT_EQ(0u, rate) << "The rate should be zero"; |
79 EXPECT_EQ(kTestRate, rate) << | |
80 "The rate should be 64K for this payloadType"; | |
81 } | |
82 return 0; | 79 return 0; |
83 } | 80 } |
84 }; | 81 }; |
85 | 82 |
86 } // namespace | 83 } // namespace |
87 | 84 |
88 class RtpRtcpAudioTest : public ::testing::Test { | 85 class RtpRtcpAudioTest : public ::testing::Test { |
89 protected: | 86 protected: |
90 RtpRtcpAudioTest() | 87 RtpRtcpAudioTest() |
91 : fake_clock(123456), retransmission_rate_limiter_(&fake_clock, 1000) { | 88 : fake_clock(123456), retransmission_rate_limiter_(&fake_clock, 1000) { |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 nullptr, nullptr, nullptr)); | 278 nullptr, nullptr, nullptr)); |
282 | 279 |
283 EXPECT_EQ(test_ssrc, rtp_receiver2_->SSRC()); | 280 EXPECT_EQ(test_ssrc, rtp_receiver2_->SSRC()); |
284 EXPECT_TRUE(rtp_receiver2_->Timestamp(×tamp)); | 281 EXPECT_TRUE(rtp_receiver2_->Timestamp(×tamp)); |
285 EXPECT_EQ(test_timestamp + in_timestamp, timestamp); | 282 EXPECT_EQ(test_timestamp + in_timestamp, timestamp); |
286 in_timestamp += 10; | 283 in_timestamp += 10; |
287 } | 284 } |
288 } | 285 } |
289 | 286 |
290 } // namespace webrtc | 287 } // namespace webrtc |
OLD | NEW |