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

Unified Diff: chromecast/media/cma/backend/alsa/stream_mixer_alsa_unittest.cc

Issue 2344993003: [Chromecast] Fade in after a mixer input stream has skipped (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromecast/media/cma/backend/alsa/stream_mixer_alsa_input_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/media/cma/backend/alsa/stream_mixer_alsa_unittest.cc
diff --git a/chromecast/media/cma/backend/alsa/stream_mixer_alsa_unittest.cc b/chromecast/media/cma/backend/alsa/stream_mixer_alsa_unittest.cc
index 14a12641ca7230eab8e955af2d1765d2674e4095..1562c6f08eeddc1881dfb9fde3caab44c59ba55a 100644
--- a/chromecast/media/cma/backend/alsa/stream_mixer_alsa_unittest.cc
+++ b/chromecast/media/cma/backend/alsa/stream_mixer_alsa_unittest.cc
@@ -151,6 +151,7 @@ class MockInputQueue : public StreamMixerAlsa::InputQueue {
mixer_rendering_delay));
int MaxReadSize() override { return max_read_size_; }
MOCK_METHOD2(GetResampledData, void(::media::AudioBus* dest, int frames));
+ MOCK_METHOD0(OnSkipped, void());
MOCK_METHOD1(AfterWriteFrames,
void(const MediaPipelineBackendAlsa::RenderingDelay&
mixer_rendering_delay));
@@ -376,6 +377,7 @@ TEST_F(StreamMixerAlsaTest, WriteFrames) {
// to ALSA.
inputs[1]->SetPrimary(false);
inputs[1]->SetMaxReadSize(0);
+ EXPECT_CALL(*inputs[1], OnSkipped());
inputs[2]->SetPrimary(false);
for (auto* input : inputs) {
if (input != inputs[1])
@@ -654,6 +656,7 @@ TEST_F(StreamMixerAlsaTest, StuckStreamWithUnderrun) {
EXPECT_CALL(*inputs[0], GetResampledData(_, kNumFrames));
EXPECT_CALL(*inputs[0], AfterWriteFrames(_));
EXPECT_CALL(*inputs[1], GetResampledData(_, _)).Times(0);
+ EXPECT_CALL(*inputs[1], OnSkipped());
EXPECT_CALL(*inputs[1], AfterWriteFrames(_));
EXPECT_CALL(*mock_alsa(), PcmWritei(_, _, kNumFrames)).Times(1);
@@ -688,6 +691,7 @@ TEST_F(StreamMixerAlsaTest, StuckStreamWithLowBuffer) {
EXPECT_CALL(*inputs[0], GetResampledData(_, kNumFrames));
EXPECT_CALL(*inputs[0], AfterWriteFrames(_));
EXPECT_CALL(*inputs[1], GetResampledData(_, _)).Times(0);
+ EXPECT_CALL(*inputs[1], OnSkipped());
EXPECT_CALL(*inputs[1], AfterWriteFrames(_));
EXPECT_CALL(*mock_alsa(), PcmWritei(_, _, kNumFrames)).Times(1);
« no previous file with comments | « chromecast/media/cma/backend/alsa/stream_mixer_alsa_input_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698