| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |