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

Unified Diff: webrtc/modules/audio_conference_mixer/source/audio_conference_mixer_impl.cc

Issue 1986093002: Propagate muted info from VoE Channel to AudioConferenceMixer (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@mixer-mod-3
Patch Set: Addressing kwiberg's comments Created 4 years, 7 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_conference_mixer/source/audio_conference_mixer_impl.cc
diff --git a/webrtc/modules/audio_conference_mixer/source/audio_conference_mixer_impl.cc b/webrtc/modules/audio_conference_mixer/source/audio_conference_mixer_impl.cc
index 2c46a748299fd15f1b2733a35b29507a981ad793..7fd2a89654b998254c604836af0e97c569e862b6 100644
--- a/webrtc/modules/audio_conference_mixer/source/audio_conference_mixer_impl.cc
+++ b/webrtc/modules/audio_conference_mixer/source/audio_conference_mixer_impl.cc
@@ -555,13 +555,14 @@ void AudioConferenceMixerImpl::UpdateToMix(
}
audioFrame->sample_rate_hz_ = _outputFrequency;
- bool muted = false;
- if((*participant)->GetAudioFrame(_id, audioFrame) != 0) {
+ auto ret = (*participant)->GetAudioFrameWithMuted(_id, audioFrame);
+ if (ret == MixerParticipant::AudioFrameInfo::kError) {
WEBRTC_TRACE(kTraceWarning, kTraceAudioMixerServer, _id,
- "failed to GetAudioFrame() from participant");
+ "failed to GetAudioFrameWithMuted() from participant");
_audioFramePool->PushMemory(audioFrame);
continue;
}
+ const bool muted = (ret == MixerParticipant::AudioFrameInfo::kMuted);
if (_participantList.size() != 1) {
// TODO(wu): Issue 3390, add support for multiple participants case.
audioFrame->ntp_time_ms_ = -1;
@@ -713,10 +714,10 @@ void AudioConferenceMixerImpl::GetAdditionalAudio(
AudioFrameList* additionalFramesList) const {
WEBRTC_TRACE(kTraceStream, kTraceAudioMixerServer, _id,
"GetAdditionalAudio(additionalFramesList)");
- // The GetAudioFrame() callback may result in the participant being removed
- // from additionalParticipantList_. If that happens it will invalidate any
- // iterators. Create a copy of the participants list such that the list of
- // participants can be traversed safely.
+ // The GetAudioFrameWithMuted() callback may result in the participant being
+ // removed from additionalParticipantList_. If that happens it will
+ // invalidate any iterators. Create a copy of the participants list such
+ // that the list of participants can be traversed safely.
MixerParticipantList additionalParticipantList;
additionalParticipantList.insert(additionalParticipantList.begin(),
_additionalParticipantList.begin(),
@@ -734,10 +735,10 @@ void AudioConferenceMixerImpl::GetAdditionalAudio(
return;
}
audioFrame->sample_rate_hz_ = _outputFrequency;
- bool muted = false;
- if((*participant)->GetAudioFrame(_id, audioFrame) != 0) {
+ auto ret = (*participant)->GetAudioFrameWithMuted(_id, audioFrame);
+ if (ret == MixerParticipant::AudioFrameInfo::kError) {
WEBRTC_TRACE(kTraceWarning, kTraceAudioMixerServer, _id,
- "failed to GetAudioFrame() from participant");
+ "failed to GetAudioFrameWithMuted() from participant");
_audioFramePool->PushMemory(audioFrame);
continue;
}
@@ -746,7 +747,8 @@ void AudioConferenceMixerImpl::GetAdditionalAudio(
_audioFramePool->PushMemory(audioFrame);
continue;
}
- additionalFramesList->push_back(FrameAndMuteInfo(audioFrame, muted));
+ additionalFramesList->push_back(FrameAndMuteInfo(
+ audioFrame, ret == MixerParticipant::AudioFrameInfo::kMuted));
}
}

Powered by Google App Engine
This is Rietveld 408576698