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 | 13 |
15 #include "testing/gmock/include/gmock/gmock.h" | 14 #include "testing/gmock/include/gmock/gmock.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
17 #include "webrtc/common_types.h" | 16 #include "webrtc/common_types.h" |
18 #include "webrtc/modules/rtp_rtcp/include/receive_statistics.h" | 17 #include "webrtc/modules/rtp_rtcp/include/receive_statistics.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 #include "webrtc/modules/rtp_rtcp/test/testAPI/test_api.h" | 21 #include "webrtc/modules/rtp_rtcp/test/testAPI/test_api.h" |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 virtual void TearDown() { | 168 virtual void TearDown() { |
170 delete module1; | 169 delete module1; |
171 delete module2; | 170 delete module2; |
172 delete myRTCPFeedback1; | 171 delete myRTCPFeedback1; |
173 delete myRTCPFeedback2; | 172 delete myRTCPFeedback2; |
174 delete transport1; | 173 delete transport1; |
175 delete transport2; | 174 delete transport2; |
176 delete receiver; | 175 delete receiver; |
177 } | 176 } |
178 | 177 |
179 std::unique_ptr<TestRtpFeedback> rtp_feedback1_; | 178 rtc::scoped_ptr<TestRtpFeedback> rtp_feedback1_; |
180 std::unique_ptr<TestRtpFeedback> rtp_feedback2_; | 179 rtc::scoped_ptr<TestRtpFeedback> rtp_feedback2_; |
181 std::unique_ptr<ReceiveStatistics> receive_statistics1_; | 180 rtc::scoped_ptr<ReceiveStatistics> receive_statistics1_; |
182 std::unique_ptr<ReceiveStatistics> receive_statistics2_; | 181 rtc::scoped_ptr<ReceiveStatistics> receive_statistics2_; |
183 std::unique_ptr<RTPPayloadRegistry> rtp_payload_registry1_; | 182 rtc::scoped_ptr<RTPPayloadRegistry> rtp_payload_registry1_; |
184 std::unique_ptr<RTPPayloadRegistry> rtp_payload_registry2_; | 183 rtc::scoped_ptr<RTPPayloadRegistry> rtp_payload_registry2_; |
185 std::unique_ptr<RtpReceiver> rtp_receiver1_; | 184 rtc::scoped_ptr<RtpReceiver> rtp_receiver1_; |
186 std::unique_ptr<RtpReceiver> rtp_receiver2_; | 185 rtc::scoped_ptr<RtpReceiver> rtp_receiver2_; |
187 RtpRtcp* module1; | 186 RtpRtcp* module1; |
188 RtpRtcp* module2; | 187 RtpRtcp* module2; |
189 TestRtpReceiver* receiver; | 188 TestRtpReceiver* receiver; |
190 LoopBackTransport* transport1; | 189 LoopBackTransport* transport1; |
191 LoopBackTransport* transport2; | 190 LoopBackTransport* transport2; |
192 RtcpCallback* myRTCPFeedback1; | 191 RtcpCallback* myRTCPFeedback1; |
193 RtcpCallback* myRTCPFeedback2; | 192 RtcpCallback* myRTCPFeedback2; |
194 | 193 |
195 uint32_t test_ssrc; | 194 uint32_t test_ssrc; |
196 uint32_t test_timestamp; | 195 uint32_t test_timestamp; |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 EXPECT_EQ(test_ssrc, report_blocks[0].sourceSSRC); | 262 EXPECT_EQ(test_ssrc, report_blocks[0].sourceSSRC); |
264 | 263 |
265 EXPECT_EQ(0u, report_blocks[0].cumulativeLost); | 264 EXPECT_EQ(0u, report_blocks[0].cumulativeLost); |
266 EXPECT_LT(0u, report_blocks[0].delaySinceLastSR); | 265 EXPECT_LT(0u, report_blocks[0].delaySinceLastSR); |
267 EXPECT_EQ(test_sequence_number, report_blocks[0].extendedHighSeqNum); | 266 EXPECT_EQ(test_sequence_number, report_blocks[0].extendedHighSeqNum); |
268 EXPECT_EQ(0u, report_blocks[0].fractionLost); | 267 EXPECT_EQ(0u, report_blocks[0].fractionLost); |
269 } | 268 } |
270 | 269 |
271 } // namespace | 270 } // namespace |
272 } // namespace webrtc | 271 } // namespace webrtc |
OLD | NEW |