| 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 29 matching lines...) Expand all Loading... |
| 40 | 40 |
| 41 bool IsComfortNoisePayload(uint8_t payload_type) { | 41 bool IsComfortNoisePayload(uint8_t payload_type) { |
| 42 for (const auto& c : kCngCodecs) { | 42 for (const auto& c : kCngCodecs) { |
| 43 if (c.payload_type == payload_type) | 43 if (c.payload_type == payload_type) |
| 44 return true; | 44 return true; |
| 45 } | 45 } |
| 46 | 46 |
| 47 return false; | 47 return false; |
| 48 } | 48 } |
| 49 | 49 |
| 50 class VerifyingAudioReceiver : public NullRtpData { | 50 class VerifyingAudioReceiver : public RtpData { |
| 51 public: | 51 public: |
| 52 int32_t OnReceivedPayloadData( | 52 int32_t OnReceivedPayloadData( |
| 53 const uint8_t* payloadData, | 53 const uint8_t* payloadData, |
| 54 size_t payloadSize, | 54 size_t payloadSize, |
| 55 const webrtc::WebRtcRTPHeader* rtpHeader) override { | 55 const webrtc::WebRtcRTPHeader* rtpHeader) override { |
| 56 const uint8_t payload_type = rtpHeader->header.payloadType; | 56 const uint8_t payload_type = rtpHeader->header.payloadType; |
| 57 if (payload_type == kPcmuPayloadType || payload_type == kDtmfPayloadType) { | 57 if (payload_type == kPcmuPayloadType || payload_type == kDtmfPayloadType) { |
| 58 EXPECT_EQ(sizeof(kTestPayload), payloadSize); | 58 EXPECT_EQ(sizeof(kTestPayload), payloadSize); |
| 59 // All our test vectors for PCMU and DTMF are equal to |kTestPayload|. | 59 // All our test vectors for PCMU and DTMF are equal to |kTestPayload|. |
| 60 const size_t min_size = std::min(sizeof(kTestPayload), payloadSize); | 60 const size_t min_size = std::min(sizeof(kTestPayload), payloadSize); |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 nullptr, nullptr, nullptr)); | 278 nullptr, nullptr, nullptr)); |
| 279 | 279 |
| 280 EXPECT_EQ(test_ssrc, rtp_receiver2_->SSRC()); | 280 EXPECT_EQ(test_ssrc, rtp_receiver2_->SSRC()); |
| 281 EXPECT_TRUE(rtp_receiver2_->Timestamp(×tamp)); | 281 EXPECT_TRUE(rtp_receiver2_->Timestamp(×tamp)); |
| 282 EXPECT_EQ(test_timestamp + in_timestamp, timestamp); | 282 EXPECT_EQ(test_timestamp + in_timestamp, timestamp); |
| 283 in_timestamp += 10; | 283 in_timestamp += 10; |
| 284 } | 284 } |
| 285 } | 285 } |
| 286 | 286 |
| 287 } // namespace webrtc | 287 } // namespace webrtc |
| OLD | NEW |