| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 transport_.SetSendModule(rtp_rtcp_module_, &rtp_payload_registry_, | 203 transport_.SetSendModule(rtp_rtcp_module_, &rtp_payload_registry_, |
| 204 rtp_receiver_.get()); | 204 rtp_receiver_.get()); |
| 205 | 205 |
| 206 VideoCodec video_codec; | 206 VideoCodec video_codec; |
| 207 memset(&video_codec, 0, sizeof(video_codec)); | 207 memset(&video_codec, 0, sizeof(video_codec)); |
| 208 video_codec.plType = kPayloadType; | 208 video_codec.plType = kPayloadType; |
| 209 memcpy(video_codec.plName, "I420", 5); | 209 memcpy(video_codec.plName, "I420", 5); |
| 210 | 210 |
| 211 EXPECT_EQ(0, rtp_rtcp_module_->RegisterSendPayload(video_codec)); | 211 EXPECT_EQ(0, rtp_rtcp_module_->RegisterSendPayload(video_codec)); |
| 212 rtp_rtcp_module_->SetRtxSendPayloadType(kRtxPayloadType, kPayloadType); | 212 rtp_rtcp_module_->SetRtxSendPayloadType(kRtxPayloadType, kPayloadType); |
| 213 EXPECT_EQ(0, rtp_receiver_->RegisterReceivePayload( | 213 EXPECT_EQ(0, rtp_payload_registry_.RegisterReceivePayload(video_codec)); |
| 214 video_codec.plName, video_codec.plType, 90000, 0, | |
| 215 video_codec.maxBitrate)); | |
| 216 rtp_payload_registry_.SetRtxPayloadType(kRtxPayloadType, kPayloadType); | 214 rtp_payload_registry_.SetRtxPayloadType(kRtxPayloadType, kPayloadType); |
| 217 | 215 |
| 218 for (size_t n = 0; n < payload_data_length; n++) { | 216 for (size_t n = 0; n < payload_data_length; n++) { |
| 219 payload_data[n] = n % 10; | 217 payload_data[n] = n % 10; |
| 220 } | 218 } |
| 221 } | 219 } |
| 222 | 220 |
| 223 int BuildNackList(uint16_t* nack_list) { | 221 int BuildNackList(uint16_t* nack_list) { |
| 224 receiver_.sequence_numbers_.sort(); | 222 receiver_.sequence_numbers_.sort(); |
| 225 std::list<uint16_t> missing_sequence_numbers; | 223 std::list<uint16_t> missing_sequence_numbers; |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 RunRtxTest(kRtxRetransmitted, 10); | 335 RunRtxTest(kRtxRetransmitted, 10); |
| 338 EXPECT_EQ(kTestSequenceNumber, *(receiver_.sequence_numbers_.begin())); | 336 EXPECT_EQ(kTestSequenceNumber, *(receiver_.sequence_numbers_.begin())); |
| 339 EXPECT_EQ(kTestSequenceNumber + kTestNumberOfPackets - 1, | 337 EXPECT_EQ(kTestSequenceNumber + kTestNumberOfPackets - 1, |
| 340 *(receiver_.sequence_numbers_.rbegin())); | 338 *(receiver_.sequence_numbers_.rbegin())); |
| 341 EXPECT_EQ(kTestNumberOfPackets, receiver_.sequence_numbers_.size()); | 339 EXPECT_EQ(kTestNumberOfPackets, receiver_.sequence_numbers_.size()); |
| 342 EXPECT_EQ(kTestNumberOfRtxPackets, transport_.count_rtx_ssrc_); | 340 EXPECT_EQ(kTestNumberOfRtxPackets, transport_.count_rtx_ssrc_); |
| 343 EXPECT_TRUE(ExpectedPacketsReceived()); | 341 EXPECT_TRUE(ExpectedPacketsReceived()); |
| 344 } | 342 } |
| 345 | 343 |
| 346 } // namespace webrtc | 344 } // namespace webrtc |
| OLD | NEW |