blob: 027659d2f0ec09e7534c84c484b840e5f42ed95c [file] [log] [blame]
solenberg13725082015-11-25 08:16:52 -08001/*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11#include "webrtc/voice_engine/channel_proxy.h"
12
Tommif888bb52015-12-12 01:37:01 +010013#include <utility>
14
kjellandera69d9732016-08-31 07:33:05 -070015#include "webrtc/api/call/audio_sink.h"
nissecae45d02017-04-24 05:53:20 -070016#include "webrtc/call/rtp_transport_controller_send_interface.h"
Edward Lemurc20978e2017-07-06 19:44:34 +020017#include "webrtc/rtc_base/checks.h"
18#include "webrtc/rtc_base/logging.h"
19#include "webrtc/rtc_base/safe_minmax.h"
solenberg13725082015-11-25 08:16:52 -080020#include "webrtc/voice_engine/channel.h"
21
22namespace webrtc {
23namespace voe {
24ChannelProxy::ChannelProxy() : channel_owner_(nullptr) {}
25
26ChannelProxy::ChannelProxy(const ChannelOwner& channel_owner) :
27 channel_owner_(channel_owner) {
28 RTC_CHECK(channel_owner_.channel());
solenberg08b19df2017-02-15 00:42:31 -080029 module_process_thread_checker_.DetachFromThread();
solenberg13725082015-11-25 08:16:52 -080030}
31
Tommif888bb52015-12-12 01:37:01 +010032ChannelProxy::~ChannelProxy() {}
33
ossu1ffbd6c2017-04-06 12:05:04 -070034bool ChannelProxy::SetEncoder(int payload_type,
35 std::unique_ptr<AudioEncoder> encoder) {
36 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
37 return channel()->SetEncoder(payload_type, std::move(encoder));
38}
39
ossu20a4b3f2017-04-27 02:08:52 -070040void ChannelProxy::ModifyEncoder(
41 rtc::FunctionView<void(std::unique_ptr<AudioEncoder>*)> modifier) {
42 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
43 channel()->ModifyEncoder(modifier);
44}
45
solenberg13725082015-11-25 08:16:52 -080046void ChannelProxy::SetRTCPStatus(bool enable) {
solenberg08b19df2017-02-15 00:42:31 -080047 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
solenberg358057b2015-11-27 10:46:42 -080048 channel()->SetRTCPStatus(enable);
solenberg13725082015-11-25 08:16:52 -080049}
50
51void ChannelProxy::SetLocalSSRC(uint32_t ssrc) {
solenberg08b19df2017-02-15 00:42:31 -080052 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
solenberg358057b2015-11-27 10:46:42 -080053 int error = channel()->SetLocalSSRC(ssrc);
solenberg13725082015-11-25 08:16:52 -080054 RTC_DCHECK_EQ(0, error);
55}
56
57void ChannelProxy::SetRTCP_CNAME(const std::string& c_name) {
solenberg08b19df2017-02-15 00:42:31 -080058 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
solenberg13725082015-11-25 08:16:52 -080059 // Note: VoERTP_RTCP::SetRTCP_CNAME() accepts a char[256] array.
60 std::string c_name_limited = c_name.substr(0, 255);
solenberg358057b2015-11-27 10:46:42 -080061 int error = channel()->SetRTCP_CNAME(c_name_limited.c_str());
solenberg13725082015-11-25 08:16:52 -080062 RTC_DCHECK_EQ(0, error);
63}
solenberg358057b2015-11-27 10:46:42 -080064
solenberg971cab02016-06-14 10:02:41 -070065void ChannelProxy::SetNACKStatus(bool enable, int max_packets) {
solenberg08b19df2017-02-15 00:42:31 -080066 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
solenberg971cab02016-06-14 10:02:41 -070067 channel()->SetNACKStatus(enable, max_packets);
68}
69
solenberg358057b2015-11-27 10:46:42 -080070void ChannelProxy::SetSendAudioLevelIndicationStatus(bool enable, int id) {
solenberg08b19df2017-02-15 00:42:31 -080071 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
solenberg358057b2015-11-27 10:46:42 -080072 int error = channel()->SetSendAudioLevelIndicationStatus(enable, id);
73 RTC_DCHECK_EQ(0, error);
74}
75
solenberg358057b2015-11-27 10:46:42 -080076void ChannelProxy::SetReceiveAudioLevelIndicationStatus(bool enable, int id) {
solenberg08b19df2017-02-15 00:42:31 -080077 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
solenberg358057b2015-11-27 10:46:42 -080078 int error = channel()->SetReceiveAudioLevelIndicationStatus(enable, id);
79 RTC_DCHECK_EQ(0, error);
80}
81
stefan3313ec92016-01-21 06:32:43 -080082void ChannelProxy::EnableSendTransportSequenceNumber(int id) {
solenberg08b19df2017-02-15 00:42:31 -080083 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
stefan3313ec92016-01-21 06:32:43 -080084 channel()->EnableSendTransportSequenceNumber(id);
85}
86
87void ChannelProxy::EnableReceiveTransportSequenceNumber(int id) {
solenberg08b19df2017-02-15 00:42:31 -080088 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
stefan3313ec92016-01-21 06:32:43 -080089 channel()->EnableReceiveTransportSequenceNumber(id);
90}
91
stefanbba9dec2016-02-01 04:39:55 -080092void ChannelProxy::RegisterSenderCongestionControlObjects(
nisseb8f9a322017-03-27 05:36:15 -070093 RtpTransportControllerSendInterface* transport,
stefan7de8d642017-02-07 07:14:08 -080094 RtcpBandwidthObserver* bandwidth_observer) {
solenberg08b19df2017-02-15 00:42:31 -080095 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
nisseb8f9a322017-03-27 05:36:15 -070096 channel()->RegisterSenderCongestionControlObjects(transport,
97 bandwidth_observer);
Stefan Holmerb86d4e42015-12-07 10:26:18 +010098}
99
stefanbba9dec2016-02-01 04:39:55 -0800100void ChannelProxy::RegisterReceiverCongestionControlObjects(
101 PacketRouter* packet_router) {
solenberg08b19df2017-02-15 00:42:31 -0800102 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
stefanbba9dec2016-02-01 04:39:55 -0800103 channel()->RegisterReceiverCongestionControlObjects(packet_router);
104}
105
nissefdbfdc92017-03-31 05:44:52 -0700106void ChannelProxy::ResetSenderCongestionControlObjects() {
solenberg08b19df2017-02-15 00:42:31 -0800107 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
nissefdbfdc92017-03-31 05:44:52 -0700108 channel()->ResetSenderCongestionControlObjects();
109}
110
111void ChannelProxy::ResetReceiverCongestionControlObjects() {
112 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
113 channel()->ResetReceiverCongestionControlObjects();
stefanbba9dec2016-02-01 04:39:55 -0800114}
115
solenberg358057b2015-11-27 10:46:42 -0800116CallStatistics ChannelProxy::GetRTCPStatistics() const {
solenberg08b19df2017-02-15 00:42:31 -0800117 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
solenberg358057b2015-11-27 10:46:42 -0800118 CallStatistics stats = {0};
119 int error = channel()->GetRTPStatistics(stats);
120 RTC_DCHECK_EQ(0, error);
121 return stats;
122}
123
124std::vector<ReportBlock> ChannelProxy::GetRemoteRTCPReportBlocks() const {
solenberg08b19df2017-02-15 00:42:31 -0800125 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
solenberg358057b2015-11-27 10:46:42 -0800126 std::vector<webrtc::ReportBlock> blocks;
127 int error = channel()->GetRemoteRTCPReportBlocks(&blocks);
128 RTC_DCHECK_EQ(0, error);
129 return blocks;
130}
131
132NetworkStatistics ChannelProxy::GetNetworkStatistics() const {
solenberg08b19df2017-02-15 00:42:31 -0800133 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
solenberg358057b2015-11-27 10:46:42 -0800134 NetworkStatistics stats = {0};
135 int error = channel()->GetNetworkStatistics(stats);
136 RTC_DCHECK_EQ(0, error);
137 return stats;
138}
139
140AudioDecodingCallStats ChannelProxy::GetDecodingCallStatistics() const {
solenberg08b19df2017-02-15 00:42:31 -0800141 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
solenberg358057b2015-11-27 10:46:42 -0800142 AudioDecodingCallStats stats;
143 channel()->GetDecodingCallStatistics(&stats);
144 return stats;
145}
146
solenberg8d73f8c2017-03-08 01:52:20 -0800147int ChannelProxy::GetSpeechOutputLevel() const {
solenberg796b8f92017-03-01 17:02:23 -0800148 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
solenberg8d73f8c2017-03-08 01:52:20 -0800149 return channel()->GetSpeechOutputLevel();
solenberg796b8f92017-03-01 17:02:23 -0800150}
151
solenberg8d73f8c2017-03-08 01:52:20 -0800152int ChannelProxy::GetSpeechOutputLevelFullRange() const {
solenberg08b19df2017-02-15 00:42:31 -0800153 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
solenberg8d73f8c2017-03-08 01:52:20 -0800154 return channel()->GetSpeechOutputLevelFullRange();
solenberg358057b2015-11-27 10:46:42 -0800155}
156
zsteine76bd3a2017-07-14 12:17:49 -0700157double ChannelProxy::GetTotalOutputEnergy() const {
158 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
159 return channel()->GetTotalOutputEnergy();
160}
161
162double ChannelProxy::GetTotalOutputDuration() const {
163 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
164 return channel()->GetTotalOutputDuration();
165}
166
solenberg358057b2015-11-27 10:46:42 -0800167uint32_t ChannelProxy::GetDelayEstimate() const {
solenberg08b19df2017-02-15 00:42:31 -0800168 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread() ||
169 module_process_thread_checker_.CalledOnValidThread());
solenberg358057b2015-11-27 10:46:42 -0800170 return channel()->GetDelayEstimate();
171}
172
solenbergffbbcac2016-11-17 05:25:37 -0800173bool ChannelProxy::SetSendTelephoneEventPayloadType(int payload_type,
174 int payload_frequency) {
solenberg08b19df2017-02-15 00:42:31 -0800175 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
solenbergffbbcac2016-11-17 05:25:37 -0800176 return channel()->SetSendTelephoneEventPayloadType(payload_type,
177 payload_frequency) == 0;
Fredrik Solenbergb5727682015-12-04 15:22:19 +0100178}
179
solenberg8842c3e2016-03-11 03:06:41 -0800180bool ChannelProxy::SendTelephoneEventOutband(int event, int duration_ms) {
solenberg08b19df2017-02-15 00:42:31 -0800181 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
solenberg8842c3e2016-03-11 03:06:41 -0800182 return channel()->SendTelephoneEventOutband(event, duration_ms) == 0;
Fredrik Solenbergb5727682015-12-04 15:22:19 +0100183}
184
minyue78b4d562016-11-30 04:47:39 -0800185void ChannelProxy::SetBitrate(int bitrate_bps, int64_t probing_interval_ms) {
tommi0f8b4032017-02-22 11:22:05 -0800186 // This method can be called on the worker thread, module process thread
187 // or on a TaskQueue via VideoSendStreamImpl::OnEncoderConfigurationChanged.
188 // TODO(solenberg): Figure out a good way to check this or enforce calling
189 // rules.
190 // RTC_DCHECK(worker_thread_checker_.CalledOnValidThread() ||
191 // module_process_thread_checker_.CalledOnValidThread());
minyue78b4d562016-11-30 04:47:39 -0800192 channel()->SetBitRate(bitrate_bps, probing_interval_ms);
mflodman86cc6ff2016-07-26 04:44:06 -0700193}
194
kwibergd32bf752017-01-19 07:03:59 -0800195void ChannelProxy::SetRecPayloadType(int payload_type,
196 const SdpAudioFormat& format) {
solenberg08b19df2017-02-15 00:42:31 -0800197 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
kwibergd32bf752017-01-19 07:03:59 -0800198 const int result = channel()->SetRecPayloadType(payload_type, format);
199 RTC_DCHECK_EQ(0, result);
200}
201
kwiberg1c07c702017-03-27 07:15:49 -0700202void ChannelProxy::SetReceiveCodecs(
203 const std::map<int, SdpAudioFormat>& codecs) {
204 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
205 channel()->SetReceiveCodecs(codecs);
206}
207
kwibergb7f89d62016-02-17 10:04:18 -0800208void ChannelProxy::SetSink(std::unique_ptr<AudioSinkInterface> sink) {
solenberg08b19df2017-02-15 00:42:31 -0800209 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
deadbeef2d110be2016-01-13 12:00:26 -0800210 channel()->SetSink(std::move(sink));
Tommif888bb52015-12-12 01:37:01 +0100211}
212
solenberg94218532016-06-16 10:53:22 -0700213void ChannelProxy::SetInputMute(bool muted) {
solenberg08b19df2017-02-15 00:42:31 -0800214 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
solenberg8d73f8c2017-03-08 01:52:20 -0800215 channel()->SetInputMute(muted);
solenberg94218532016-06-16 10:53:22 -0700216}
217
mflodman3d7db262016-04-29 00:57:13 -0700218void ChannelProxy::RegisterExternalTransport(Transport* transport) {
solenberg08b19df2017-02-15 00:42:31 -0800219 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
mflodman3d7db262016-04-29 00:57:13 -0700220 int error = channel()->RegisterExternalTransport(transport);
221 RTC_DCHECK_EQ(0, error);
222}
223
224void ChannelProxy::DeRegisterExternalTransport() {
solenberg08b19df2017-02-15 00:42:31 -0800225 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
mflodman3d7db262016-04-29 00:57:13 -0700226 channel()->DeRegisterExternalTransport();
227}
228
nisse657bab22017-02-21 06:28:10 -0800229void ChannelProxy::OnRtpPacket(const RtpPacketReceived& packet) {
mflodman3d7db262016-04-29 00:57:13 -0700230 // May be called on either worker thread or network thread.
nisse657bab22017-02-21 06:28:10 -0800231 channel()->OnRtpPacket(packet);
mflodman3d7db262016-04-29 00:57:13 -0700232}
233
234bool ChannelProxy::ReceivedRTCPPacket(const uint8_t* packet, size_t length) {
235 // May be called on either worker thread or network thread.
236 return channel()->ReceivedRTCPPacket(packet, length) == 0;
237}
238
ossu29b1a8d2016-06-13 07:34:51 -0700239const rtc::scoped_refptr<AudioDecoderFactory>&
solenberg217fb662016-06-17 08:30:54 -0700240 ChannelProxy::GetAudioDecoderFactory() const {
solenberg08b19df2017-02-15 00:42:31 -0800241 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
ossu29b1a8d2016-06-13 07:34:51 -0700242 return channel()->GetAudioDecoderFactory();
243}
244
solenberg217fb662016-06-17 08:30:54 -0700245void ChannelProxy::SetChannelOutputVolumeScaling(float scaling) {
solenberg08b19df2017-02-15 00:42:31 -0800246 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
solenberg8d73f8c2017-03-08 01:52:20 -0800247 channel()->SetChannelOutputVolumeScaling(scaling);
solenberg217fb662016-06-17 08:30:54 -0700248}
249
ivoc14d5dbe2016-07-04 07:06:55 -0700250void ChannelProxy::SetRtcEventLog(RtcEventLog* event_log) {
solenberg08b19df2017-02-15 00:42:31 -0800251 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
ivoc14d5dbe2016-07-04 07:06:55 -0700252 channel()->SetRtcEventLog(event_log);
253}
254
aleloi6c278492016-10-20 14:24:39 -0700255AudioMixer::Source::AudioFrameInfo ChannelProxy::GetAudioFrameWithInfo(
256 int sample_rate_hz,
257 AudioFrame* audio_frame) {
solenberg08b19df2017-02-15 00:42:31 -0800258 RTC_DCHECK_RUNS_SERIALIZED(&audio_thread_race_checker_);
aleloi6c278492016-10-20 14:24:39 -0700259 return channel()->GetAudioFrameWithInfo(sample_rate_hz, audio_frame);
aleloiaed581a2016-10-20 06:32:39 -0700260}
261
aleloi051f6782016-10-31 03:26:40 -0700262int ChannelProxy::NeededFrequency() const {
solenberg08b19df2017-02-15 00:42:31 -0800263 RTC_DCHECK_RUNS_SERIALIZED(&audio_thread_race_checker_);
aleloi051f6782016-10-31 03:26:40 -0700264 return static_cast<int>(channel()->NeededFrequency(-1));
265}
266
michaelt79e05882016-11-08 02:50:09 -0800267void ChannelProxy::SetTransportOverhead(int transport_overhead_per_packet) {
solenberg08b19df2017-02-15 00:42:31 -0800268 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
michaelt79e05882016-11-08 02:50:09 -0800269 channel()->SetTransportOverhead(transport_overhead_per_packet);
270}
271
solenberg7602aab2016-11-14 11:30:07 -0800272void ChannelProxy::AssociateSendChannel(
273 const ChannelProxy& send_channel_proxy) {
solenberg08b19df2017-02-15 00:42:31 -0800274 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
solenberg7602aab2016-11-14 11:30:07 -0800275 channel()->set_associate_send_channel(send_channel_proxy.channel_owner_);
276}
277
278void ChannelProxy::DisassociateSendChannel() {
solenberg08b19df2017-02-15 00:42:31 -0800279 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
solenberg7602aab2016-11-14 11:30:07 -0800280 channel()->set_associate_send_channel(ChannelOwner(nullptr));
281}
282
solenberg3ebbcb52017-01-31 03:58:40 -0800283void ChannelProxy::GetRtpRtcp(RtpRtcp** rtp_rtcp,
284 RtpReceiver** rtp_receiver) const {
solenberg08b19df2017-02-15 00:42:31 -0800285 RTC_DCHECK(module_process_thread_checker_.CalledOnValidThread());
solenberg3ebbcb52017-01-31 03:58:40 -0800286 RTC_DCHECK(rtp_rtcp);
287 RTC_DCHECK(rtp_receiver);
288 int error = channel()->GetRtpRtcp(rtp_rtcp, rtp_receiver);
289 RTC_DCHECK_EQ(0, error);
290}
291
solenberg3ebbcb52017-01-31 03:58:40 -0800292uint32_t ChannelProxy::GetPlayoutTimestamp() const {
solenberg08b19df2017-02-15 00:42:31 -0800293 RTC_DCHECK_RUNS_SERIALIZED(&video_capture_thread_race_checker_);
solenberg3ebbcb52017-01-31 03:58:40 -0800294 unsigned int timestamp = 0;
295 int error = channel()->GetPlayoutTimestamp(timestamp);
296 RTC_DCHECK(!error || timestamp == 0);
297 return timestamp;
298}
299
300void ChannelProxy::SetMinimumPlayoutDelay(int delay_ms) {
solenberg08b19df2017-02-15 00:42:31 -0800301 RTC_DCHECK(module_process_thread_checker_.CalledOnValidThread());
solenberg3ebbcb52017-01-31 03:58:40 -0800302 // Limit to range accepted by both VoE and ACM, so we're at least getting as
303 // close as possible, instead of failing.
kwiberg07038562017-06-12 11:40:47 -0700304 delay_ms = rtc::SafeClamp(delay_ms, 0, 10000);
solenberg3ebbcb52017-01-31 03:58:40 -0800305 int error = channel()->SetMinimumPlayoutDelay(delay_ms);
solenberg0335e6c2017-02-22 07:07:04 -0800306 if (0 != error) {
307 LOG(LS_WARNING) << "Error setting minimum playout delay.";
308 }
solenberg3ebbcb52017-01-31 03:58:40 -0800309}
310
michaelt9332b7d2016-11-30 07:51:13 -0800311void ChannelProxy::SetRtcpRttStats(RtcpRttStats* rtcp_rtt_stats) {
solenberg08b19df2017-02-15 00:42:31 -0800312 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
michaelt9332b7d2016-11-30 07:51:13 -0800313 channel()->SetRtcpRttStats(rtcp_rtt_stats);
314}
315
solenbergbd9a77f2017-02-06 12:53:57 -0800316bool ChannelProxy::GetRecCodec(CodecInst* codec_inst) const {
solenberg08b19df2017-02-15 00:42:31 -0800317 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
solenbergbd9a77f2017-02-06 12:53:57 -0800318 return channel()->GetRecCodec(*codec_inst) == 0;
319}
320
elad.alond12a8e12017-03-23 11:04:48 -0700321void ChannelProxy::OnTwccBasedUplinkPacketLossRate(float packet_loss_rate) {
eladalonedd6eea2017-05-25 00:15:35 -0700322 // TODO(eladalon): This fails in UT; fix and uncomment.
elad.alon4e764512017-03-27 08:53:11 -0700323 // See: https://bugs.chromium.org/p/webrtc/issues/detail?id=7405
324 // RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
elad.alond12a8e12017-03-23 11:04:48 -0700325 channel()->OnTwccBasedUplinkPacketLossRate(packet_loss_rate);
326}
327
elad.alondadb4dc2017-03-23 15:29:50 -0700328void ChannelProxy::OnRecoverableUplinkPacketLossRate(
329 float recoverable_packet_loss_rate) {
eladalonedd6eea2017-05-25 00:15:35 -0700330 // TODO(eladalon): This fails in UT; fix and uncomment.
elad.alon4e764512017-03-27 08:53:11 -0700331 // See: https://bugs.chromium.org/p/webrtc/issues/detail?id=7405
elad.alondadb4dc2017-03-23 15:29:50 -0700332 // RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
333 channel()->OnRecoverableUplinkPacketLossRate(recoverable_packet_loss_rate);
334}
335
kwiberg1c07c702017-03-27 07:15:49 -0700336void ChannelProxy::RegisterLegacyReceiveCodecs() {
337 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
338 channel()->RegisterLegacyReceiveCodecs();
339}
340
hbos8d609f62017-04-10 07:39:05 -0700341std::vector<RtpSource> ChannelProxy::GetSources() const {
342 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
343 return channel()->GetSources();
344}
345
solenberg358057b2015-11-27 10:46:42 -0800346Channel* ChannelProxy::channel() const {
347 RTC_DCHECK(channel_owner_.channel());
348 return channel_owner_.channel();
349}
Stefan Holmerb86d4e42015-12-07 10:26:18 +0100350
solenberg13725082015-11-25 08:16:52 -0800351} // namespace voe
352} // namespace webrtc