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

Unified Diff: webrtc/modules/rtp_rtcp/test/testAPI/test_api_audio.cc

Issue 2066473002: RtpRtcp: Remove the SetSendREDPayloadType and SendREDPayloadType methods (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@remove-red3
Patch Set: rebase Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_sender_audio.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/rtp_rtcp/test/testAPI/test_api_audio.cc
diff --git a/webrtc/modules/rtp_rtcp/test/testAPI/test_api_audio.cc b/webrtc/modules/rtp_rtcp/test/testAPI/test_api_audio.cc
index 4bbcc326e9a86f0d0743c116693c33b6c0b9a063..291dded3b22b8f5b32149aaff0c5c4b23e22a7c2 100644
--- a/webrtc/modules/rtp_rtcp/test/testAPI/test_api_audio.cc
+++ b/webrtc/modules/rtp_rtcp/test/testAPI/test_api_audio.cc
@@ -208,79 +208,6 @@ TEST_F(RtpRtcpAudioTest, Basic) {
EXPECT_EQ(test_timestamp, timestamp);
}
-TEST_F(RtpRtcpAudioTest, RED) {
- CodecInst voice_codec;
- memset(&voice_codec, 0, sizeof(voice_codec));
- voice_codec.pltype = 96;
- voice_codec.plfreq = 8000;
- memcpy(voice_codec.plname, "PCMU", 5);
-
- EXPECT_EQ(0, module1->RegisterSendPayload(voice_codec));
- EXPECT_EQ(0, rtp_receiver1_->RegisterReceivePayload(
- voice_codec.plname,
- voice_codec.pltype,
- voice_codec.plfreq,
- voice_codec.channels,
- (voice_codec.rate < 0) ? 0 : voice_codec.rate));
- EXPECT_EQ(0, module2->RegisterSendPayload(voice_codec));
- voice_codec.rate = test_rate;
- EXPECT_EQ(0, rtp_receiver2_->RegisterReceivePayload(
- voice_codec.plname,
- voice_codec.pltype,
- voice_codec.plfreq,
- voice_codec.channels,
- (voice_codec.rate < 0) ? 0 : voice_codec.rate));
-
- module1->SetSSRC(test_ssrc);
- module1->SetStartTimestamp(test_timestamp);
- EXPECT_EQ(0, module1->SetSendingStatus(true));
-
- voice_codec.pltype = 127;
- voice_codec.plfreq = 8000;
- memcpy(voice_codec.plname, "RED", 4);
-
- EXPECT_EQ(0, module1->SetSendREDPayloadType(voice_codec.pltype));
- int8_t red = 0;
- EXPECT_EQ(0, module1->SendREDPayloadType(&red));
- EXPECT_EQ(voice_codec.pltype, red);
- EXPECT_EQ(0, rtp_receiver1_->RegisterReceivePayload(
- voice_codec.plname,
- voice_codec.pltype,
- voice_codec.plfreq,
- voice_codec.channels,
- (voice_codec.rate < 0) ? 0 : voice_codec.rate));
- EXPECT_EQ(0, rtp_receiver2_->RegisterReceivePayload(
- voice_codec.plname,
- voice_codec.pltype,
- voice_codec.plfreq,
- voice_codec.channels,
- (voice_codec.rate < 0) ? 0 : voice_codec.rate));
-
- RTPFragmentationHeader fragmentation;
- fragmentation.fragmentationVectorSize = 2;
- fragmentation.fragmentationLength = new size_t[2];
- fragmentation.fragmentationLength[0] = 4;
- fragmentation.fragmentationLength[1] = 4;
- fragmentation.fragmentationOffset = new size_t[2];
- fragmentation.fragmentationOffset[0] = 0;
- fragmentation.fragmentationOffset[1] = 4;
- fragmentation.fragmentationTimeDiff = new uint16_t[2];
- fragmentation.fragmentationTimeDiff[0] = 0;
- fragmentation.fragmentationTimeDiff[1] = 0;
- fragmentation.fragmentationPlType = new uint8_t[2];
- fragmentation.fragmentationPlType[0] = 96;
- fragmentation.fragmentationPlType[1] = 96;
-
- const uint8_t test[5] = "test";
- // Send a RTP packet.
- EXPECT_TRUE(module1->SendOutgoingData(webrtc::kAudioFrameSpeech, 96, 160, -1,
- test, 4, &fragmentation, nullptr,
- nullptr));
-
- EXPECT_EQ(0, module1->SetSendREDPayloadType(-1));
- EXPECT_EQ(-1, module1->SendREDPayloadType(&red));
-}
-
TEST_F(RtpRtcpAudioTest, DTMF) {
CodecInst voice_codec;
memset(&voice_codec, 0, sizeof(voice_codec));
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_sender_audio.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698