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

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

Issue 2516213002: RTPPayloadRegistry: Stop using the rate to keep track of receive codecs (Closed)
Patch Set: rewrite Created 4 years 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/source/rtp_payload_registry_unittest.cc ('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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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(&timestamp)); 281 EXPECT_TRUE(rtp_receiver2_->Timestamp(&timestamp));
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
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_payload_registry_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698