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

Side by Side Diff: webrtc/voice_engine/test/auto_test/standard/rtp_rtcp_test.cc

Issue 2681153003: Remove unused voe_stress_test.cc (Closed)
Patch Set: Removed more things after rebase 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/voice_engine/BUILD.gn ('k') | webrtc/voice_engine/test/auto_test/voe_standard_test.h » ('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) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 10
11 #include <memory> 11 #include <memory>
12 12
13 #include "webrtc/base/criticalsection.h" 13 #include "webrtc/base/criticalsection.h"
14 #include "webrtc/system_wrappers/include/atomic32.h" 14 #include "webrtc/system_wrappers/include/atomic32.h"
15 #include "webrtc/system_wrappers/include/event_wrapper.h" 15 #include "webrtc/system_wrappers/include/event_wrapper.h"
16 #include "webrtc/test/testsupport/fileutils.h" 16 #include "webrtc/test/testsupport/fileutils.h"
17 #include "webrtc/voice_engine/test/auto_test/fixtures/after_streaming_fixture.h" 17 #include "webrtc/voice_engine/test/auto_test/fixtures/after_streaming_fixture.h"
18 #include "webrtc/voice_engine/test/auto_test/voe_standard_test.h" 18 #include "webrtc/voice_engine/test/auto_test/voe_standard_test.h"
19 19
20 class TestRtpObserver : public webrtc::VoERTPObserver { 20 class TestRtpObserver : public webrtc::VoERTPObserver {
21 public: 21 public:
22 TestRtpObserver() : changed_ssrc_event_(voetest::EventWrapper::Create()) {} 22 TestRtpObserver() : changed_ssrc_event_(webrtc::EventWrapper::Create()) {}
23 virtual ~TestRtpObserver() {} 23 virtual ~TestRtpObserver() {}
24 virtual void OnIncomingCSRCChanged(int channel, 24 virtual void OnIncomingCSRCChanged(int channel,
25 unsigned int CSRC, 25 unsigned int CSRC,
26 bool added) {} 26 bool added) {}
27 virtual void OnIncomingSSRCChanged(int channel, 27 virtual void OnIncomingSSRCChanged(int channel,
28 unsigned int SSRC); 28 unsigned int SSRC);
29 void WaitForChangedSsrc() { 29 void WaitForChangedSsrc() {
30 // 10 seconds should be enough. 30 // 10 seconds should be enough.
31 EXPECT_EQ(voetest::kEventSignaled, changed_ssrc_event_->Wait(10*1000)); 31 EXPECT_EQ(webrtc::kEventSignaled, changed_ssrc_event_->Wait(10*1000));
32 } 32 }
33 void SetIncomingSsrc(unsigned int ssrc) { 33 void SetIncomingSsrc(unsigned int ssrc) {
34 rtc::CritScope lock(&crit_); 34 rtc::CritScope lock(&crit_);
35 incoming_ssrc_ = ssrc; 35 incoming_ssrc_ = ssrc;
36 } 36 }
37 public: 37 public:
38 rtc::CriticalSection crit_; 38 rtc::CriticalSection crit_;
39 unsigned int incoming_ssrc_; 39 unsigned int incoming_ssrc_;
40 std::unique_ptr<voetest::EventWrapper> changed_ssrc_event_; 40 std::unique_ptr<webrtc::EventWrapper> changed_ssrc_event_;
41 }; 41 };
42 42
43 void TestRtpObserver::OnIncomingSSRCChanged(int channel, 43 void TestRtpObserver::OnIncomingSSRCChanged(int channel,
44 unsigned int SSRC) { 44 unsigned int SSRC) {
45 char msg[128]; 45 char msg[128];
46 sprintf(msg, "\n=> OnIncomingSSRCChanged(channel=%d, SSRC=%u)\n", channel, 46 sprintf(msg, "\n=> OnIncomingSSRCChanged(channel=%d, SSRC=%u)\n", channel,
47 SSRC); 47 SSRC);
48 TEST_LOG("%s", msg); 48 TEST_LOG("%s", msg);
49 49
50 { 50 {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 Sleep(1000); 109 Sleep(1000);
110 110
111 unsigned int ssrc; 111 unsigned int ssrc;
112 EXPECT_EQ(0, voe_rtp_rtcp_->GetLocalSSRC(channel_, ssrc)); 112 EXPECT_EQ(0, voe_rtp_rtcp_->GetLocalSSRC(channel_, ssrc));
113 EXPECT_EQ(local_ssrc, ssrc); 113 EXPECT_EQ(local_ssrc, ssrc);
114 114
115 EXPECT_EQ(0, voe_rtp_rtcp_->GetRemoteSSRC(channel_, ssrc)); 115 EXPECT_EQ(0, voe_rtp_rtcp_->GetRemoteSSRC(channel_, ssrc));
116 EXPECT_EQ(local_ssrc, ssrc); 116 EXPECT_EQ(local_ssrc, ssrc);
117 } 117 }
OLDNEW
« no previous file with comments | « webrtc/voice_engine/BUILD.gn ('k') | webrtc/voice_engine/test/auto_test/voe_standard_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698