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

Unified Diff: webrtc/modules/audio_coding/neteq/neteq_impl_unittest.cc

Issue 2839163002: NetEq: Add functionality to assist with delay analysis and tooling (Closed)
Patch Set: After first round of reviews Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_coding/neteq/neteq_impl_unittest.cc
diff --git a/webrtc/modules/audio_coding/neteq/neteq_impl_unittest.cc b/webrtc/modules/audio_coding/neteq/neteq_impl_unittest.cc
index 4e110a612d0f0c66b51f02e09698ba7a18fd1695..fb87111fd07b39e9546b69bc86269100cf50c704 100644
--- a/webrtc/modules/audio_coding/neteq/neteq_impl_unittest.cc
+++ b/webrtc/modules/audio_coding/neteq/neteq_impl_unittest.cc
@@ -1271,6 +1271,19 @@ TEST_F(NetEqImplTest, TickTimerIncrement) {
EXPECT_EQ(1u, tick_timer_->ticks());
}
+TEST_F(NetEqImplTest, TargetDelayMs) {
+ UseNoMocks();
+ use_mock_delay_manager_ = true;
+ CreateInstance();
+ // Let the dummy target delay be 17 packets.
+ constexpr int kTargetLevelPacketsQ8 = 17 << 8;
+ EXPECT_CALL(*mock_delay_manager_, TargetLevel())
+ .WillOnce(Return(kTargetLevelPacketsQ8));
+ // Default packet size before any packet has been decoded is 30 ms, so we are
+ // expecting 17 * 30 = 510 ms target delay.
+ EXPECT_EQ(17 * 30, neteq_->TargetDelayMs());
+}
+
class Decoder120ms : public AudioDecoder {
public:
Decoder120ms(int sample_rate_hz, SpeechType speech_type)
« no previous file with comments | « webrtc/modules/audio_coding/neteq/neteq_impl.cc ('k') | webrtc/modules/audio_coding/neteq/neteq_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698