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

Unified Diff: talk/media/webrtc/webrtcvoiceengine.cc

Issue 1327933002: Full impl of NnChannel::SetSendParameters and NnChannel::SetRecvParameters (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Got rid of SetChannelOptions Created 5 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: talk/media/webrtc/webrtcvoiceengine.cc
diff --git a/talk/media/webrtc/webrtcvoiceengine.cc b/talk/media/webrtc/webrtcvoiceengine.cc
index f8c3ac31646d9de7f468476d46c4be03b5966ae9..a70086a2b76239aaddffd1a17e647fdee3222c76 100644
--- a/talk/media/webrtc/webrtcvoiceengine.cc
+++ b/talk/media/webrtc/webrtcvoiceengine.cc
@@ -586,9 +586,10 @@ VoiceMediaChannel* WebRtcVoiceEngine::CreateChannel(
delete ch;
return nullptr;
}
- if (!ch->SetOptions(options)) {
- LOG(LS_WARNING) << "Failed to set options while creating channel.";
- }
+ // TODO(solenberg): !!!!! SetParameters with only options?
+ // if (!ch->SetOptions(options)) {
+ // LOG(LS_WARNING) << "Failed to set options while creating channel.";
+ // }
pthatcher1 2015/09/04 23:21:16 Same here: they just need to be remembered for lat
the sun 2015/09/11 15:03:03 Done.
return ch;
}
@@ -3065,21 +3066,22 @@ void WebRtcVoiceMediaChannel::OnRtcpReceived(
}
}
-bool WebRtcVoiceMediaChannel::MuteStream(uint32 ssrc, bool muted) {
+bool WebRtcVoiceMediaChannel::MuteStream(uint32 ssrc, bool mute,
+ const AudioOptions* options) {
int channel = (ssrc == 0) ? voe_channel() : GetSendChannelNum(ssrc);
if (channel == -1) {
LOG(LS_WARNING) << "The specified ssrc " << ssrc << " is not in use.";
return false;
}
- if (engine()->voe()->volume()->SetInputMute(channel, muted) == -1) {
- LOG_RTCERR2(SetInputMute, channel, muted);
+ if (engine()->voe()->volume()->SetInputMute(channel, mute) == -1) {
+ LOG_RTCERR2(SetInputMute, channel, mute);
return false;
}
// We set the AGC to mute state only when all the channels are muted.
// This implementation is not ideal, instead we should signal the AGC when
// the mic channel is muted/unmuted. We can't do it today because there
// is no good way to know which stream is mapping to the mic channel.
- bool all_muted = muted;
+ bool all_muted = mute;
for (const auto& ch : send_channels_) {
if (!all_muted) {
break;
@@ -3094,7 +3096,12 @@ bool WebRtcVoiceMediaChannel::MuteStream(uint32 ssrc, bool muted) {
webrtc::AudioProcessing* ap = engine()->voe()->base()->audio_processing();
if (ap)
ap->set_output_will_be_muted(all_muted);
- return true;
+
+ if (!mute && options) {
+ return SetOptions(*options);
+ } else {
+ return true;
+ }
}
// TODO(minyue): SetMaxSendBandwidth() is subject to be renamed to

Powered by Google App Engine
This is Rietveld 408576698