Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Side by Side Diff: webrtc/video/end_to_end_tests.cc

Issue 2654163006: Reland of Make RTX pt/apt reconfigurable by calling WebRtcVideoChannel2::SetRecvParameters. (Closed)
Patch Set: Update transition code. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/tools/event_log_visualizer/analyzer.cc ('k') | webrtc/video/receive_statistics_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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> 10 #include <algorithm>
(...skipping 1073 matching lines...) Expand 10 before | Expand all | Expand 10 after
1084 send_config->rtp.ulpfec.ulpfec_payload_type; 1084 send_config->rtp.ulpfec.ulpfec_payload_type;
1085 (*receive_configs)[0].rtp.ulpfec.red_payload_type = 1085 (*receive_configs)[0].rtp.ulpfec.red_payload_type =
1086 send_config->rtp.ulpfec.red_payload_type; 1086 send_config->rtp.ulpfec.red_payload_type;
1087 (*receive_configs)[0].rtp.ulpfec.red_rtx_payload_type = 1087 (*receive_configs)[0].rtp.ulpfec.red_rtx_payload_type =
1088 send_config->rtp.ulpfec.red_rtx_payload_type; 1088 send_config->rtp.ulpfec.red_rtx_payload_type;
1089 } 1089 }
1090 1090
1091 if (retransmission_ssrc_ == kSendRtxSsrcs[0]) { 1091 if (retransmission_ssrc_ == kSendRtxSsrcs[0]) {
1092 send_config->rtp.rtx.ssrcs.push_back(kSendRtxSsrcs[0]); 1092 send_config->rtp.rtx.ssrcs.push_back(kSendRtxSsrcs[0]);
1093 send_config->rtp.rtx.payload_type = kSendRtxPayloadType; 1093 send_config->rtp.rtx.payload_type = kSendRtxPayloadType;
1094 (*receive_configs)[0].rtp.rtx[payload_type_].ssrc = kSendRtxSsrcs[0]; 1094 (*receive_configs)[0].rtp.rtx_ssrc = kSendRtxSsrcs[0];
1095 (*receive_configs)[0].rtp.rtx[payload_type_].payload_type = 1095 (*receive_configs)[0].rtp.rtx_payload_types[payload_type_] =
1096 kSendRtxPayloadType; 1096 kSendRtxPayloadType;
1097 } 1097 }
1098 // Configure encoding and decoding with VP8, since generic packetization 1098 // Configure encoding and decoding with VP8, since generic packetization
1099 // doesn't support FEC with NACK. 1099 // doesn't support FEC with NACK.
1100 RTC_DCHECK_EQ(1, (*receive_configs)[0].decoders.size()); 1100 RTC_DCHECK_EQ(1, (*receive_configs)[0].decoders.size());
1101 send_config->encoder_settings.encoder = encoder_.get(); 1101 send_config->encoder_settings.encoder = encoder_.get();
1102 send_config->encoder_settings.payload_name = "VP8"; 1102 send_config->encoder_settings.payload_name = "VP8";
1103 (*receive_configs)[0].decoders[0].payload_name = "VP8"; 1103 (*receive_configs)[0].decoders[0].payload_name = "VP8";
1104 } 1104 }
1105 1105
(...skipping 1221 matching lines...) Expand 10 before | Expand all | Expand 10 after
2327 send_config->encoder_settings.payload_name = "VP8"; 2327 send_config->encoder_settings.payload_name = "VP8";
2328 (*receive_configs)[0].decoders[0].payload_name = "VP8"; 2328 (*receive_configs)[0].decoders[0].payload_name = "VP8";
2329 (*receive_configs)[0].rtp.ulpfec.red_payload_type = kRedPayloadType; 2329 (*receive_configs)[0].rtp.ulpfec.red_payload_type = kRedPayloadType;
2330 (*receive_configs)[0].rtp.ulpfec.ulpfec_payload_type = 2330 (*receive_configs)[0].rtp.ulpfec.ulpfec_payload_type =
2331 kUlpfecPayloadType; 2331 kUlpfecPayloadType;
2332 } 2332 }
2333 // RTX 2333 // RTX
2334 if (use_rtx_) { 2334 if (use_rtx_) {
2335 send_config->rtp.rtx.ssrcs.push_back(kSendRtxSsrcs[0]); 2335 send_config->rtp.rtx.ssrcs.push_back(kSendRtxSsrcs[0]);
2336 send_config->rtp.rtx.payload_type = kSendRtxPayloadType; 2336 send_config->rtp.rtx.payload_type = kSendRtxPayloadType;
2337 (*receive_configs)[0].rtp.rtx[kFakeVideoSendPayloadType].ssrc = 2337 (*receive_configs)[0].rtp.rtx_ssrc = kSendRtxSsrcs[0];
2338 kSendRtxSsrcs[0]; 2338 (*receive_configs)[0].rtp.rtx_payload_types[kFakeVideoSendPayloadType] =
2339 (*receive_configs)[0].rtp.rtx[kFakeVideoSendPayloadType].payload_type =
2340 kSendRtxPayloadType; 2339 kSendRtxPayloadType;
2341 } 2340 }
2342 // RTT needed for RemoteNtpTimeEstimator for the receive stream. 2341 // RTT needed for RemoteNtpTimeEstimator for the receive stream.
2343 (*receive_configs)[0].rtp.rtcp_xr.receiver_reference_time_report = true; 2342 (*receive_configs)[0].rtp.rtcp_xr.receiver_reference_time_report = true;
2344 encoder_config->content_type = 2343 encoder_config->content_type =
2345 screenshare_ ? VideoEncoderConfig::ContentType::kScreen 2344 screenshare_ ? VideoEncoderConfig::ContentType::kScreen
2346 : VideoEncoderConfig::ContentType::kRealtimeVideo; 2345 : VideoEncoderConfig::ContentType::kRealtimeVideo;
2347 } 2346 }
2348 2347
2349 void OnCallsCreated(Call* sender_call, Call* receiver_call) override { 2348 void OnCallsCreated(Call* sender_call, Call* receiver_call) override {
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
2949 2948
2950 const std::vector<uint32_t>& ssrcs = send_config->rtp.ssrcs; 2949 const std::vector<uint32_t>& ssrcs = send_config->rtp.ssrcs;
2951 for (size_t i = 0; i < ssrcs.size(); ++i) { 2950 for (size_t i = 0; i < ssrcs.size(); ++i) {
2952 expected_send_ssrcs_.insert(ssrcs[i]); 2951 expected_send_ssrcs_.insert(ssrcs[i]);
2953 expected_receive_ssrcs_.push_back( 2952 expected_receive_ssrcs_.push_back(
2954 (*receive_configs)[i].rtp.remote_ssrc); 2953 (*receive_configs)[i].rtp.remote_ssrc);
2955 (*receive_configs)[i].render_delay_ms = kExpectedRenderDelayMs; 2954 (*receive_configs)[i].render_delay_ms = kExpectedRenderDelayMs;
2956 (*receive_configs)[i].renderer = &receive_stream_renderer_; 2955 (*receive_configs)[i].renderer = &receive_stream_renderer_;
2957 (*receive_configs)[i].rtp.nack.rtp_history_ms = kNackRtpHistoryMs; 2956 (*receive_configs)[i].rtp.nack.rtp_history_ms = kNackRtpHistoryMs;
2958 2957
2959 (*receive_configs)[i].rtp.rtx[kFakeVideoSendPayloadType].ssrc = 2958 (*receive_configs)[i].rtp.rtx_ssrc = kSendRtxSsrcs[i];
2960 kSendRtxSsrcs[i]; 2959 (*receive_configs)[i].rtp.rtx_payload_types[kFakeVideoSendPayloadType] =
2961 (*receive_configs)[i].rtp.rtx[kFakeVideoSendPayloadType].payload_type =
2962 kSendRtxPayloadType; 2960 kSendRtxPayloadType;
2963 } 2961 }
2964 2962
2965 for (size_t i = 0; i < kNumSsrcs; ++i) 2963 for (size_t i = 0; i < kNumSsrcs; ++i)
2966 send_config->rtp.rtx.ssrcs.push_back(kSendRtxSsrcs[i]); 2964 send_config->rtp.rtx.ssrcs.push_back(kSendRtxSsrcs[i]);
2967 2965
2968 // Use a delayed encoder to make sure we see CpuOveruseMetrics stats that 2966 // Use a delayed encoder to make sure we see CpuOveruseMetrics stats that
2969 // are non-zero. 2967 // are non-zero.
2970 send_config->encoder_settings.encoder = &encoder_; 2968 send_config->encoder_settings.encoder = &encoder_;
2971 } 2969 }
(...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after
3939 3937
3940 TEST_P(EndToEndTest, VerifyDefaultVideoReceiveConfigParameters) { 3938 TEST_P(EndToEndTest, VerifyDefaultVideoReceiveConfigParameters) {
3941 VideoReceiveStream::Config default_receive_config(nullptr); 3939 VideoReceiveStream::Config default_receive_config(nullptr);
3942 EXPECT_EQ(RtcpMode::kCompound, default_receive_config.rtp.rtcp_mode) 3940 EXPECT_EQ(RtcpMode::kCompound, default_receive_config.rtp.rtcp_mode)
3943 << "Reduced-size RTCP require rtcp-rsize to be negotiated."; 3941 << "Reduced-size RTCP require rtcp-rsize to be negotiated.";
3944 EXPECT_FALSE(default_receive_config.rtp.remb) 3942 EXPECT_FALSE(default_receive_config.rtp.remb)
3945 << "REMB require rtcp-fb: goog-remb to be negotiated."; 3943 << "REMB require rtcp-fb: goog-remb to be negotiated.";
3946 EXPECT_FALSE( 3944 EXPECT_FALSE(
3947 default_receive_config.rtp.rtcp_xr.receiver_reference_time_report) 3945 default_receive_config.rtp.rtcp_xr.receiver_reference_time_report)
3948 << "RTCP XR settings require rtcp-xr to be negotiated."; 3946 << "RTCP XR settings require rtcp-xr to be negotiated.";
3949 EXPECT_TRUE(default_receive_config.rtp.rtx.empty()) 3947 EXPECT_EQ(0U, default_receive_config.rtp.rtx_ssrc)
3948 << "Enabling RTX requires ssrc-group: FID negotiation";
3949 EXPECT_TRUE(default_receive_config.rtp.rtx_payload_types.empty())
3950 << "Enabling RTX requires rtpmap: rtx negotiation."; 3950 << "Enabling RTX requires rtpmap: rtx negotiation.";
3951 EXPECT_TRUE(default_receive_config.rtp.extensions.empty()) 3951 EXPECT_TRUE(default_receive_config.rtp.extensions.empty())
3952 << "Enabling RTP extensions require negotiation."; 3952 << "Enabling RTP extensions require negotiation.";
3953 3953
3954 VerifyEmptyNackConfig(default_receive_config.rtp.nack); 3954 VerifyEmptyNackConfig(default_receive_config.rtp.nack);
3955 VerifyEmptyUlpfecConfig(default_receive_config.rtp.ulpfec); 3955 VerifyEmptyUlpfecConfig(default_receive_config.rtp.ulpfec);
3956 } 3956 }
3957 3957
3958 TEST_P(EndToEndTest, VerifyDefaultFlexfecReceiveConfigParameters) { 3958 TEST_P(EndToEndTest, VerifyDefaultFlexfecReceiveConfigParameters) {
3959 test::NullTransport rtcp_send_transport; 3959 test::NullTransport rtcp_send_transport;
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
4133 std::unique_ptr<VideoEncoder> encoder_; 4133 std::unique_ptr<VideoEncoder> encoder_;
4134 std::unique_ptr<VideoDecoder> decoder_; 4134 std::unique_ptr<VideoDecoder> decoder_;
4135 rtc::CriticalSection crit_; 4135 rtc::CriticalSection crit_;
4136 int recorded_frames_ GUARDED_BY(crit_); 4136 int recorded_frames_ GUARDED_BY(crit_);
4137 } test(this); 4137 } test(this);
4138 4138
4139 RunBaseTest(&test); 4139 RunBaseTest(&test);
4140 } 4140 }
4141 4141
4142 } // namespace webrtc 4142 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/tools/event_log_visualizer/analyzer.cc ('k') | webrtc/video/receive_statistics_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698