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 2703373006: Injectable audio encoders: voice_engine/channel changes. (Closed)
Patch Set: Removed 'virtual' from Channel::SetEncoder. Created 3 years, 8 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
« no previous file with comments | « webrtc/voice_engine/channel_proxy.h ('k') | no next file » | 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 12 matching lines...) Expand all
23 ChannelProxy::ChannelProxy() : channel_owner_(nullptr) {} 23 ChannelProxy::ChannelProxy() : channel_owner_(nullptr) {}
24 24
25 ChannelProxy::ChannelProxy(const ChannelOwner& channel_owner) : 25 ChannelProxy::ChannelProxy(const ChannelOwner& channel_owner) :
26 channel_owner_(channel_owner) { 26 channel_owner_(channel_owner) {
27 RTC_CHECK(channel_owner_.channel()); 27 RTC_CHECK(channel_owner_.channel());
28 module_process_thread_checker_.DetachFromThread(); 28 module_process_thread_checker_.DetachFromThread();
29 } 29 }
30 30
31 ChannelProxy::~ChannelProxy() {} 31 ChannelProxy::~ChannelProxy() {}
32 32
33 bool ChannelProxy::SetEncoder(int payload_type,
34 std::unique_ptr<AudioEncoder> encoder) {
35 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
36 return channel()->SetEncoder(payload_type, std::move(encoder));
37 }
38
33 void ChannelProxy::SetRTCPStatus(bool enable) { 39 void ChannelProxy::SetRTCPStatus(bool enable) {
34 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); 40 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
35 channel()->SetRTCPStatus(enable); 41 channel()->SetRTCPStatus(enable);
36 } 42 }
37 43
38 void ChannelProxy::SetLocalSSRC(uint32_t ssrc) { 44 void ChannelProxy::SetLocalSSRC(uint32_t ssrc) {
39 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); 45 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
40 int error = channel()->SetLocalSSRC(ssrc); 46 int error = channel()->SetLocalSSRC(ssrc);
41 RTC_DCHECK_EQ(0, error); 47 RTC_DCHECK_EQ(0, error);
42 } 48 }
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 channel()->RegisterLegacyReceiveCodecs(); 402 channel()->RegisterLegacyReceiveCodecs();
397 } 403 }
398 404
399 Channel* ChannelProxy::channel() const { 405 Channel* ChannelProxy::channel() const {
400 RTC_DCHECK(channel_owner_.channel()); 406 RTC_DCHECK(channel_owner_.channel());
401 return channel_owner_.channel(); 407 return channel_owner_.channel();
402 } 408 }
403 409
404 } // namespace voe 410 } // namespace voe
405 } // namespace webrtc 411 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/voice_engine/channel_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698