OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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> |
| 12 |
11 #include "webrtc/modules/include/module_common_types.h" | 13 #include "webrtc/modules/include/module_common_types.h" |
12 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" | 14 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" |
13 #include "webrtc/system_wrappers/include/atomic32.h" | 15 #include "webrtc/system_wrappers/include/atomic32.h" |
14 #include "webrtc/system_wrappers/include/sleep.h" | 16 #include "webrtc/system_wrappers/include/sleep.h" |
15 #include "webrtc/voice_engine/test/auto_test/fixtures/before_streaming_fixture.h
" | 17 #include "webrtc/voice_engine/test/auto_test/fixtures/before_streaming_fixture.h
" |
16 | 18 |
17 using ::testing::_; | 19 using ::testing::_; |
18 using ::testing::AtLeast; | 20 using ::testing::AtLeast; |
19 using ::testing::Eq; | 21 using ::testing::Eq; |
20 using ::testing::Field; | 22 using ::testing::Field; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 // Check whether any were 'bad' (didn't contain an extension when they | 78 // Check whether any were 'bad' (didn't contain an extension when they |
77 // where supposed to). | 79 // where supposed to). |
78 return bad_packets_.Value() == 0; | 80 return bad_packets_.Value() == 0; |
79 } | 81 } |
80 | 82 |
81 private: | 83 private: |
82 enum { | 84 enum { |
83 kPacketsExpected = 10, | 85 kPacketsExpected = 10, |
84 kSleepIntervalMs = 10 | 86 kSleepIntervalMs = 10 |
85 }; | 87 }; |
86 rtc::scoped_ptr<webrtc::RtpHeaderParser> parser_; | 88 std::unique_ptr<webrtc::RtpHeaderParser> parser_; |
87 webrtc::Atomic32 received_packets_; | 89 webrtc::Atomic32 received_packets_; |
88 webrtc::Atomic32 bad_packets_; | 90 webrtc::Atomic32 bad_packets_; |
89 int audio_level_id_; | 91 int audio_level_id_; |
90 int absolute_sender_time_id_; | 92 int absolute_sender_time_id_; |
91 }; | 93 }; |
92 | 94 |
93 class SendRtpRtcpHeaderExtensionsTest : public BeforeStreamingFixture { | 95 class SendRtpRtcpHeaderExtensionsTest : public BeforeStreamingFixture { |
94 protected: | 96 protected: |
95 void SetUp() override { | 97 void SetUp() override { |
96 EXPECT_EQ(0, voe_network_->DeRegisterExternalTransport(channel_)); | 98 EXPECT_EQ(0, voe_network_->DeRegisterExternalTransport(channel_)); |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 EXPECT_EQ(0, voe_rtp_rtcp_->SetSendAbsoluteSenderTimeStatus(channel_, true, | 148 EXPECT_EQ(0, voe_rtp_rtcp_->SetSendAbsoluteSenderTimeStatus(channel_, true, |
147 3)); | 149 3)); |
148 EXPECT_EQ(0, voe_rtp_rtcp_->SetSendAudioLevelIndicationStatus(channel_, true, | 150 EXPECT_EQ(0, voe_rtp_rtcp_->SetSendAudioLevelIndicationStatus(channel_, true, |
149 9)); | 151 9)); |
150 verifying_transport_.SetAbsoluteSenderTimeId(3); | 152 verifying_transport_.SetAbsoluteSenderTimeId(3); |
151 // Don't register audio level with header parser - unknown extensions should | 153 // Don't register audio level with header parser - unknown extensions should |
152 // be ignored when parsing. | 154 // be ignored when parsing. |
153 ResumePlaying(); | 155 ResumePlaying(); |
154 EXPECT_TRUE(verifying_transport_.Wait()); | 156 EXPECT_TRUE(verifying_transport_.Wait()); |
155 } | 157 } |
OLD | NEW |