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

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

Issue 2341293002: Add new decoding statistics for muted output (Closed)
Patch Set: Updates after reviews Created 4 years, 3 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_receive_stream.cc ('k') | webrtc/common_types.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 25 matching lines...) Expand all
36 using testing::ReturnRef; 36 using testing::ReturnRef;
37 37
38 AudioDecodingCallStats MakeAudioDecodeStatsForTest() { 38 AudioDecodingCallStats MakeAudioDecodeStatsForTest() {
39 AudioDecodingCallStats audio_decode_stats; 39 AudioDecodingCallStats audio_decode_stats;
40 audio_decode_stats.calls_to_silence_generator = 234; 40 audio_decode_stats.calls_to_silence_generator = 234;
41 audio_decode_stats.calls_to_neteq = 567; 41 audio_decode_stats.calls_to_neteq = 567;
42 audio_decode_stats.decoded_normal = 890; 42 audio_decode_stats.decoded_normal = 890;
43 audio_decode_stats.decoded_plc = 123; 43 audio_decode_stats.decoded_plc = 123;
44 audio_decode_stats.decoded_cng = 456; 44 audio_decode_stats.decoded_cng = 456;
45 audio_decode_stats.decoded_plc_cng = 789; 45 audio_decode_stats.decoded_plc_cng = 789;
46 audio_decode_stats.decoded_muted_output = 987;
46 return audio_decode_stats; 47 return audio_decode_stats;
47 } 48 }
48 49
49 const int kChannelId = 2; 50 const int kChannelId = 2;
50 const uint32_t kRemoteSsrc = 1234; 51 const uint32_t kRemoteSsrc = 1234;
51 const uint32_t kLocalSsrc = 5678; 52 const uint32_t kLocalSsrc = 5678;
52 const size_t kOneByteExtensionHeaderLength = 4; 53 const size_t kOneByteExtensionHeaderLength = 4;
53 const size_t kOneByteExtensionLength = 4; 54 const size_t kOneByteExtensionLength = 4;
54 const int kAbsSendTimeId = 2; 55 const int kAbsSendTimeId = 2;
55 const int kAudioLevelId = 3; 56 const int kAudioLevelId = 3;
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 stats.accelerate_rate); 350 stats.accelerate_rate);
350 EXPECT_EQ(Q14ToFloat(kNetworkStats.currentPreemptiveRate), 351 EXPECT_EQ(Q14ToFloat(kNetworkStats.currentPreemptiveRate),
351 stats.preemptive_expand_rate); 352 stats.preemptive_expand_rate);
352 EXPECT_EQ(kAudioDecodeStats.calls_to_silence_generator, 353 EXPECT_EQ(kAudioDecodeStats.calls_to_silence_generator,
353 stats.decoding_calls_to_silence_generator); 354 stats.decoding_calls_to_silence_generator);
354 EXPECT_EQ(kAudioDecodeStats.calls_to_neteq, stats.decoding_calls_to_neteq); 355 EXPECT_EQ(kAudioDecodeStats.calls_to_neteq, stats.decoding_calls_to_neteq);
355 EXPECT_EQ(kAudioDecodeStats.decoded_normal, stats.decoding_normal); 356 EXPECT_EQ(kAudioDecodeStats.decoded_normal, stats.decoding_normal);
356 EXPECT_EQ(kAudioDecodeStats.decoded_plc, stats.decoding_plc); 357 EXPECT_EQ(kAudioDecodeStats.decoded_plc, stats.decoding_plc);
357 EXPECT_EQ(kAudioDecodeStats.decoded_cng, stats.decoding_cng); 358 EXPECT_EQ(kAudioDecodeStats.decoded_cng, stats.decoding_cng);
358 EXPECT_EQ(kAudioDecodeStats.decoded_plc_cng, stats.decoding_plc_cng); 359 EXPECT_EQ(kAudioDecodeStats.decoded_plc_cng, stats.decoding_plc_cng);
360 EXPECT_EQ(kAudioDecodeStats.decoded_muted_output,
361 stats.decoding_muted_output);
359 EXPECT_EQ(kCallStats.capture_start_ntp_time_ms_, 362 EXPECT_EQ(kCallStats.capture_start_ntp_time_ms_,
360 stats.capture_start_ntp_time_ms); 363 stats.capture_start_ntp_time_ms);
361 } 364 }
362 365
363 TEST(AudioReceiveStreamTest, SetGain) { 366 TEST(AudioReceiveStreamTest, SetGain) {
364 ConfigHelper helper; 367 ConfigHelper helper;
365 internal::AudioReceiveStream recv_stream( 368 internal::AudioReceiveStream recv_stream(
366 helper.congestion_controller(), helper.config(), helper.audio_state(), 369 helper.congestion_controller(), helper.config(), helper.audio_state(),
367 helper.event_log()); 370 helper.event_log());
368 EXPECT_CALL(*helper.channel_proxy(), 371 EXPECT_CALL(*helper.channel_proxy(),
369 SetChannelOutputVolumeScaling(FloatEq(0.765f))); 372 SetChannelOutputVolumeScaling(FloatEq(0.765f)));
370 recv_stream.SetGain(0.765f); 373 recv_stream.SetGain(0.765f);
371 } 374 }
372 } // namespace test 375 } // namespace test
373 } // namespace webrtc 376 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/audio/audio_receive_stream.cc ('k') | webrtc/common_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698