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

Side by Side Diff: talk/media/webrtc/webrtcvoiceengine.cc

Issue 1378513003: Change 'mute' parameter of MediaChannel::SetAudioSend()/SetVideoSend() to 'enable'. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 5 years, 2 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 unified diff | Download patch
« no previous file with comments | « talk/media/webrtc/webrtcvoiceengine.h ('k') | talk/session/media/channel.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2004 Google Inc. 3 * Copyright 2004 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 2067 matching lines...) Expand 10 before | Expand all | Expand 10 after
2078 RTC_DCHECK(send == SEND_NOTHING); 2078 RTC_DCHECK(send == SEND_NOTHING);
2079 if (engine()->voe()->base()->StopSend(channel) == -1) { 2079 if (engine()->voe()->base()->StopSend(channel) == -1) {
2080 LOG_RTCERR1(StopSend, channel); 2080 LOG_RTCERR1(StopSend, channel);
2081 return false; 2081 return false;
2082 } 2082 }
2083 } 2083 }
2084 2084
2085 return true; 2085 return true;
2086 } 2086 }
2087 2087
2088 bool WebRtcVoiceMediaChannel::SetAudioSend(uint32 ssrc, bool mute, 2088 bool WebRtcVoiceMediaChannel::SetAudioSend(uint32 ssrc, bool enable,
2089 const AudioOptions* options, 2089 const AudioOptions* options,
2090 AudioRenderer* renderer) { 2090 AudioRenderer* renderer) {
2091 // TODO(solenberg): The state change should be fully rolled back if any one of 2091 // TODO(solenberg): The state change should be fully rolled back if any one of
2092 // these calls fail. 2092 // these calls fail.
2093 if (!SetLocalRenderer(ssrc, renderer)) { 2093 if (!SetLocalRenderer(ssrc, renderer)) {
2094 return false; 2094 return false;
2095 } 2095 }
2096 if (!MuteStream(ssrc, mute)) { 2096 if (!MuteStream(ssrc, !enable)) {
2097 return false; 2097 return false;
2098 } 2098 }
2099 if (!mute && options) { 2099 if (enable && options) {
2100 return SetOptions(*options); 2100 return SetOptions(*options);
2101 } 2101 }
2102 return true; 2102 return true;
2103 } 2103 }
2104 2104
2105 // TODO(ronghuawu): Change this method to return bool. 2105 // TODO(ronghuawu): Change this method to return bool.
2106 void WebRtcVoiceMediaChannel::ConfigureSendChannel(int channel) { 2106 void WebRtcVoiceMediaChannel::ConfigureSendChannel(int channel) {
2107 if (engine()->voe()->network()->RegisterExternalTransport( 2107 if (engine()->voe()->network()->RegisterExternalTransport(
2108 channel, *this) == -1) { 2108 channel, *this) == -1) {
2109 LOG_RTCERR2(RegisterExternalTransport, channel, this); 2109 LOG_RTCERR2(RegisterExternalTransport, channel, this);
(...skipping 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after
3260 LOG(LS_WARNING) << "Unknown codec " << ToString(codec); 3260 LOG(LS_WARNING) << "Unknown codec " << ToString(codec);
3261 return false; 3261 return false;
3262 } 3262 }
3263 } 3263 }
3264 return true; 3264 return true;
3265 } 3265 }
3266 3266
3267 } // namespace cricket 3267 } // namespace cricket
3268 3268
3269 #endif // HAVE_WEBRTC_VOICE 3269 #endif // HAVE_WEBRTC_VOICE
OLDNEW
« no previous file with comments | « talk/media/webrtc/webrtcvoiceengine.h ('k') | talk/session/media/channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698