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/base/logging.h" | 17 #include "webrtc/base/logging.h" |
| 18 #include "webrtc/call/rtp_transport_controller_send.h" |
18 #include "webrtc/voice_engine/channel.h" | 19 #include "webrtc/voice_engine/channel.h" |
19 | 20 |
20 namespace webrtc { | 21 namespace webrtc { |
21 namespace voe { | 22 namespace voe { |
22 ChannelProxy::ChannelProxy() : channel_owner_(nullptr) {} | 23 ChannelProxy::ChannelProxy() : channel_owner_(nullptr) {} |
23 | 24 |
24 ChannelProxy::ChannelProxy(const ChannelOwner& channel_owner) : | 25 ChannelProxy::ChannelProxy(const ChannelOwner& channel_owner) : |
25 channel_owner_(channel_owner) { | 26 channel_owner_(channel_owner) { |
26 RTC_CHECK(channel_owner_.channel()); | 27 RTC_CHECK(channel_owner_.channel()); |
27 module_process_thread_checker_.DetachFromThread(); | 28 module_process_thread_checker_.DetachFromThread(); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 70 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
70 channel()->EnableSendTransportSequenceNumber(id); | 71 channel()->EnableSendTransportSequenceNumber(id); |
71 } | 72 } |
72 | 73 |
73 void ChannelProxy::EnableReceiveTransportSequenceNumber(int id) { | 74 void ChannelProxy::EnableReceiveTransportSequenceNumber(int id) { |
74 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 75 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
75 channel()->EnableReceiveTransportSequenceNumber(id); | 76 channel()->EnableReceiveTransportSequenceNumber(id); |
76 } | 77 } |
77 | 78 |
78 void ChannelProxy::RegisterSenderCongestionControlObjects( | 79 void ChannelProxy::RegisterSenderCongestionControlObjects( |
79 RtpPacketSender* rtp_packet_sender, | 80 RtpTransportControllerSendInterface* transport, |
80 TransportFeedbackObserver* transport_feedback_observer, | |
81 PacketRouter* packet_router, | |
82 RtcpBandwidthObserver* bandwidth_observer) { | 81 RtcpBandwidthObserver* bandwidth_observer) { |
83 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 82 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
84 channel()->RegisterSenderCongestionControlObjects( | 83 channel()->RegisterSenderCongestionControlObjects(transport, |
85 rtp_packet_sender, transport_feedback_observer, packet_router, | 84 bandwidth_observer); |
86 bandwidth_observer); | |
87 } | 85 } |
88 | 86 |
89 void ChannelProxy::RegisterReceiverCongestionControlObjects( | 87 void ChannelProxy::RegisterReceiverCongestionControlObjects( |
90 PacketRouter* packet_router) { | 88 PacketRouter* packet_router) { |
91 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 89 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
92 channel()->RegisterReceiverCongestionControlObjects(packet_router); | 90 channel()->RegisterReceiverCongestionControlObjects(packet_router); |
93 } | 91 } |
94 | 92 |
95 void ChannelProxy::ResetCongestionControlObjects() { | 93 void ChannelProxy::ResetCongestionControlObjects() { |
96 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 94 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 channel()->OnRecoverableUplinkPacketLossRate(recoverable_packet_loss_rate); | 377 channel()->OnRecoverableUplinkPacketLossRate(recoverable_packet_loss_rate); |
380 } | 378 } |
381 | 379 |
382 Channel* ChannelProxy::channel() const { | 380 Channel* ChannelProxy::channel() const { |
383 RTC_DCHECK(channel_owner_.channel()); | 381 RTC_DCHECK(channel_owner_.channel()); |
384 return channel_owner_.channel(); | 382 return channel_owner_.channel(); |
385 } | 383 } |
386 | 384 |
387 } // namespace voe | 385 } // namespace voe |
388 } // namespace webrtc | 386 } // namespace webrtc |
OLD | NEW |