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

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

Issue 1491743004: Refactor WVoE DTMF handling #2 (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@wvoe_dtmf
Patch Set: rebase Created 5 years 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/audio/audio_send_stream.h ('k') | webrtc/audio/audio_send_stream_unittest.cc » ('j') | 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) 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 } 95 }
96 96
97 bool AudioSendStream::DeliverRtcp(const uint8_t* packet, size_t length) { 97 bool AudioSendStream::DeliverRtcp(const uint8_t* packet, size_t length) {
98 // TODO(solenberg): Tests call this function on a network thread, libjingle 98 // TODO(solenberg): Tests call this function on a network thread, libjingle
99 // calls on the worker thread. We should move towards always using a network 99 // calls on the worker thread. We should move towards always using a network
100 // thread. Then this check can be enabled. 100 // thread. Then this check can be enabled.
101 // RTC_DCHECK(!thread_checker_.CalledOnValidThread()); 101 // RTC_DCHECK(!thread_checker_.CalledOnValidThread());
102 return false; 102 return false;
103 } 103 }
104 104
105 bool AudioSendStream::SendTelephoneEvent(int payload_type, uint8_t event,
106 uint32_t duration_ms) {
107 RTC_DCHECK(thread_checker_.CalledOnValidThread());
108 return channel_proxy_->SetSendTelephoneEventPayloadType(payload_type) &&
109 channel_proxy_->SendTelephoneEventOutband(event, duration_ms);
110 }
111
105 webrtc::AudioSendStream::Stats AudioSendStream::GetStats() const { 112 webrtc::AudioSendStream::Stats AudioSendStream::GetStats() const {
106 RTC_DCHECK(thread_checker_.CalledOnValidThread()); 113 RTC_DCHECK(thread_checker_.CalledOnValidThread());
107 webrtc::AudioSendStream::Stats stats; 114 webrtc::AudioSendStream::Stats stats;
108 stats.local_ssrc = config_.rtp.ssrc; 115 stats.local_ssrc = config_.rtp.ssrc;
109 ScopedVoEInterface<VoEAudioProcessing> processing(voice_engine()); 116 ScopedVoEInterface<VoEAudioProcessing> processing(voice_engine());
110 ScopedVoEInterface<VoECodec> codec(voice_engine()); 117 ScopedVoEInterface<VoECodec> codec(voice_engine());
111 ScopedVoEInterface<VoEVolumeControl> volume(voice_engine()); 118 ScopedVoEInterface<VoEVolumeControl> volume(voice_engine());
112 119
113 webrtc::CallStatistics call_stats = channel_proxy_->GetRTCPStatistics(); 120 webrtc::CallStatistics call_stats = channel_proxy_->GetRTCPStatistics();
114 stats.bytes_sent = call_stats.bytesSent; 121 stats.bytes_sent = call_stats.bytesSent;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 199
193 VoiceEngine* AudioSendStream::voice_engine() const { 200 VoiceEngine* AudioSendStream::voice_engine() const {
194 internal::AudioState* audio_state = 201 internal::AudioState* audio_state =
195 static_cast<internal::AudioState*>(audio_state_.get()); 202 static_cast<internal::AudioState*>(audio_state_.get());
196 VoiceEngine* voice_engine = audio_state->voice_engine(); 203 VoiceEngine* voice_engine = audio_state->voice_engine();
197 RTC_DCHECK(voice_engine); 204 RTC_DCHECK(voice_engine);
198 return voice_engine; 205 return voice_engine;
199 } 206 }
200 } // namespace internal 207 } // namespace internal
201 } // namespace webrtc 208 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/audio/audio_send_stream.h ('k') | webrtc/audio/audio_send_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698