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 |
11 #include "webrtc/voice_engine/channel_proxy.h" | 11 #include "webrtc/voice_engine/channel_proxy.h" |
12 | 12 |
13 #include <utility> | 13 #include <utility> |
14 | 14 |
15 #include "webrtc/api/call/audio_sink.h" | 15 #include "webrtc/api/call/audio_sink.h" |
16 #include "webrtc/base/checks.h" | 16 #include "webrtc/base/checks.h" |
17 #include "webrtc/voice_engine/channel.h" | 17 #include "webrtc/voice_engine/channel.h" |
18 | 18 |
19 namespace webrtc { | 19 namespace webrtc { |
20 namespace voe { | 20 namespace voe { |
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 worker_queue_checker_.Detach(); |
26 } | 27 } |
27 | 28 |
28 ChannelProxy::~ChannelProxy() {} | 29 ChannelProxy::~ChannelProxy() {} |
29 | 30 |
30 void ChannelProxy::SetRTCPStatus(bool enable) { | 31 void ChannelProxy::SetRTCPStatus(bool enable) { |
31 channel()->SetRTCPStatus(enable); | 32 channel()->SetRTCPStatus(enable); |
32 } | 33 } |
33 | 34 |
34 void ChannelProxy::SetLocalSSRC(uint32_t ssrc) { | 35 void ChannelProxy::SetLocalSSRC(uint32_t ssrc) { |
35 RTC_DCHECK(thread_checker_.CalledOnValidThread()); | 36 RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 void ChannelProxy::DisassociateSendChannel() { | 248 void ChannelProxy::DisassociateSendChannel() { |
248 RTC_DCHECK(thread_checker_.CalledOnValidThread()); | 249 RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
249 channel()->set_associate_send_channel(ChannelOwner(nullptr)); | 250 channel()->set_associate_send_channel(ChannelOwner(nullptr)); |
250 } | 251 } |
251 | 252 |
252 void ChannelProxy::SetRtcpRttStats(RtcpRttStats* rtcp_rtt_stats) { | 253 void ChannelProxy::SetRtcpRttStats(RtcpRttStats* rtcp_rtt_stats) { |
253 RTC_DCHECK(thread_checker_.CalledOnValidThread()); | 254 RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
254 channel()->SetRtcpRttStats(rtcp_rtt_stats); | 255 channel()->SetRtcpRttStats(rtcp_rtt_stats); |
255 } | 256 } |
256 | 257 |
| 258 void ChannelProxy::AdaptCodec() { |
| 259 RTC_DCHECK_CALLED_SEQUENTIALLY(&worker_queue_checker_); |
| 260 channel()->AdaptCodec(); |
| 261 } |
| 262 |
257 Channel* ChannelProxy::channel() const { | 263 Channel* ChannelProxy::channel() const { |
258 RTC_DCHECK(channel_owner_.channel()); | 264 RTC_DCHECK(channel_owner_.channel()); |
259 return channel_owner_.channel(); | 265 return channel_owner_.channel(); |
260 } | 266 } |
261 | 267 |
262 } // namespace voe | 268 } // namespace voe |
263 } // namespace webrtc | 269 } // namespace webrtc |
OLD | NEW |