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

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

Issue 2649323010: Revert of Make RTX pt/apt reconfigurable by calling WebRtcVideoChannel2::SetRecvParameters. (Closed)
Patch Set: 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_ssrc = kSendRtxSsrcs[0]; 1094 (*receive_configs)[0].rtp.rtx[payload_type_].ssrc = kSendRtxSsrcs[0];
1095 (*receive_configs)[0].rtp.rtx_payload_types[payload_type_] = 1095 (*receive_configs)[0].rtp.rtx[payload_type_].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 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after
2324 send_config->encoder_settings.payload_name = "VP8"; 2324 send_config->encoder_settings.payload_name = "VP8";
2325 (*receive_configs)[0].decoders[0].payload_name = "VP8"; 2325 (*receive_configs)[0].decoders[0].payload_name = "VP8";
2326 (*receive_configs)[0].rtp.ulpfec.red_payload_type = kRedPayloadType; 2326 (*receive_configs)[0].rtp.ulpfec.red_payload_type = kRedPayloadType;
2327 (*receive_configs)[0].rtp.ulpfec.ulpfec_payload_type = 2327 (*receive_configs)[0].rtp.ulpfec.ulpfec_payload_type =
2328 kUlpfecPayloadType; 2328 kUlpfecPayloadType;
2329 } 2329 }
2330 // RTX 2330 // RTX
2331 if (use_rtx_) { 2331 if (use_rtx_) {
2332 send_config->rtp.rtx.ssrcs.push_back(kSendRtxSsrcs[0]); 2332 send_config->rtp.rtx.ssrcs.push_back(kSendRtxSsrcs[0]);
2333 send_config->rtp.rtx.payload_type = kSendRtxPayloadType; 2333 send_config->rtp.rtx.payload_type = kSendRtxPayloadType;
2334 (*receive_configs)[0].rtp.rtx_ssrc = kSendRtxSsrcs[0]; 2334 (*receive_configs)[0].rtp.rtx[kFakeVideoSendPayloadType].ssrc =
2335 (*receive_configs)[0].rtp.rtx_payload_types[kFakeVideoSendPayloadType] = 2335 kSendRtxSsrcs[0];
2336 (*receive_configs)[0].rtp.rtx[kFakeVideoSendPayloadType].payload_type =
2336 kSendRtxPayloadType; 2337 kSendRtxPayloadType;
2337 } 2338 }
2338 // RTT needed for RemoteNtpTimeEstimator for the receive stream. 2339 // RTT needed for RemoteNtpTimeEstimator for the receive stream.
2339 (*receive_configs)[0].rtp.rtcp_xr.receiver_reference_time_report = true; 2340 (*receive_configs)[0].rtp.rtcp_xr.receiver_reference_time_report = true;
2340 encoder_config->content_type = 2341 encoder_config->content_type =
2341 screenshare_ ? VideoEncoderConfig::ContentType::kScreen 2342 screenshare_ ? VideoEncoderConfig::ContentType::kScreen
2342 : VideoEncoderConfig::ContentType::kRealtimeVideo; 2343 : VideoEncoderConfig::ContentType::kRealtimeVideo;
2343 } 2344 }
2344 2345
2345 void OnCallsCreated(Call* sender_call, Call* receiver_call) override { 2346 void OnCallsCreated(Call* sender_call, Call* receiver_call) override {
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
2945 2946
2946 const std::vector<uint32_t>& ssrcs = send_config->rtp.ssrcs; 2947 const std::vector<uint32_t>& ssrcs = send_config->rtp.ssrcs;
2947 for (size_t i = 0; i < ssrcs.size(); ++i) { 2948 for (size_t i = 0; i < ssrcs.size(); ++i) {
2948 expected_send_ssrcs_.insert(ssrcs[i]); 2949 expected_send_ssrcs_.insert(ssrcs[i]);
2949 expected_receive_ssrcs_.push_back( 2950 expected_receive_ssrcs_.push_back(
2950 (*receive_configs)[i].rtp.remote_ssrc); 2951 (*receive_configs)[i].rtp.remote_ssrc);
2951 (*receive_configs)[i].render_delay_ms = kExpectedRenderDelayMs; 2952 (*receive_configs)[i].render_delay_ms = kExpectedRenderDelayMs;
2952 (*receive_configs)[i].renderer = &receive_stream_renderer_; 2953 (*receive_configs)[i].renderer = &receive_stream_renderer_;
2953 (*receive_configs)[i].rtp.nack.rtp_history_ms = kNackRtpHistoryMs; 2954 (*receive_configs)[i].rtp.nack.rtp_history_ms = kNackRtpHistoryMs;
2954 2955
2955 (*receive_configs)[i].rtp.rtx_ssrc = kSendRtxSsrcs[i]; 2956 (*receive_configs)[i].rtp.rtx[kFakeVideoSendPayloadType].ssrc =
2956 (*receive_configs)[i].rtp.rtx_payload_types[kFakeVideoSendPayloadType] = 2957 kSendRtxSsrcs[i];
2958 (*receive_configs)[i].rtp.rtx[kFakeVideoSendPayloadType].payload_type =
2957 kSendRtxPayloadType; 2959 kSendRtxPayloadType;
2958 } 2960 }
2959 2961
2960 for (size_t i = 0; i < kNumSsrcs; ++i) 2962 for (size_t i = 0; i < kNumSsrcs; ++i)
2961 send_config->rtp.rtx.ssrcs.push_back(kSendRtxSsrcs[i]); 2963 send_config->rtp.rtx.ssrcs.push_back(kSendRtxSsrcs[i]);
2962 2964
2963 // Use a delayed encoder to make sure we see CpuOveruseMetrics stats that 2965 // Use a delayed encoder to make sure we see CpuOveruseMetrics stats that
2964 // are non-zero. 2966 // are non-zero.
2965 send_config->encoder_settings.encoder = &encoder_; 2967 send_config->encoder_settings.encoder = &encoder_;
2966 } 2968 }
(...skipping 963 matching lines...) Expand 10 before | Expand all | Expand 10 after
3930 3932
3931 TEST_P(EndToEndTest, VerifyDefaultVideoReceiveConfigParameters) { 3933 TEST_P(EndToEndTest, VerifyDefaultVideoReceiveConfigParameters) {
3932 VideoReceiveStream::Config default_receive_config(nullptr); 3934 VideoReceiveStream::Config default_receive_config(nullptr);
3933 EXPECT_EQ(RtcpMode::kCompound, default_receive_config.rtp.rtcp_mode) 3935 EXPECT_EQ(RtcpMode::kCompound, default_receive_config.rtp.rtcp_mode)
3934 << "Reduced-size RTCP require rtcp-rsize to be negotiated."; 3936 << "Reduced-size RTCP require rtcp-rsize to be negotiated.";
3935 EXPECT_FALSE(default_receive_config.rtp.remb) 3937 EXPECT_FALSE(default_receive_config.rtp.remb)
3936 << "REMB require rtcp-fb: goog-remb to be negotiated."; 3938 << "REMB require rtcp-fb: goog-remb to be negotiated.";
3937 EXPECT_FALSE( 3939 EXPECT_FALSE(
3938 default_receive_config.rtp.rtcp_xr.receiver_reference_time_report) 3940 default_receive_config.rtp.rtcp_xr.receiver_reference_time_report)
3939 << "RTCP XR settings require rtcp-xr to be negotiated."; 3941 << "RTCP XR settings require rtcp-xr to be negotiated.";
3940 EXPECT_EQ(0U, default_receive_config.rtp.rtx_ssrc) 3942 EXPECT_TRUE(default_receive_config.rtp.rtx.empty())
3941 << "Enabling RTX requires ssrc-group: FID negotiation";
3942 EXPECT_TRUE(default_receive_config.rtp.rtx_payload_types.empty())
3943 << "Enabling RTX requires rtpmap: rtx negotiation."; 3943 << "Enabling RTX requires rtpmap: rtx negotiation.";
3944 EXPECT_TRUE(default_receive_config.rtp.extensions.empty()) 3944 EXPECT_TRUE(default_receive_config.rtp.extensions.empty())
3945 << "Enabling RTP extensions require negotiation."; 3945 << "Enabling RTP extensions require negotiation.";
3946 3946
3947 VerifyEmptyNackConfig(default_receive_config.rtp.nack); 3947 VerifyEmptyNackConfig(default_receive_config.rtp.nack);
3948 VerifyEmptyUlpfecConfig(default_receive_config.rtp.ulpfec); 3948 VerifyEmptyUlpfecConfig(default_receive_config.rtp.ulpfec);
3949 } 3949 }
3950 3950
3951 TEST_P(EndToEndTest, VerifyDefaultFlexfecReceiveConfigParameters) { 3951 TEST_P(EndToEndTest, VerifyDefaultFlexfecReceiveConfigParameters) {
3952 test::NullTransport rtcp_send_transport; 3952 test::NullTransport rtcp_send_transport;
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
4126 std::unique_ptr<VideoEncoder> encoder_; 4126 std::unique_ptr<VideoEncoder> encoder_;
4127 std::unique_ptr<VideoDecoder> decoder_; 4127 std::unique_ptr<VideoDecoder> decoder_;
4128 rtc::CriticalSection crit_; 4128 rtc::CriticalSection crit_;
4129 int recorded_frames_ GUARDED_BY(crit_); 4129 int recorded_frames_ GUARDED_BY(crit_);
4130 } test(this); 4130 } test(this);
4131 4131
4132 RunBaseTest(&test); 4132 RunBaseTest(&test);
4133 } 4133 }
4134 4134
4135 } // namespace webrtc 4135 } // 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