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

Side by Side Diff: webrtc/audio/audio_send_stream.cc

Issue 1827263002: Early initialize recording on the ADM from WebRtcVoiceMediaChannel. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: set upstream to 1830213002 Created 4 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 } 90 }
91 91
92 AudioSendStream::~AudioSendStream() { 92 AudioSendStream::~AudioSendStream() {
93 RTC_DCHECK(thread_checker_.CalledOnValidThread()); 93 RTC_DCHECK(thread_checker_.CalledOnValidThread());
94 LOG(LS_INFO) << "~AudioSendStream: " << config_.ToString(); 94 LOG(LS_INFO) << "~AudioSendStream: " << config_.ToString();
95 channel_proxy_->ResetCongestionControlObjects(); 95 channel_proxy_->ResetCongestionControlObjects();
96 } 96 }
97 97
98 void AudioSendStream::Start() { 98 void AudioSendStream::Start() {
99 RTC_DCHECK(thread_checker_.CalledOnValidThread()); 99 RTC_DCHECK(thread_checker_.CalledOnValidThread());
100 ScopedVoEInterface<VoEBase> base(voice_engine()); 100 channel_proxy_->StartSend();
101 int error = base->StartSend(config_.voe_channel_id);
102 if (error != 0) {
103 LOG(LS_ERROR) << "AudioSendStream::Start failed with error: " << error;
104 }
105 } 101 }
106 102
107 void AudioSendStream::Stop() { 103 void AudioSendStream::Stop() {
108 RTC_DCHECK(thread_checker_.CalledOnValidThread()); 104 RTC_DCHECK(thread_checker_.CalledOnValidThread());
109 ScopedVoEInterface<VoEBase> base(voice_engine()); 105 ScopedVoEInterface<VoEBase> base(voice_engine());
110 int error = base->StopSend(config_.voe_channel_id); 106 int error = base->StopSend(config_.voe_channel_id);
111 if (error != 0) { 107 if (error != 0) {
112 LOG(LS_ERROR) << "AudioSendStream::Stop failed with error: " << error; 108 LOG(LS_ERROR) << "AudioSendStream::Stop failed with error: " << error;
113 } 109 }
114 } 110 }
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 218
223 VoiceEngine* AudioSendStream::voice_engine() const { 219 VoiceEngine* AudioSendStream::voice_engine() const {
224 internal::AudioState* audio_state = 220 internal::AudioState* audio_state =
225 static_cast<internal::AudioState*>(audio_state_.get()); 221 static_cast<internal::AudioState*>(audio_state_.get());
226 VoiceEngine* voice_engine = audio_state->voice_engine(); 222 VoiceEngine* voice_engine = audio_state->voice_engine();
227 RTC_DCHECK(voice_engine); 223 RTC_DCHECK(voice_engine);
228 return voice_engine; 224 return voice_engine;
229 } 225 }
230 } // namespace internal 226 } // namespace internal
231 } // namespace webrtc 227 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/media/engine/webrtcvoiceengine.h » ('j') | webrtc/media/engine/webrtcvoiceengine.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698