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

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

Issue 2913343004: Re-enable EndToEndTest.PictureIdStateRetainedAfterReinitingVp8 on tsan. (Closed)
Patch Set: Rebase. Created 3 years, 6 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 4108 matching lines...) Expand 10 before | Expand all | Expand 10 after
4119 reinit_encoder_and_test(1); 4119 reinit_encoder_and_test(1);
4120 reinit_encoder_and_test(1); 4120 reinit_encoder_and_test(1);
4121 4121
4122 send_transport.StopSending(); 4122 send_transport.StopSending();
4123 receive_transport.StopSending(); 4123 receive_transport.StopSending();
4124 4124
4125 Stop(); 4125 Stop();
4126 DestroyStreams(); 4126 DestroyStreams();
4127 } 4127 }
4128 4128
4129 // These tests exposed a race in libvpx, see 4129 TEST_F(EndToEndTest, PictureIdStateRetainedAfterReinitingVp8) {
4130 // https://bugs.chromium.org/p/webrtc/issues/detail?id=7663. Disabling the tests
4131 // on tsan until the race has been fixed.
4132 #if defined(THREAD_SANITIZER)
4133 #define MAYBE_PictureIdStateRetainedAfterReinitingVp8 \
4134 DISABLED_PictureIdStateRetainedAfterReinitingVp8
4135 #define MAYBE_PictureIdStateRetainedAfterReinitingSimulcastEncoderAdapter \
4136 DISABLED_PictureIdStateRetainedAfterReinitingSimulcastEncoderAdapter
4137 #else
4138 #define MAYBE_PictureIdStateRetainedAfterReinitingVp8 \
4139 PictureIdStateRetainedAfterReinitingVp8
4140 #define MAYBE_PictureIdStateRetainedAfterReinitingSimulcastEncoderAdapter \
4141 PictureIdStateRetainedAfterReinitingSimulcastEncoderAdapter
4142 #endif
4143 TEST_F(EndToEndTest, MAYBE_PictureIdStateRetainedAfterReinitingVp8) {
4144 std::unique_ptr<VideoEncoder> encoder(VP8Encoder::Create()); 4130 std::unique_ptr<VideoEncoder> encoder(VP8Encoder::Create());
4145 TestPictureIdStatePreservation(encoder.get()); 4131 TestPictureIdStatePreservation(encoder.get());
4146 } 4132 }
4147 4133
4134 TEST_F(EndToEndTest,
brandtr 2017/06/01 09:36:25 Moved this test for better ordering in the file.
4135 PictureIdStateRetainedAfterReinitingSimulcastEncoderAdapter) {
4136 class VideoEncoderFactoryAdapter : public webrtc::VideoEncoderFactory {
4137 public:
4138 explicit VideoEncoderFactoryAdapter(
4139 cricket::WebRtcVideoEncoderFactory* factory)
4140 : factory_(factory) {}
4141 virtual ~VideoEncoderFactoryAdapter() {}
4142
4143 // Implements webrtc::VideoEncoderFactory.
4144 webrtc::VideoEncoder* Create() override {
4145 return factory_->CreateVideoEncoder(
4146 cricket::VideoCodec(cricket::kVp8CodecName));
4147 }
4148
4149 void Destroy(webrtc::VideoEncoder* encoder) override {
4150 return factory_->DestroyVideoEncoder(encoder);
4151 }
4152
4153 private:
4154 cricket::WebRtcVideoEncoderFactory* const factory_;
4155 };
4156
4157 cricket::InternalEncoderFactory internal_encoder_factory;
4158 SimulcastEncoderAdapter simulcast_encoder_adapter(
4159 new VideoEncoderFactoryAdapter(&internal_encoder_factory));
4160
4161 TestPictureIdStatePreservation(&simulcast_encoder_adapter);
4162 }
4163
4148 // This test is flaky on linux_memcheck. Disable on all linux bots until 4164 // This test is flaky on linux_memcheck. Disable on all linux bots until
4149 // flakyness has been fixed. 4165 // flakyness has been fixed.
4150 // https://bugs.chromium.org/p/webrtc/issues/detail?id=7737 4166 // https://bugs.chromium.org/p/webrtc/issues/detail?id=7737
4151 #if defined(WEBRTC_LINUX) 4167 #if defined(WEBRTC_LINUX)
4152 #define MAYBE_TestFlexfecRtpStatePreservation \ 4168 #define MAYBE_TestFlexfecRtpStatePreservation \
4153 DISABLED_TestFlexfecRtpStatePreservation 4169 DISABLED_TestFlexfecRtpStatePreservation
4154 #else 4170 #else
4155 #define MAYBE_TestFlexfecRtpStatePreservation TestFlexfecRtpStatePreservation 4171 #define MAYBE_TestFlexfecRtpStatePreservation TestFlexfecRtpStatePreservation
4156 #endif 4172 #endif
4157 TEST_F(EndToEndTest, MAYBE_TestFlexfecRtpStatePreservation) { 4173 TEST_F(EndToEndTest, MAYBE_TestFlexfecRtpStatePreservation) {
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
4306 frame_generator_capturer_->Start(); 4322 frame_generator_capturer_->Start();
4307 EXPECT_TRUE(observer.Wait()) << "Timed out waiting for packets."; 4323 EXPECT_TRUE(observer.Wait()) << "Timed out waiting for packets.";
4308 4324
4309 // Cleanup. 4325 // Cleanup.
4310 send_transport.StopSending(); 4326 send_transport.StopSending();
4311 receive_transport.StopSending(); 4327 receive_transport.StopSending();
4312 Stop(); 4328 Stop();
4313 DestroyStreams(); 4329 DestroyStreams();
4314 } 4330 }
4315 4331
4316 TEST_F(EndToEndTest,
4317 MAYBE_PictureIdStateRetainedAfterReinitingSimulcastEncoderAdapter) {
4318 class VideoEncoderFactoryAdapter : public webrtc::VideoEncoderFactory {
4319 public:
4320 explicit VideoEncoderFactoryAdapter(
4321 cricket::WebRtcVideoEncoderFactory* factory)
4322 : factory_(factory) {}
4323 virtual ~VideoEncoderFactoryAdapter() {}
4324
4325 // Implements webrtc::VideoEncoderFactory.
4326 webrtc::VideoEncoder* Create() override {
4327 return factory_->CreateVideoEncoder(
4328 cricket::VideoCodec(cricket::kVp8CodecName));
4329 }
4330
4331 void Destroy(webrtc::VideoEncoder* encoder) override {
4332 return factory_->DestroyVideoEncoder(encoder);
4333 }
4334
4335 private:
4336 cricket::WebRtcVideoEncoderFactory* const factory_;
4337 };
4338
4339 cricket::InternalEncoderFactory internal_encoder_factory;
4340 SimulcastEncoderAdapter simulcast_encoder_adapter(
4341 new VideoEncoderFactoryAdapter(&internal_encoder_factory));
4342
4343 TestPictureIdStatePreservation(&simulcast_encoder_adapter);
4344 }
4345
4346 TEST_F(EndToEndTest, RespectsNetworkState) { 4332 TEST_F(EndToEndTest, RespectsNetworkState) {
4347 // TODO(pbos): Remove accepted downtime packets etc. when signaling network 4333 // TODO(pbos): Remove accepted downtime packets etc. when signaling network
4348 // down blocks until no more packets will be sent. 4334 // down blocks until no more packets will be sent.
4349 4335
4350 // Pacer will send from its packet list and then send required padding before 4336 // Pacer will send from its packet list and then send required padding before
4351 // checking paused_ again. This should be enough for one round of pacing, 4337 // checking paused_ again. This should be enough for one round of pacing,
4352 // otherwise increase. 4338 // otherwise increase.
4353 static const int kNumAcceptedDowntimeRtp = 5; 4339 static const int kNumAcceptedDowntimeRtp = 5;
4354 // A single RTCP may be in the pipeline. 4340 // A single RTCP may be in the pipeline.
4355 static const int kNumAcceptedDowntimeRtcp = 1; 4341 static const int kNumAcceptedDowntimeRtcp = 1;
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
4927 std::unique_ptr<VideoEncoder> encoder_; 4913 std::unique_ptr<VideoEncoder> encoder_;
4928 std::unique_ptr<VideoDecoder> decoder_; 4914 std::unique_ptr<VideoDecoder> decoder_;
4929 rtc::CriticalSection crit_; 4915 rtc::CriticalSection crit_;
4930 int recorded_frames_ GUARDED_BY(crit_); 4916 int recorded_frames_ GUARDED_BY(crit_);
4931 } test(this); 4917 } test(this);
4932 4918
4933 RunBaseTest(&test); 4919 RunBaseTest(&test);
4934 } 4920 }
4935 4921
4936 } // namespace webrtc 4922 } // 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