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

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

Issue 2705093002: Injectable audio encoders: WebRtcVoiceEngine and company (Closed)
Patch Set: Created 3 years, 10 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 10 matching lines...) Expand all
21 ChannelProxy::ChannelProxy() : channel_owner_(nullptr) {} 21 ChannelProxy::ChannelProxy() : channel_owner_(nullptr) {}
22 22
23 ChannelProxy::ChannelProxy(const ChannelOwner& channel_owner) : 23 ChannelProxy::ChannelProxy(const ChannelOwner& channel_owner) :
24 channel_owner_(channel_owner) { 24 channel_owner_(channel_owner) {
25 RTC_CHECK(channel_owner_.channel()); 25 RTC_CHECK(channel_owner_.channel());
26 module_process_thread_checker_.DetachFromThread(); 26 module_process_thread_checker_.DetachFromThread();
27 } 27 }
28 28
29 ChannelProxy::~ChannelProxy() {} 29 ChannelProxy::~ChannelProxy() {}
30 30
31 bool ChannelProxy::SetSendFormat(int payload_type,
32 const SdpAudioFormat& format,
33 AudioEncoderFactory* factory) {
34 return channel()->SetSendFormat(payload_type, format, factory);
35 }
36
31 void ChannelProxy::SetRTCPStatus(bool enable) { 37 void ChannelProxy::SetRTCPStatus(bool enable) {
32 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); 38 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
33 channel()->SetRTCPStatus(enable); 39 channel()->SetRTCPStatus(enable);
34 } 40 }
35 41
36 void ChannelProxy::SetLocalSSRC(uint32_t ssrc) { 42 void ChannelProxy::SetLocalSSRC(uint32_t ssrc) {
37 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); 43 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
38 int error = channel()->SetLocalSSRC(ssrc); 44 int error = channel()->SetLocalSSRC(ssrc);
39 RTC_DCHECK_EQ(0, error); 45 RTC_DCHECK_EQ(0, error);
40 } 46 }
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 // May be called on either worker thread or network thread. 205 // May be called on either worker thread or network thread.
200 return channel()->ReceivedRTCPPacket(packet, length) == 0; 206 return channel()->ReceivedRTCPPacket(packet, length) == 0;
201 } 207 }
202 208
203 const rtc::scoped_refptr<AudioDecoderFactory>& 209 const rtc::scoped_refptr<AudioDecoderFactory>&
204 ChannelProxy::GetAudioDecoderFactory() const { 210 ChannelProxy::GetAudioDecoderFactory() const {
205 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); 211 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
206 return channel()->GetAudioDecoderFactory(); 212 return channel()->GetAudioDecoderFactory();
207 } 213 }
208 214
215 AudioCodingModule& ChannelProxy::GetAudioCodingModule() {
216 return channel()->GetAudioCodingModule();
217 }
218
209 void ChannelProxy::SetChannelOutputVolumeScaling(float scaling) { 219 void ChannelProxy::SetChannelOutputVolumeScaling(float scaling) {
210 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); 220 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
211 int error = channel()->SetChannelOutputVolumeScaling(scaling); 221 int error = channel()->SetChannelOutputVolumeScaling(scaling);
212 RTC_DCHECK_EQ(0, error); 222 RTC_DCHECK_EQ(0, error);
213 } 223 }
214 224
215 void ChannelProxy::SetRtcEventLog(RtcEventLog* event_log) { 225 void ChannelProxy::SetRtcEventLog(RtcEventLog* event_log) {
216 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); 226 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
217 channel()->SetRtcEventLog(event_log); 227 channel()->SetRtcEventLog(event_log);
218 } 228 }
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 return channel()->SetSendCNPayloadType(type, frequency) == 0; 372 return channel()->SetSendCNPayloadType(type, frequency) == 0;
363 } 373 }
364 374
365 Channel* ChannelProxy::channel() const { 375 Channel* ChannelProxy::channel() const {
366 RTC_DCHECK(channel_owner_.channel()); 376 RTC_DCHECK(channel_owner_.channel());
367 return channel_owner_.channel(); 377 return channel_owner_.channel();
368 } 378 }
369 379
370 } // namespace voe 380 } // namespace voe
371 } // namespace webrtc 381 } // namespace webrtc
OLDNEW
« webrtc/voice_engine/channel.cc ('K') | « webrtc/voice_engine/channel_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698