| 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 #include <algorithm> // max | 10 #include <algorithm> // max |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 transport_adapter_.reset( | 422 transport_adapter_.reset( |
| 423 new internal::TransportAdapter(send_config->send_transport)); | 423 new internal::TransportAdapter(send_config->send_transport)); |
| 424 transport_adapter_->Enable(); | 424 transport_adapter_->Enable(); |
| 425 if (use_nack_) { | 425 if (use_nack_) { |
| 426 send_config->rtp.nack.rtp_history_ms = | 426 send_config->rtp.nack.rtp_history_ms = |
| 427 (*receive_configs)[0].rtp.nack.rtp_history_ms = | 427 (*receive_configs)[0].rtp.nack.rtp_history_ms = |
| 428 VideoSendStreamTest::kNackRtpHistoryMs; | 428 VideoSendStreamTest::kNackRtpHistoryMs; |
| 429 } | 429 } |
| 430 send_config->encoder_settings.encoder = encoder_.get(); | 430 send_config->encoder_settings.encoder = encoder_.get(); |
| 431 send_config->encoder_settings.payload_name = payload_name_; | 431 send_config->encoder_settings.payload_name = payload_name_; |
| 432 send_config->rtp.fec.red_payload_type = | 432 send_config->rtp.ulpfec.red_payload_type = |
| 433 VideoSendStreamTest::kRedPayloadType; | 433 VideoSendStreamTest::kRedPayloadType; |
| 434 send_config->rtp.fec.ulpfec_payload_type = | 434 send_config->rtp.ulpfec.ulpfec_payload_type = |
| 435 VideoSendStreamTest::kUlpfecPayloadType; | 435 VideoSendStreamTest::kUlpfecPayloadType; |
| 436 if (header_extensions_enabled_) { | 436 if (header_extensions_enabled_) { |
| 437 send_config->rtp.extensions.push_back(RtpExtension( | 437 send_config->rtp.extensions.push_back(RtpExtension( |
| 438 RtpExtension::kAbsSendTimeUri, test::kAbsSendTimeExtensionId)); | 438 RtpExtension::kAbsSendTimeUri, test::kAbsSendTimeExtensionId)); |
| 439 send_config->rtp.extensions.push_back( | 439 send_config->rtp.extensions.push_back( |
| 440 RtpExtension(RtpExtension::kTransportSequenceNumberUri, | 440 RtpExtension(RtpExtension::kTransportSequenceNumberUri, |
| 441 test::kTransportSequenceNumberExtensionId)); | 441 test::kTransportSequenceNumberExtensionId)); |
| 442 } | 442 } |
| 443 (*receive_configs)[0].rtp.fec.red_payload_type = | 443 (*receive_configs)[0].rtp.ulpfec.red_payload_type = |
| 444 send_config->rtp.fec.red_payload_type; | 444 send_config->rtp.ulpfec.red_payload_type; |
| 445 (*receive_configs)[0].rtp.fec.ulpfec_payload_type = | 445 (*receive_configs)[0].rtp.ulpfec.ulpfec_payload_type = |
| 446 send_config->rtp.fec.ulpfec_payload_type; | 446 send_config->rtp.ulpfec.ulpfec_payload_type; |
| 447 } | 447 } |
| 448 | 448 |
| 449 void PerformTest() override { | 449 void PerformTest() override { |
| 450 EXPECT_TRUE(Wait()) << "Timed out waiting for FEC and media packets."; | 450 EXPECT_TRUE(Wait()) << "Timed out waiting for FEC and media packets."; |
| 451 } | 451 } |
| 452 | 452 |
| 453 std::unique_ptr<internal::TransportAdapter> transport_adapter_; | 453 std::unique_ptr<internal::TransportAdapter> transport_adapter_; |
| 454 std::unique_ptr<VideoEncoder> encoder_; | 454 std::unique_ptr<VideoEncoder> encoder_; |
| 455 const std::string payload_name_; | 455 const std::string payload_name_; |
| 456 const bool use_nack_; | 456 const bool use_nack_; |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 742 } | 742 } |
| 743 | 743 |
| 744 void ModifyVideoConfigs( | 744 void ModifyVideoConfigs( |
| 745 VideoSendStream::Config* send_config, | 745 VideoSendStream::Config* send_config, |
| 746 std::vector<VideoReceiveStream::Config>* receive_configs, | 746 std::vector<VideoReceiveStream::Config>* receive_configs, |
| 747 VideoEncoderConfig* encoder_config) override { | 747 VideoEncoderConfig* encoder_config) override { |
| 748 transport_adapter_.reset( | 748 transport_adapter_.reset( |
| 749 new internal::TransportAdapter(send_config->send_transport)); | 749 new internal::TransportAdapter(send_config->send_transport)); |
| 750 transport_adapter_->Enable(); | 750 transport_adapter_->Enable(); |
| 751 if (use_fec_) { | 751 if (use_fec_) { |
| 752 send_config->rtp.fec.red_payload_type = kRedPayloadType; | 752 send_config->rtp.ulpfec.red_payload_type = kRedPayloadType; |
| 753 send_config->rtp.fec.ulpfec_payload_type = kUlpfecPayloadType; | 753 send_config->rtp.ulpfec.ulpfec_payload_type = kUlpfecPayloadType; |
| 754 } | 754 } |
| 755 | 755 |
| 756 if (!test_generic_packetization_) | 756 if (!test_generic_packetization_) |
| 757 send_config->encoder_settings.payload_name = "VP8"; | 757 send_config->encoder_settings.payload_name = "VP8"; |
| 758 | 758 |
| 759 send_config->encoder_settings.encoder = &encoder_; | 759 send_config->encoder_settings.encoder = &encoder_; |
| 760 send_config->rtp.max_packet_size = kMaxPacketSize; | 760 send_config->rtp.max_packet_size = kMaxPacketSize; |
| 761 send_config->post_encode_callback = this; | 761 send_config->post_encode_callback = this; |
| 762 | 762 |
| 763 // Make sure there is at least one extension header, to make the RTP | 763 // Make sure there is at least one extension header, to make the RTP |
| (...skipping 2049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2813 observation_complete_.Set(); | 2813 observation_complete_.Set(); |
| 2814 } | 2814 } |
| 2815 } | 2815 } |
| 2816 } test; | 2816 } test; |
| 2817 | 2817 |
| 2818 RunBaseTest(&test); | 2818 RunBaseTest(&test); |
| 2819 } | 2819 } |
| 2820 #endif // !defined(RTC_DISABLE_VP9) | 2820 #endif // !defined(RTC_DISABLE_VP9) |
| 2821 | 2821 |
| 2822 } // namespace webrtc | 2822 } // namespace webrtc |
| OLD | NEW |