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

Side by Side Diff: webrtc/modules/audio_coding/neteq/neteq_unittest.cc

Issue 1313873003: Reland: Implement NetEq's CurrentDelay function (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixing win64 build Created 5 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/modules/audio_coding/neteq/neteq_network_stats_unittest.cc ('k') | no next file » | 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) 2011 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2011 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 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 ASSERT_NO_FATAL_FAILURE(Process(&out_len)); 399 ASSERT_NO_FATAL_FAILURE(Process(&out_len));
400 ASSERT_NO_FATAL_FAILURE(ref_files.ProcessReference(out_data_, out_len)); 400 ASSERT_NO_FATAL_FAILURE(ref_files.ProcessReference(out_data_, out_len));
401 401
402 // Query the network statistics API once per second 402 // Query the network statistics API once per second
403 if (sim_clock_ % 1000 == 0) { 403 if (sim_clock_ % 1000 == 0) {
404 // Process NetworkStatistics. 404 // Process NetworkStatistics.
405 NetEqNetworkStatistics network_stats; 405 NetEqNetworkStatistics network_stats;
406 ASSERT_EQ(0, neteq_->NetworkStatistics(&network_stats)); 406 ASSERT_EQ(0, neteq_->NetworkStatistics(&network_stats));
407 ASSERT_NO_FATAL_FAILURE( 407 ASSERT_NO_FATAL_FAILURE(
408 network_stat_files.ProcessReference(network_stats)); 408 network_stat_files.ProcessReference(network_stats));
409 // Compare with CurrentDelay, which should be identical.
410 EXPECT_EQ(network_stats.current_buffer_size_ms, neteq_->CurrentDelayMs());
409 411
410 // Process RTCPstat. 412 // Process RTCPstat.
411 RtcpStatistics rtcp_stats; 413 RtcpStatistics rtcp_stats;
412 neteq_->GetRtcpStatistics(&rtcp_stats); 414 neteq_->GetRtcpStatistics(&rtcp_stats);
413 ASSERT_NO_FATAL_FAILURE(rtcp_stat_files.ProcessReference(rtcp_stats)); 415 ASSERT_NO_FATAL_FAILURE(rtcp_stat_files.ProcessReference(rtcp_stats));
414 } 416 }
415 } 417 }
416 } 418 }
417 419
418 void NetEqDecodingTest::PopulateRtpInfo(int frame_index, 420 void NetEqDecodingTest::PopulateRtpInfo(int frame_index,
(...skipping 1091 matching lines...) Expand 10 before | Expand all | Expand 10 after
1510 // Pull audio once. 1512 // Pull audio once.
1511 ASSERT_EQ(0, neteq_->GetAudio(kMaxBlockSize, out_data_, &out_len, 1513 ASSERT_EQ(0, neteq_->GetAudio(kMaxBlockSize, out_data_, &out_len,
1512 &num_channels, &type)); 1514 &num_channels, &type));
1513 ASSERT_EQ(kBlockSize16kHz, out_len); 1515 ASSERT_EQ(kBlockSize16kHz, out_len);
1514 } 1516 }
1515 // Verify speech output. 1517 // Verify speech output.
1516 EXPECT_EQ(kOutputNormal, type); 1518 EXPECT_EQ(kOutputNormal, type);
1517 } 1519 }
1518 1520
1519 } // namespace webrtc 1521 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/neteq/neteq_network_stats_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698