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

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

Issue 2271433002: Fixing TSan data race warning in video end-to-end tests. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 4 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 } 91 }
92 if (need_rtcp_) { 92 if (need_rtcp_) {
93 ADD_FAILURE() << "Expected RTCP packet not sent."; 93 ADD_FAILURE() << "Expected RTCP packet not sent.";
94 } 94 }
95 } 95 }
96 96
97 private: 97 private:
98 bool SendRtp(const uint8_t* packet, 98 bool SendRtp(const uint8_t* packet,
99 size_t length, 99 size_t length,
100 const PacketOptions& options) override { 100 const PacketOptions& options) override {
101 rtc::CritScope lock(&crit_);
101 need_rtp_ = false; 102 need_rtp_ = false;
102 return true; 103 return true;
103 } 104 }
104 105
105 bool SendRtcp(const uint8_t* packet, size_t length) override { 106 bool SendRtcp(const uint8_t* packet, size_t length) override {
107 rtc::CritScope lock(&crit_);
106 need_rtcp_ = false; 108 need_rtcp_ = false;
107 return true; 109 return true;
108 } 110 }
109 bool need_rtp_; 111 bool need_rtp_;
110 bool need_rtcp_; 112 bool need_rtcp_;
113 rtc::CriticalSection crit_;
111 }; 114 };
112 115
113 void DecodesRetransmittedFrame(bool enable_rtx, bool enable_red); 116 void DecodesRetransmittedFrame(bool enable_rtx, bool enable_red);
114 void ReceivesPliAndRecovers(int rtp_history_ms); 117 void ReceivesPliAndRecovers(int rtp_history_ms);
115 void RespectsRtcpMode(RtcpMode rtcp_mode); 118 void RespectsRtcpMode(RtcpMode rtcp_mode);
116 void TestXrReceiverReferenceTimeReport(bool enable_rrtr); 119 void TestXrReceiverReferenceTimeReport(bool enable_rrtr);
117 void TestSendsSetSsrcs(size_t num_ssrcs, bool send_single_ssrc_first); 120 void TestSendsSetSsrcs(size_t num_ssrcs, bool send_single_ssrc_first);
118 void TestRtpStatePreservation(bool use_rtx, bool provoke_rtcpsr_before_rtp); 121 void TestRtpStatePreservation(bool use_rtx, bool provoke_rtcpsr_before_rtp);
119 void VerifyHistogramStats(bool use_rtx, bool use_red, bool screenshare); 122 void VerifyHistogramStats(bool use_rtx, bool use_red, bool screenshare);
120 void VerifyNewVideoSendStreamsRespectNetworkState( 123 void VerifyNewVideoSendStreamsRespectNetworkState(
(...skipping 3610 matching lines...) Expand 10 before | Expand all | Expand 10 after
3731 private: 3734 private:
3732 bool video_observed_; 3735 bool video_observed_;
3733 bool audio_observed_; 3736 bool audio_observed_;
3734 SequenceNumberUnwrapper unwrapper_; 3737 SequenceNumberUnwrapper unwrapper_;
3735 std::set<int64_t> received_packet_ids_; 3738 std::set<int64_t> received_packet_ids_;
3736 } test; 3739 } test;
3737 3740
3738 RunBaseTest(&test); 3741 RunBaseTest(&test);
3739 } 3742 }
3740 } // namespace webrtc 3743 } // 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