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

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

Issue 2688493002: Fix flaky test introduced by r16478 and r16492 (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 | « no previous file | no next file » | 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 1075 matching lines...) Expand 10 before | Expand all | Expand 10 after
1086 // details. 1086 // details.
1087 observation_complete_.Set(); 1087 observation_complete_.Set();
1088 } 1088 }
1089 return DROP_PACKET; 1089 return DROP_PACKET;
1090 } 1090 }
1091 1091
1092 return SEND_PACKET; 1092 return SEND_PACKET;
1093 } 1093 }
1094 1094
1095 void OnFrame(const VideoFrame& frame) override { 1095 void OnFrame(const VideoFrame& frame) override {
1096 rtc::CritScope lock(&crit_); 1096 {
1097 if (frame.timestamp() == retransmitted_timestamp_) 1097 rtc::CritScope lock(&crit_);
1098 observation_complete_.Set(); 1098 if (frame.timestamp() == retransmitted_timestamp_)
1099 rendered_timestamps_.push_back(frame.timestamp()); 1099 observation_complete_.Set();
1100 rendered_timestamps_.push_back(frame.timestamp());
1101 }
1100 orig_renderer_->OnFrame(frame); 1102 orig_renderer_->OnFrame(frame);
1101 } 1103 }
1102 1104
1103 void ModifyVideoConfigs( 1105 void ModifyVideoConfigs(
1104 VideoSendStream::Config* send_config, 1106 VideoSendStream::Config* send_config,
1105 std::vector<VideoReceiveStream::Config>* receive_configs, 1107 std::vector<VideoReceiveStream::Config>* receive_configs,
1106 VideoEncoderConfig* encoder_config) override { 1108 VideoEncoderConfig* encoder_config) override {
1107 send_config->rtp.nack.rtp_history_ms = kNackRtpHistoryMs; 1109 send_config->rtp.nack.rtp_history_ms = kNackRtpHistoryMs;
1108 1110
1109 // Insert ourselves into the rendering pipeline. 1111 // Insert ourselves into the rendering pipeline.
1110 RTC_DCHECK(!orig_renderer_); 1112 RTC_DCHECK(!orig_renderer_);
1111 orig_renderer_ = (*receive_configs)[0].renderer; 1113 orig_renderer_ = (*receive_configs)[0].renderer;
1112 RTC_DCHECK(orig_renderer_); 1114 RTC_DCHECK(orig_renderer_);
1115 (*receive_configs)[0].disable_prerenderer_smoothing = true;
1113 (*receive_configs)[0].renderer = this; 1116 (*receive_configs)[0].renderer = this;
1114 1117
1115 (*receive_configs)[0].rtp.nack.rtp_history_ms = kNackRtpHistoryMs; 1118 (*receive_configs)[0].rtp.nack.rtp_history_ms = kNackRtpHistoryMs;
1116 1119
1117 if (payload_type_ == kRedPayloadType) { 1120 if (payload_type_ == kRedPayloadType) {
1118 send_config->rtp.ulpfec.ulpfec_payload_type = kUlpfecPayloadType; 1121 send_config->rtp.ulpfec.ulpfec_payload_type = kUlpfecPayloadType;
1119 send_config->rtp.ulpfec.red_payload_type = kRedPayloadType; 1122 send_config->rtp.ulpfec.red_payload_type = kRedPayloadType;
1120 if (retransmission_ssrc_ == kSendRtxSsrcs[0]) 1123 if (retransmission_ssrc_ == kSendRtxSsrcs[0])
1121 send_config->rtp.ulpfec.red_rtx_payload_type = kRtxRedPayloadType; 1124 send_config->rtp.ulpfec.red_rtx_payload_type = kRtxRedPayloadType;
1122 (*receive_configs)[0].rtp.ulpfec.ulpfec_payload_type = 1125 (*receive_configs)[0].rtp.ulpfec.ulpfec_payload_type =
(...skipping 3063 matching lines...) Expand 10 before | Expand all | Expand 10 after
4186 std::unique_ptr<VideoEncoder> encoder_; 4189 std::unique_ptr<VideoEncoder> encoder_;
4187 std::unique_ptr<VideoDecoder> decoder_; 4190 std::unique_ptr<VideoDecoder> decoder_;
4188 rtc::CriticalSection crit_; 4191 rtc::CriticalSection crit_;
4189 int recorded_frames_ GUARDED_BY(crit_); 4192 int recorded_frames_ GUARDED_BY(crit_);
4190 } test(this); 4193 } test(this);
4191 4194
4192 RunBaseTest(&test); 4195 RunBaseTest(&test);
4193 } 4196 }
4194 4197
4195 } // namespace webrtc 4198 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698