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

Side by Side Diff: webrtc/voice_engine/voe_base_impl.cc

Issue 2453243003: Remove voe::Channel::StopReceive() and associated logic. (Closed)
Patch Set: Created 4 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 voe::ChannelOwner ch = shared_->channel_manager().GetChannel(channel); 432 voe::ChannelOwner ch = shared_->channel_manager().GetChannel(channel);
433 voe::Channel* channelPtr = ch.channel(); 433 voe::Channel* channelPtr = ch.channel();
434 if (channelPtr == nullptr) { 434 if (channelPtr == nullptr) {
435 shared_->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError, 435 shared_->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError,
436 "StartReceive() failed to locate channel"); 436 "StartReceive() failed to locate channel");
437 return -1; 437 return -1;
438 } 438 }
439 return channelPtr->StartReceiving(); 439 return channelPtr->StartReceiving();
440 } 440 }
441 441
442 int VoEBaseImpl::StopReceive(int channel) {
443 rtc::CritScope cs(shared_->crit_sec());
444 if (!shared_->statistics().Initialized()) {
445 shared_->SetLastError(VE_NOT_INITED, kTraceError);
446 return -1;
447 }
448 voe::ChannelOwner ch = shared_->channel_manager().GetChannel(channel);
449 voe::Channel* channelPtr = ch.channel();
450 if (channelPtr == nullptr) {
451 shared_->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError,
452 "SetLocalReceiver() failed to locate channel");
453 return -1;
454 }
455 return channelPtr->StopReceiving();
456 }
457
458 int VoEBaseImpl::StartPlayout(int channel) { 442 int VoEBaseImpl::StartPlayout(int channel) {
459 rtc::CritScope cs(shared_->crit_sec()); 443 rtc::CritScope cs(shared_->crit_sec());
460 if (!shared_->statistics().Initialized()) { 444 if (!shared_->statistics().Initialized()) {
461 shared_->SetLastError(VE_NOT_INITED, kTraceError); 445 shared_->SetLastError(VE_NOT_INITED, kTraceError);
462 return -1; 446 return -1;
463 } 447 }
464 voe::ChannelOwner ch = shared_->channel_manager().GetChannel(channel); 448 voe::ChannelOwner ch = shared_->channel_manager().GetChannel(channel);
465 voe::Channel* channelPtr = ch.channel(); 449 voe::Channel* channelPtr = ch.channel();
466 if (channelPtr == nullptr) { 450 if (channelPtr == nullptr) {
467 shared_->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError, 451 shared_->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError,
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 shared_->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError, 766 shared_->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError,
783 "AssociateSendChannel() failed to locate accociate_send_channel"); 767 "AssociateSendChannel() failed to locate accociate_send_channel");
784 return -1; 768 return -1;
785 } 769 }
786 770
787 channel_ptr->set_associate_send_channel(ch); 771 channel_ptr->set_associate_send_channel(ch);
788 return 0; 772 return 0;
789 } 773 }
790 774
791 } // namespace webrtc 775 } // namespace webrtc
OLDNEW
« webrtc/voice_engine/include/voe_base.h ('K') | « webrtc/voice_engine/voe_base_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698