| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 } // namespace | 168 } // namespace |
| 169 | 169 |
| 170 TEST(AudioSendStreamTest, ConfigToString) { | 170 TEST(AudioSendStreamTest, ConfigToString) { |
| 171 AudioSendStream::Config config(nullptr); | 171 AudioSendStream::Config config(nullptr); |
| 172 config.rtp.ssrc = kSsrc; | 172 config.rtp.ssrc = kSsrc; |
| 173 config.rtp.extensions.push_back( | 173 config.rtp.extensions.push_back( |
| 174 RtpExtension(RtpExtension::kAbsSendTimeUri, kAbsSendTimeId)); | 174 RtpExtension(RtpExtension::kAbsSendTimeUri, kAbsSendTimeId)); |
| 175 config.rtp.c_name = kCName; | 175 config.rtp.c_name = kCName; |
| 176 config.voe_channel_id = kChannelId; | 176 config.voe_channel_id = kChannelId; |
| 177 config.cng_payload_type = 42; | 177 config.cng_payload_type = 42; |
| 178 config.red_payload_type = 17; | |
| 179 EXPECT_EQ( | 178 EXPECT_EQ( |
| 180 "{rtp: {ssrc: 1234, extensions: [{uri: " | 179 "{rtp: {ssrc: 1234, extensions: [{uri: " |
| 181 "http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time, id: 3}], " | 180 "http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time, id: 3}], " |
| 182 "c_name: foo_name}, voe_channel_id: 1, cng_payload_type: 42, " | 181 "c_name: foo_name}, voe_channel_id: 1, cng_payload_type: 42}", |
| 183 "red_payload_type: 17}", | |
| 184 config.ToString()); | 182 config.ToString()); |
| 185 } | 183 } |
| 186 | 184 |
| 187 TEST(AudioSendStreamTest, ConstructDestruct) { | 185 TEST(AudioSendStreamTest, ConstructDestruct) { |
| 188 ConfigHelper helper; | 186 ConfigHelper helper; |
| 189 internal::AudioSendStream send_stream(helper.config(), helper.audio_state(), | 187 internal::AudioSendStream send_stream(helper.config(), helper.audio_state(), |
| 190 helper.congestion_controller()); | 188 helper.congestion_controller()); |
| 191 } | 189 } |
| 192 | 190 |
| 193 TEST(AudioSendStreamTest, SendTelephoneEvent) { | 191 TEST(AudioSendStreamTest, SendTelephoneEvent) { |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 static_cast<internal::AudioState*>(helper.audio_state().get()); | 236 static_cast<internal::AudioState*>(helper.audio_state().get()); |
| 239 VoiceEngineObserver* voe_observer = | 237 VoiceEngineObserver* voe_observer = |
| 240 static_cast<VoiceEngineObserver*>(internal_audio_state); | 238 static_cast<VoiceEngineObserver*>(internal_audio_state); |
| 241 voe_observer->CallbackOnError(-1, VE_TYPING_NOISE_WARNING); | 239 voe_observer->CallbackOnError(-1, VE_TYPING_NOISE_WARNING); |
| 242 EXPECT_TRUE(send_stream.GetStats().typing_noise_detected); | 240 EXPECT_TRUE(send_stream.GetStats().typing_noise_detected); |
| 243 voe_observer->CallbackOnError(-1, VE_TYPING_NOISE_OFF_WARNING); | 241 voe_observer->CallbackOnError(-1, VE_TYPING_NOISE_OFF_WARNING); |
| 244 EXPECT_FALSE(send_stream.GetStats().typing_noise_detected); | 242 EXPECT_FALSE(send_stream.GetStats().typing_noise_detected); |
| 245 } | 243 } |
| 246 } // namespace test | 244 } // namespace test |
| 247 } // namespace webrtc | 245 } // namespace webrtc |
| OLD | NEW |