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

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

Issue 1642143003: [Chromecast] Log sample rate changes and tweak audio logging output. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: sample rate logging fix Created 4 years, 11 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.h ('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_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 19f3a523e83807e6e2a10e666472a4dfe05f0dc5..cca1c9c4d38261bfc5c046f2460d9274e9768e6d 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
@@ -76,6 +76,7 @@ StreamMixerAlsaInputImpl::StreamMixerAlsaInputImpl(
base::Time::kMicrosecondsPerSecond),
fade_frames_remaining_(0),
fade_out_frames_total_(0),
+ zeroed_frames_(0),
weak_factory_(this) {
DCHECK(delegate_);
DCHECK(mixer_);
@@ -363,9 +364,13 @@ void StreamMixerAlsaInputImpl::FillFrames(int frame_delay,
}
frames_left -= frames_to_copy;
frames_filled += frames_to_copy;
+ LOG_IF(WARNING, zeroed_frames_ > 0)
+ << "Filled a total of " << zeroed_frames_ << " frames with 0";
+ zeroed_frames_ = 0;
} else {
// No data left in queue; fill remaining frames with zeros.
- LOG(WARNING) << "Filling " << frames_left << " frames with 0";
+ LOG_IF(WARNING, zeroed_frames_ == 0) << "Starting to fill frames with 0";
+ zeroed_frames_ += frames_left;
output->ZeroFramesPartial(frames_filled, frames_left);
frames_filled += frames_left;
frames_left = 0;
@@ -450,7 +455,7 @@ void StreamMixerAlsaInputImpl::SetPaused(bool paused) {
} else {
return;
}
- LOG(INFO) << "Pausing";
+ LOG(INFO) << "Pausing " << this;
} else {
if (state_ == kStateFadingOut) {
fade_frames_remaining_ = NormalFadeFrames() - fade_frames_remaining_;
@@ -459,7 +464,7 @@ void StreamMixerAlsaInputImpl::SetPaused(bool paused) {
} else {
return;
}
- LOG(INFO) << "Unpausing";
+ LOG(INFO) << "Unpausing " << this;
state_ = kStateNormalPlayback;
}
DCHECK_GE(fade_frames_remaining_, 0);
« no previous file with comments | « chromecast/media/cma/backend/alsa/stream_mixer_alsa_input_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698