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

Side by Side Diff: webrtc/audio/audio_send_stream_unittest.cc

Issue 2051073002: Remove RED support from WebRtcVoiceEngine/MediaChannel (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 4 years, 6 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/audio/audio_send_stream.cc ('k') | webrtc/audio_send_stream.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) 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
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
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
OLDNEW
« no previous file with comments | « webrtc/audio/audio_send_stream.cc ('k') | webrtc/audio_send_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698