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

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

Issue 1827263002: Early initialize recording on the ADM from WebRtcVoiceMediaChannel. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: breaking test Created 4 years, 8 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 | « webrtc/voice_engine/channel_proxy.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 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 if (shared_->audio_device()->StopPlayout() != 0) { 613 if (shared_->audio_device()->StopPlayout() != 0) {
614 shared_->SetLastError(VE_CANNOT_STOP_PLAYOUT, kTraceError, 614 shared_->SetLastError(VE_CANNOT_STOP_PLAYOUT, kTraceError,
615 "StopPlayout() failed to stop playout"); 615 "StopPlayout() failed to stop playout");
616 return -1; 616 return -1;
617 } 617 }
618 } 618 }
619 return 0; 619 return 0;
620 } 620 }
621 621
622 int32_t VoEBaseImpl::StartSend() { 622 int32_t VoEBaseImpl::StartSend() {
623 if (!shared_->audio_device()->Recording()) { 623 if (!shared_->audio_device()->RecordingIsInitialized() &&
624 !shared_->audio_device()->Recording()) {
624 if (shared_->audio_device()->InitRecording() != 0) { 625 if (shared_->audio_device()->InitRecording() != 0) {
625 LOG_F(LS_ERROR) << "Failed to initialize recording"; 626 LOG_F(LS_ERROR) << "Failed to initialize recording";
626 return -1; 627 return -1;
627 } 628 }
629 }
630 if (!shared_->audio_device()->Recording()) {
628 if (shared_->audio_device()->StartRecording() != 0) { 631 if (shared_->audio_device()->StartRecording() != 0) {
629 LOG_F(LS_ERROR) << "Failed to start recording"; 632 LOG_F(LS_ERROR) << "Failed to start recording";
630 return -1; 633 return -1;
631 } 634 }
632 } 635 }
633 return 0; 636 return 0;
634 } 637 }
635 638
636 int32_t VoEBaseImpl::StopSend() { 639 int32_t VoEBaseImpl::StopSend() {
637 if (shared_->NumOfSendingChannels() == 0 && 640 if (shared_->NumOfSendingChannels() == 0 &&
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 shared_->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError, 816 shared_->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError,
814 "AssociateSendChannel() failed to locate accociate_send_channel"); 817 "AssociateSendChannel() failed to locate accociate_send_channel");
815 return -1; 818 return -1;
816 } 819 }
817 820
818 channel_ptr->set_associate_send_channel(ch); 821 channel_ptr->set_associate_send_channel(ch);
819 return 0; 822 return 0;
820 } 823 }
821 824
822 } // namespace webrtc 825 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/voice_engine/channel_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698