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

Unified Diff: chromecast/media/cma/backend/alsa/stream_mixer_alsa_input_impl.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
Index: chromecast/media/cma/backend/alsa/stream_mixer_alsa_input_impl.cc
diff --git a/chromecast/media/cma/backend/alsa/stream_mixer_alsa_input_impl.cc b/chromecast/media/cma/backend/alsa/stream_mixer_alsa_input_impl.cc
index 1e7cc895cc43fcefb9ff7106d9cf1178d2614106..96a3cde3ee0a7a64c0e02560eecc5bc8722522b9 100644
--- a/chromecast/media/cma/backend/alsa/stream_mixer_alsa_input_impl.cc
+++ b/chromecast/media/cma/backend/alsa/stream_mixer_alsa_input_impl.cc
@@ -235,6 +235,14 @@ void StreamMixerAlsaInputImpl::DidQueueData(bool end_of_stream) {
mixer_->OnFramesQueued();
}
+void StreamMixerAlsaInputImpl::OnSkipped() {
+ DCHECK(mixer_task_runner_->BelongsToCurrentThread());
+ if (state_ == kStateNormalPlayback) {
+ // Fade in once this input starts providing data again.
+ fade_frames_remaining_ = NormalFadeFrames();
+ }
+}
+
void StreamMixerAlsaInputImpl::AfterWriteFrames(
const MediaPipelineBackendAlsa::RenderingDelay& mixer_rendering_delay) {
DCHECK(mixer_task_runner_->BelongsToCurrentThread());

Powered by Google App Engine
This is Rietveld 408576698