| OLD | NEW |
| 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 module_->SetRtxSendStatus(kRtxRetransmitted); | 155 module_->SetRtxSendStatus(kRtxRetransmitted); |
| 156 EXPECT_EQ(kRtxRetransmitted, module_->RtxSendStatus()); | 156 EXPECT_EQ(kRtxRetransmitted, module_->RtxSendStatus()); |
| 157 | 157 |
| 158 module_->SetRtxSendStatus(kRtxOff); | 158 module_->SetRtxSendStatus(kRtxOff); |
| 159 EXPECT_EQ(kRtxOff, module_->RtxSendStatus()); | 159 EXPECT_EQ(kRtxOff, module_->RtxSendStatus()); |
| 160 | 160 |
| 161 module_->SetRtxSendStatus(kRtxRetransmitted); | 161 module_->SetRtxSendStatus(kRtxRetransmitted); |
| 162 EXPECT_EQ(kRtxRetransmitted, module_->RtxSendStatus()); | 162 EXPECT_EQ(kRtxRetransmitted, module_->RtxSendStatus()); |
| 163 } | 163 } |
| 164 | 164 |
| 165 TEST_F(RtpRtcpAPITest, RtxReceiver) { | |
| 166 const uint32_t kRtxSsrc = 1; | |
| 167 const int kRtxPayloadType = 119; | |
| 168 const int kPayloadType = 100; | |
| 169 EXPECT_FALSE(rtp_payload_registry_->RtxEnabled()); | |
| 170 rtp_payload_registry_->SetRtxSsrc(kRtxSsrc); | |
| 171 rtp_payload_registry_->SetRtxPayloadType(kRtxPayloadType, kPayloadType); | |
| 172 EXPECT_TRUE(rtp_payload_registry_->RtxEnabled()); | |
| 173 RTPHeader rtx_header; | |
| 174 rtx_header.ssrc = kRtxSsrc; | |
| 175 rtx_header.payloadType = kRtxPayloadType; | |
| 176 EXPECT_TRUE(rtp_payload_registry_->IsRtx(rtx_header)); | |
| 177 rtx_header.ssrc = 0; | |
| 178 EXPECT_FALSE(rtp_payload_registry_->IsRtx(rtx_header)); | |
| 179 rtx_header.ssrc = kRtxSsrc; | |
| 180 rtx_header.payloadType = 0; | |
| 181 EXPECT_TRUE(rtp_payload_registry_->IsRtx(rtx_header)); | |
| 182 } | |
| 183 | |
| 184 } // namespace webrtc | 165 } // namespace webrtc |
| OLD | NEW |