Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 2356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2367 DCHECK(send == SEND_NOTHING); | 2367 DCHECK(send == SEND_NOTHING); |
| 2368 if (engine()->voe()->base()->StopSend(channel) == -1) { | 2368 if (engine()->voe()->base()->StopSend(channel) == -1) { |
| 2369 LOG_RTCERR1(StopSend, channel); | 2369 LOG_RTCERR1(StopSend, channel); |
| 2370 return false; | 2370 return false; |
| 2371 } | 2371 } |
| 2372 } | 2372 } |
| 2373 | 2373 |
| 2374 return true; | 2374 return true; |
| 2375 } | 2375 } |
| 2376 | 2376 |
| 2377 bool WebRtcVoiceMediaChannel::SetAudioSend(uint32 ssrc, bool mute, | |
| 2378 const AudioOptions* options, | |
| 2379 AudioRenderer* renderer) { | |
| 2380 if (!SetLocalRenderer(ssrc, renderer)) { | |
| 2381 return false; | |
| 2382 } | |
| 2383 if (!MuteStream(ssrc, mute)) { | |
| 2384 return false; | |
|
pthatcher1
2015/09/09 14:25:14
Should we rollback the renderer if MuteStream fail
the sun
2015/09/09 14:52:11
See discussion in WebRtcVideoEngine2.cc.
| |
| 2385 } | |
| 2386 if (!mute && options) { | |
| 2387 return SetOptions(*options); | |
|
pthatcher1
2015/09/09 14:25:14
Should we rollback the mute state and renderer if
the sun
2015/09/09 14:52:11
See discussion in WebRtcVideoEngine2.cc.
| |
| 2388 } else { | |
|
pthatcher1
2015/09/09 14:25:14
Same here as before: could remove the "else".
the sun
2015/09/09 14:52:11
Done.
| |
| 2389 return true; | |
| 2390 } | |
| 2391 } | |
| 2392 | |
| 2377 // TODO(ronghuawu): Change this method to return bool. | 2393 // TODO(ronghuawu): Change this method to return bool. |
| 2378 void WebRtcVoiceMediaChannel::ConfigureSendChannel(int channel) { | 2394 void WebRtcVoiceMediaChannel::ConfigureSendChannel(int channel) { |
| 2379 if (engine()->voe()->network()->RegisterExternalTransport( | 2395 if (engine()->voe()->network()->RegisterExternalTransport( |
| 2380 channel, *this) == -1) { | 2396 channel, *this) == -1) { |
| 2381 LOG_RTCERR2(RegisterExternalTransport, channel, this); | 2397 LOG_RTCERR2(RegisterExternalTransport, channel, this); |
| 2382 } | 2398 } |
| 2383 | 2399 |
| 2384 // Enable RTCP (for quality stats and feedback messages) | 2400 // Enable RTCP (for quality stats and feedback messages) |
| 2385 EnableRtcp(channel); | 2401 EnableRtcp(channel); |
| 2386 | 2402 |
| (...skipping 1235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3622 | 3638 |
| 3623 int WebRtcSoundclipStream::Rewind() { | 3639 int WebRtcSoundclipStream::Rewind() { |
| 3624 mem_.Rewind(); | 3640 mem_.Rewind(); |
| 3625 // Return -1 to keep VoiceEngine from looping. | 3641 // Return -1 to keep VoiceEngine from looping. |
| 3626 return (loop_) ? 0 : -1; | 3642 return (loop_) ? 0 : -1; |
| 3627 } | 3643 } |
| 3628 | 3644 |
| 3629 } // namespace cricket | 3645 } // namespace cricket |
| 3630 | 3646 |
| 3631 #endif // HAVE_WEBRTC_VOICE | 3647 #endif // HAVE_WEBRTC_VOICE |
| OLD | NEW |