OLD | NEW |
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 <algorithm> | 11 #include <algorithm> |
12 #include <memory> | |
13 #include <vector> | 12 #include <vector> |
14 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
15 | 14 |
16 #include "webrtc/modules/rtp_rtcp/test/testAPI/test_api.h" | 15 #include "webrtc/modules/rtp_rtcp/test/testAPI/test_api.h" |
17 | 16 |
18 #include "webrtc/common_types.h" | 17 #include "webrtc/common_types.h" |
19 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h" | 18 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h" |
20 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" | 19 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" |
21 #include "webrtc/modules/rtp_rtcp/source/rtp_receiver_audio.h" | 20 #include "webrtc/modules/rtp_rtcp/source/rtp_receiver_audio.h" |
22 | 21 |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 delete module2; | 128 delete module2; |
130 delete transport1; | 129 delete transport1; |
131 delete transport2; | 130 delete transport2; |
132 delete data_receiver1; | 131 delete data_receiver1; |
133 delete data_receiver2; | 132 delete data_receiver2; |
134 delete rtp_callback; | 133 delete rtp_callback; |
135 } | 134 } |
136 | 135 |
137 RtpRtcp* module1; | 136 RtpRtcp* module1; |
138 RtpRtcp* module2; | 137 RtpRtcp* module2; |
139 std::unique_ptr<ReceiveStatistics> receive_statistics1_; | 138 rtc::scoped_ptr<ReceiveStatistics> receive_statistics1_; |
140 std::unique_ptr<ReceiveStatistics> receive_statistics2_; | 139 rtc::scoped_ptr<ReceiveStatistics> receive_statistics2_; |
141 std::unique_ptr<RtpReceiver> rtp_receiver1_; | 140 rtc::scoped_ptr<RtpReceiver> rtp_receiver1_; |
142 std::unique_ptr<RtpReceiver> rtp_receiver2_; | 141 rtc::scoped_ptr<RtpReceiver> rtp_receiver2_; |
143 std::unique_ptr<RTPPayloadRegistry> rtp_payload_registry1_; | 142 rtc::scoped_ptr<RTPPayloadRegistry> rtp_payload_registry1_; |
144 std::unique_ptr<RTPPayloadRegistry> rtp_payload_registry2_; | 143 rtc::scoped_ptr<RTPPayloadRegistry> rtp_payload_registry2_; |
145 VerifyingAudioReceiver* data_receiver1; | 144 VerifyingAudioReceiver* data_receiver1; |
146 VerifyingAudioReceiver* data_receiver2; | 145 VerifyingAudioReceiver* data_receiver2; |
147 LoopBackTransport* transport1; | 146 LoopBackTransport* transport1; |
148 LoopBackTransport* transport2; | 147 LoopBackTransport* transport2; |
149 RTPCallback* rtp_callback; | 148 RTPCallback* rtp_callback; |
150 uint32_t test_ssrc; | 149 uint32_t test_ssrc; |
151 uint32_t test_timestamp; | 150 uint32_t test_timestamp; |
152 uint16_t test_sequence_number; | 151 uint16_t test_sequence_number; |
153 uint32_t test_CSRC[webrtc::kRtpCsrcSize]; | 152 uint32_t test_CSRC[webrtc::kRtpCsrcSize]; |
154 SimulatedClock fake_clock; | 153 SimulatedClock fake_clock; |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 for (; timeStamp <= 740 * 160; timeStamp += 160) { | 338 for (; timeStamp <= 740 * 160; timeStamp += 160) { |
340 EXPECT_EQ(0, module1->SendOutgoingData(webrtc::kAudioFrameSpeech, 96, | 339 EXPECT_EQ(0, module1->SendOutgoingData(webrtc::kAudioFrameSpeech, 96, |
341 timeStamp, -1, test, 4)); | 340 timeStamp, -1, test, 4)); |
342 fake_clock.AdvanceTimeMilliseconds(20); | 341 fake_clock.AdvanceTimeMilliseconds(20); |
343 module1->Process(); | 342 module1->Process(); |
344 } | 343 } |
345 } | 344 } |
346 | 345 |
347 } // namespace | 346 } // namespace |
348 } // namespace webrtc | 347 } // namespace webrtc |
OLD | NEW |