Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(255)

Side by Side Diff: webrtc/modules/rtp_rtcp/test/testAPI/test_api_audio.cc

Issue 2885823002: Delete class NullRtpData and function NullObjectRtpData (Closed)
Patch Set: Add using declaration. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/modules/rtp_rtcp/test/testAPI/test_api.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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(&timestamp)); 281 EXPECT_TRUE(rtp_receiver2_->Timestamp(&timestamp));
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
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/test/testAPI/test_api.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698