Revert of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #3 id:40001 of https://codereview.webrtc.org/3006993002/ )

Reason for revert:
This has to be reverted to enable reverting cl https://codereview.webrtc.org/3006063002/, which seems to have broken ulpfec.

Original issue's description:
> Delete Rtx-related methods from RTPPayloadRegistry.
>
> Delete methods IsRtx, IsEncapsulated and RestoreOriginalPacket.
>
> BUG=webrtc:7135
>
> Review-Url: https://codereview.webrtc.org/3006993002
> Cr-Commit-Position: refs/heads/master@{#19739}
> Committed: 5b4b522641

TBR=stefan@webrtc.org,danilchap@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:7135

Review-Url: https://codereview.webrtc.org/3011093002
Cr-Commit-Position: refs/heads/master@{#19742}
This commit is contained in:
nisse
2017-09-08 05:00:54 -07:00
committed by Commit Bot
parent 9bc599f6da
commit a64685325c
7 changed files with 304 additions and 58 deletions

View File

@ -162,4 +162,23 @@ TEST_F(RtpRtcpAPITest, RtxSender) {
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