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

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

Issue 1311533009: - Rename VoiceChannel::MuteStream() -> SetAudioSend() (incl. media channel) (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@lj_remove_typingmonitor_files
Patch Set: typo in comment 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 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 2356 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 // TODO(solenberg): The state change should be fully rolled back if any one of
2381 // these calls fail.
2382 if (!SetLocalRenderer(ssrc, renderer)) {
2383 return false;
2384 }
2385 if (!MuteStream(ssrc, mute)) {
2386 return false;
2387 }
2388 if (!mute && options) {
2389 return SetOptions(*options);
2390 }
2391 return true;
2392 }
2393
2377 // TODO(ronghuawu): Change this method to return bool. 2394 // TODO(ronghuawu): Change this method to return bool.
2378 void WebRtcVoiceMediaChannel::ConfigureSendChannel(int channel) { 2395 void WebRtcVoiceMediaChannel::ConfigureSendChannel(int channel) {
2379 if (engine()->voe()->network()->RegisterExternalTransport( 2396 if (engine()->voe()->network()->RegisterExternalTransport(
2380 channel, *this) == -1) { 2397 channel, *this) == -1) {
2381 LOG_RTCERR2(RegisterExternalTransport, channel, this); 2398 LOG_RTCERR2(RegisterExternalTransport, channel, this);
2382 } 2399 }
2383 2400
2384 // Enable RTCP (for quality stats and feedback messages) 2401 // Enable RTCP (for quality stats and feedback messages)
2385 EnableRtcp(channel); 2402 EnableRtcp(channel);
2386 2403
(...skipping 1235 matching lines...) Expand 10 before | Expand all | Expand 10 after
3622 3639
3623 int WebRtcSoundclipStream::Rewind() { 3640 int WebRtcSoundclipStream::Rewind() {
3624 mem_.Rewind(); 3641 mem_.Rewind();
3625 // Return -1 to keep VoiceEngine from looping. 3642 // Return -1 to keep VoiceEngine from looping.
3626 return (loop_) ? 0 : -1; 3643 return (loop_) ? 0 : -1;
3627 } 3644 }
3628 3645
3629 } // namespace cricket 3646 } // namespace cricket
3630 3647
3631 #endif // HAVE_WEBRTC_VOICE 3648 #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