Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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()); | |
| 101 int error = base->StartSend(config_.voe_channel_id); | |
| 102 RTC_DCHECK_EQ(0, error); | |
|
the sun
2016/03/07 21:24:53
I don't think a DCHECK is appropriate here. There
Taylor Brandstetter
2016/03/08 00:00:31
Done.
| |
| 100 } | 103 } |
| 101 | 104 |
| 102 void AudioSendStream::Stop() { | 105 void AudioSendStream::Stop() { |
| 103 RTC_DCHECK(thread_checker_.CalledOnValidThread()); | 106 RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
| 107 ScopedVoEInterface<VoEBase> base(voice_engine()); | |
| 108 int error = base->StopSend(config_.voe_channel_id); | |
| 109 RTC_DCHECK_EQ(0, error); | |
| 104 } | 110 } |
| 105 | 111 |
| 106 void AudioSendStream::SignalNetworkState(NetworkState state) { | 112 void AudioSendStream::SignalNetworkState(NetworkState state) { |
| 107 RTC_DCHECK(thread_checker_.CalledOnValidThread()); | 113 RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
| 108 } | 114 } |
| 109 | 115 |
| 110 bool AudioSendStream::DeliverRtcp(const uint8_t* packet, size_t length) { | 116 bool AudioSendStream::DeliverRtcp(const uint8_t* packet, size_t length) { |
| 111 // TODO(solenberg): Tests call this function on a network thread, libjingle | 117 // TODO(solenberg): Tests call this function on a network thread, libjingle |
| 112 // calls on the worker thread. We should move towards always using a network | 118 // calls on the worker thread. We should move towards always using a network |
| 113 // thread. Then this check can be enabled. | 119 // thread. Then this check can be enabled. |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 212 | 218 |
| 213 VoiceEngine* AudioSendStream::voice_engine() const { | 219 VoiceEngine* AudioSendStream::voice_engine() const { |
| 214 internal::AudioState* audio_state = | 220 internal::AudioState* audio_state = |
| 215 static_cast<internal::AudioState*>(audio_state_.get()); | 221 static_cast<internal::AudioState*>(audio_state_.get()); |
| 216 VoiceEngine* voice_engine = audio_state->voice_engine(); | 222 VoiceEngine* voice_engine = audio_state->voice_engine(); |
| 217 RTC_DCHECK(voice_engine); | 223 RTC_DCHECK(voice_engine); |
| 218 return voice_engine; | 224 return voice_engine; |
| 219 } | 225 } |
| 220 } // namespace internal | 226 } // namespace internal |
| 221 } // namespace webrtc | 227 } // namespace webrtc |
| OLD | NEW |