aboutsummaryrefslogtreecommitdiff
path: root/webrtc/modules/audio_coding/neteq/neteq_unittest.cc
diff options
context:
space:
mode:
authorhenrik.lundin <henrik.lundin@webrtc.org>2015-08-27 13:12:22 -0700
committerCommit bot <commit-bot@chromium.org>2015-08-27 20:12:27 +0000
commit9c3efd00523a81d0f2b582799fbe67afe44139b2 (patch)
treecb32ac53530772d885fbc9fa9c7e9a80944620cd /webrtc/modules/audio_coding/neteq/neteq_unittest.cc
parenta567bf329239480529835ccb34a6d9cc8cbbf715 (diff)
downloadwebrtc-9c3efd00523a81d0f2b582799fbe67afe44139b2.tar.gz
Reland: Implement NetEq's CurrentDelay function
This was not implemented before. It returns the current total delay (packet buffer and sync buffer) of NetEq. This is the same information that was already available in NetEqNetworkStatistics::current_buffer_size_ms, that can be obtained through NetEq::NetworkStatistics(). But, since the current delay is a key metric of NetEq, it is convenient to have it available in a simpler way. This is a re-landing of r9359, https://webrtc-codereview.appspot.com/51149004, which was reverted in r9360. The refactoring made in r9669 facilitated the relanding. TBR=minyue@webrtc.org Review URL: https://codereview.webrtc.org/1313873003 Cr-Commit-Position: refs/heads/master@{#9801}
Diffstat (limited to 'webrtc/modules/audio_coding/neteq/neteq_unittest.cc')
-rw-r--r--webrtc/modules/audio_coding/neteq/neteq_unittest.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/webrtc/modules/audio_coding/neteq/neteq_unittest.cc b/webrtc/modules/audio_coding/neteq/neteq_unittest.cc
index 0c43024799..8a560dc200 100644
--- a/webrtc/modules/audio_coding/neteq/neteq_unittest.cc
+++ b/webrtc/modules/audio_coding/neteq/neteq_unittest.cc
@@ -406,6 +406,8 @@ void NetEqDecodingTest::DecodeAndCompare(const std::string& rtp_file,
ASSERT_EQ(0, neteq_->NetworkStatistics(&network_stats));
ASSERT_NO_FATAL_FAILURE(
network_stat_files.ProcessReference(network_stats));
+ // Compare with CurrentDelay, which should be identical.
+ EXPECT_EQ(network_stats.current_buffer_size_ms, neteq_->CurrentDelayMs());
// Process RTCPstat.
RtcpStatistics rtcp_stats;