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.

R=kwiberg@webrtc.org, minyue@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/51149004

Cr-Commit-Position: refs/heads/master@{#9359}
This commit is contained in:
Henrik Lundin
2015-06-03 11:55:45 +02:00
parent 60508f8621
commit d8a03facf6
5 changed files with 22 additions and 5 deletions

View File

@ -404,6 +404,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;