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

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

Issue 2722673004: Revert of [Chromecast] Process streams with different post-processing. (Closed)
Patch Set: Created 3 years, 10 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 db8c3d5ef0adb3ba35c9055fcdfbae4b046852c8..656130bed534469bea6c3c3510c2195860853d9d 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
@@ -65,14 +65,11 @@
StreamMixerAlsaInput::Delegate* delegate,
int input_samples_per_second,
bool primary,
- const std::string& device_id,
StreamMixerAlsa* mixer)
: delegate_(delegate),
input_samples_per_second_(input_samples_per_second),
primary_(primary),
- device_id_(device_id),
mixer_(mixer),
- filter_group_(nullptr),
mixer_task_runner_(mixer_->task_runner()),
caller_task_runner_(base::ThreadTaskRunnerHandle::Get()),
resample_ratio_(1.0),
@@ -88,14 +85,14 @@
zeroed_frames_(0),
is_underflowing_(false),
weak_factory_(this) {
- LOG(INFO) << "Create " << device_id_ << " (" << this << ")";
+ LOG(INFO) << "Create " << this;
DCHECK(delegate_);
DCHECK(mixer_);
weak_this_ = weak_factory_.GetWeakPtr();
}
StreamMixerAlsaInputImpl::~StreamMixerAlsaInputImpl() {
- LOG(INFO) << "Destroy " << device_id_ << " (" << this << ")";
+ LOG(INFO) << "Destroy " << this;
DCHECK(mixer_task_runner_->BelongsToCurrentThread());
}
@@ -105,10 +102,6 @@
bool StreamMixerAlsaInputImpl::primary() const {
return primary_;
-}
-
-std::string StreamMixerAlsaInputImpl::device_id() const {
- return device_id_;
}
bool StreamMixerAlsaInputImpl::IsDeleting() const {
@@ -132,14 +125,6 @@
mixer_rendering_delay_ = mixer_rendering_delay;
fade_out_frames_total_ = NormalFadeFrames();
fade_frames_remaining_ = NormalFadeFrames();
-}
-
-void StreamMixerAlsaInputImpl::set_filter_group(FilterGroup* filter_group) {
- filter_group_ = filter_group;
-}
-
-FilterGroup* StreamMixerAlsaInputImpl::filter_group() {
- return filter_group_;
}
void StreamMixerAlsaInputImpl::PreventDelegateCalls() {
@@ -441,6 +426,7 @@
void StreamMixerAlsaInputImpl::FadeIn(::media::AudioBus* dest, int frames) {
DCHECK(mixer_task_runner_->BelongsToCurrentThread());
+ LOG(INFO) << "Fading in, " << fade_frames_remaining_ << " frames remaining";
float fade_in_frames = mixer_->output_samples_per_second() * kFadeMs /
base::Time::kMillisecondsPerSecond;
for (int f = 0; f < frames && fade_frames_remaining_; ++f) {
@@ -453,6 +439,7 @@
void StreamMixerAlsaInputImpl::FadeOut(::media::AudioBus* dest, int frames) {
DCHECK(mixer_task_runner_->BelongsToCurrentThread());
+ LOG(INFO) << "Fading out, " << fade_frames_remaining_ << " frames remaining";
int f = 0;
for (; f < frames && fade_frames_remaining_; ++f) {
float fade_multiplier =
@@ -528,7 +515,7 @@
void StreamMixerAlsaInputImpl::SetVolumeMultiplier(float multiplier) {
RUN_ON_MIXER_THREAD(SetVolumeMultiplier, multiplier);
- LOG(INFO) << device_id_ << "(" << this << "): stream volume = " << multiplier;
+ LOG(INFO) << this << ": stream volume = " << multiplier;
DCHECK(!IsDeleting());
if (multiplier > 1.0f)
multiplier = 1.0f;

Powered by Google App Engine
This is Rietveld 408576698