Index: webrtc/modules/rtp_rtcp/test/testAPI/test_api.cc |
diff --git a/webrtc/modules/rtp_rtcp/test/testAPI/test_api.cc b/webrtc/modules/rtp_rtcp/test/testAPI/test_api.cc |
index 28be2225b280c64ee9cf1a258b712f830b69e449..b39c8d72dae16fee1e8477083bfaaa25a401bced 100644 |
--- a/webrtc/modules/rtp_rtcp/test/testAPI/test_api.cc |
+++ b/webrtc/modules/rtp_rtcp/test/testAPI/test_api.cc |
@@ -162,4 +162,23 @@ |
EXPECT_EQ(kRtxRetransmitted, module_->RtxSendStatus()); |
} |
+TEST_F(RtpRtcpAPITest, RtxReceiver) { |
+ const uint32_t kRtxSsrc = 1; |
+ const int kRtxPayloadType = 119; |
+ const int kPayloadType = 100; |
+ EXPECT_FALSE(rtp_payload_registry_->RtxEnabled()); |
+ rtp_payload_registry_->SetRtxSsrc(kRtxSsrc); |
+ rtp_payload_registry_->SetRtxPayloadType(kRtxPayloadType, kPayloadType); |
+ EXPECT_TRUE(rtp_payload_registry_->RtxEnabled()); |
+ RTPHeader rtx_header; |
+ rtx_header.ssrc = kRtxSsrc; |
+ rtx_header.payloadType = kRtxPayloadType; |
+ EXPECT_TRUE(rtp_payload_registry_->IsRtx(rtx_header)); |
+ rtx_header.ssrc = 0; |
+ EXPECT_FALSE(rtp_payload_registry_->IsRtx(rtx_header)); |
+ rtx_header.ssrc = kRtxSsrc; |
+ rtx_header.payloadType = 0; |
+ EXPECT_TRUE(rtp_payload_registry_->IsRtx(rtx_header)); |
+} |
+ |
} // namespace webrtc |