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

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

Issue 2453243003: Remove voe::Channel::StopReceive() and associated logic. (Closed)
Patch Set: comment 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
« no previous file with comments | « webrtc/voice_engine/voe_base_impl.h ('k') | no next file » | 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 * 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 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 shared_->SetLastError(VE_NOT_INITED, kTraceError); 429 shared_->SetLastError(VE_NOT_INITED, kTraceError);
430 return -1; 430 return -1;
431 } 431 }
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 channelPtr->ResetDiscardedPacketCount();
440 } 440 return 0;
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 } 441 }
457 442
458 int VoEBaseImpl::StartPlayout(int channel) { 443 int VoEBaseImpl::StartPlayout(int channel) {
459 rtc::CritScope cs(shared_->crit_sec()); 444 rtc::CritScope cs(shared_->crit_sec());
460 if (!shared_->statistics().Initialized()) { 445 if (!shared_->statistics().Initialized()) {
461 shared_->SetLastError(VE_NOT_INITED, kTraceError); 446 shared_->SetLastError(VE_NOT_INITED, kTraceError);
462 return -1; 447 return -1;
463 } 448 }
464 voe::ChannelOwner ch = shared_->channel_manager().GetChannel(channel); 449 voe::ChannelOwner ch = shared_->channel_manager().GetChannel(channel);
465 voe::Channel* channelPtr = ch.channel(); 450 voe::Channel* channelPtr = ch.channel();
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 shared_->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError, 767 shared_->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError,
783 "AssociateSendChannel() failed to locate accociate_send_channel"); 768 "AssociateSendChannel() failed to locate accociate_send_channel");
784 return -1; 769 return -1;
785 } 770 }
786 771
787 channel_ptr->set_associate_send_channel(ch); 772 channel_ptr->set_associate_send_channel(ch);
788 return 0; 773 return 0;
789 } 774 }
790 775
791 } // namespace webrtc 776 } // namespace webrtc
OLDNEW
« no previous file with comments | « 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