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

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

Issue 2685673003: Define RtpTransportControllerSendInterface. (Closed)
Patch Set: Comment improvements. Created 3 years, 9 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) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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.h" 11 #include "webrtc/voice_engine/channel.h"
12 12
13 #include <algorithm> 13 #include <algorithm>
14 #include <utility> 14 #include <utility>
15 15
16 #include "webrtc/audio/utility/audio_frame_operations.h" 16 #include "webrtc/audio/utility/audio_frame_operations.h"
17 #include "webrtc/base/array_view.h" 17 #include "webrtc/base/array_view.h"
18 #include "webrtc/base/checks.h" 18 #include "webrtc/base/checks.h"
19 #include "webrtc/base/criticalsection.h" 19 #include "webrtc/base/criticalsection.h"
20 #include "webrtc/base/format_macros.h" 20 #include "webrtc/base/format_macros.h"
21 #include "webrtc/base/location.h" 21 #include "webrtc/base/location.h"
22 #include "webrtc/base/logging.h" 22 #include "webrtc/base/logging.h"
23 #include "webrtc/base/rate_limiter.h" 23 #include "webrtc/base/rate_limiter.h"
24 #include "webrtc/base/thread_checker.h" 24 #include "webrtc/base/thread_checker.h"
25 #include "webrtc/base/timeutils.h" 25 #include "webrtc/base/timeutils.h"
26 #include "webrtc/call/rtp_transport_controller.h"
26 #include "webrtc/config.h" 27 #include "webrtc/config.h"
27 #include "webrtc/logging/rtc_event_log/rtc_event_log.h" 28 #include "webrtc/logging/rtc_event_log/rtc_event_log.h"
28 #include "webrtc/modules/audio_coding/codecs/audio_format_conversion.h" 29 #include "webrtc/modules/audio_coding/codecs/audio_format_conversion.h"
29 #include "webrtc/modules/audio_device/include/audio_device.h" 30 #include "webrtc/modules/audio_device/include/audio_device.h"
30 #include "webrtc/modules/audio_processing/include/audio_processing.h" 31 #include "webrtc/modules/audio_processing/include/audio_processing.h"
31 #include "webrtc/modules/include/module_common_types.h" 32 #include "webrtc/modules/include/module_common_types.h"
32 #include "webrtc/modules/pacing/packet_router.h" 33 #include "webrtc/modules/pacing/packet_router.h"
33 #include "webrtc/modules/rtp_rtcp/include/receive_statistics.h" 34 #include "webrtc/modules/rtp_rtcp/include/receive_statistics.h"
34 #include "webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h" 35 #include "webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h"
35 #include "webrtc/modules/rtp_rtcp/include/rtp_receiver.h" 36 #include "webrtc/modules/rtp_rtcp/include/rtp_receiver.h"
(...skipping 2291 matching lines...) Expand 10 before | Expand all | Expand 10 after
2327 2328
2328 void Channel::EnableReceiveTransportSequenceNumber(int id) { 2329 void Channel::EnableReceiveTransportSequenceNumber(int id) {
2329 rtp_header_parser_->DeregisterRtpHeaderExtension( 2330 rtp_header_parser_->DeregisterRtpHeaderExtension(
2330 kRtpExtensionTransportSequenceNumber); 2331 kRtpExtensionTransportSequenceNumber);
2331 bool ret = rtp_header_parser_->RegisterRtpHeaderExtension( 2332 bool ret = rtp_header_parser_->RegisterRtpHeaderExtension(
2332 kRtpExtensionTransportSequenceNumber, id); 2333 kRtpExtensionTransportSequenceNumber, id);
2333 RTC_DCHECK(ret); 2334 RTC_DCHECK(ret);
2334 } 2335 }
2335 2336
2336 void Channel::RegisterSenderCongestionControlObjects( 2337 void Channel::RegisterSenderCongestionControlObjects(
2337 RtpPacketSender* rtp_packet_sender, 2338 RtpTransportControllerSendInterface* transport,
2338 TransportFeedbackObserver* transport_feedback_observer,
2339 PacketRouter* packet_router,
2340 RtcpBandwidthObserver* bandwidth_observer) { 2339 RtcpBandwidthObserver* bandwidth_observer) {
2340 RtpPacketSender* rtp_packet_sender = transport->packet_sender();
2341 TransportFeedbackObserver* transport_feedback_observer =
2342 transport->transport_feedback_observer();
2343 PacketRouter* packet_router = transport->packet_router();
2344
2341 RTC_DCHECK(rtp_packet_sender); 2345 RTC_DCHECK(rtp_packet_sender);
2342 RTC_DCHECK(transport_feedback_observer); 2346 RTC_DCHECK(transport_feedback_observer);
2343 RTC_DCHECK(packet_router && !packet_router_); 2347 RTC_DCHECK(packet_router && !packet_router_);
2344 rtcp_observer_->SetBandwidthObserver(bandwidth_observer); 2348 rtcp_observer_->SetBandwidthObserver(bandwidth_observer);
2345 feedback_observer_proxy_->SetTransportFeedbackObserver( 2349 feedback_observer_proxy_->SetTransportFeedbackObserver(
2346 transport_feedback_observer); 2350 transport_feedback_observer);
2347 seq_num_allocator_proxy_->SetSequenceNumberAllocator(packet_router); 2351 seq_num_allocator_proxy_->SetSequenceNumberAllocator(packet_router);
2348 rtp_packet_sender_proxy_->SetPacketSender(rtp_packet_sender); 2352 rtp_packet_sender_proxy_->SetPacketSender(rtp_packet_sender);
2349 _rtpRtcpModule->SetStorePacketsStatus(true, 600); 2353 _rtpRtcpModule->SetStorePacketsStatus(true, 600);
2350 packet_router->AddRtpModule(_rtpRtcpModule.get()); 2354 packet_router->AddRtpModule(_rtpRtcpModule.get());
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after
2992 int64_t min_rtt = 0; 2996 int64_t min_rtt = 0;
2993 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != 2997 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) !=
2994 0) { 2998 0) {
2995 return 0; 2999 return 0;
2996 } 3000 }
2997 return rtt; 3001 return rtt;
2998 } 3002 }
2999 3003
3000 } // namespace voe 3004 } // namespace voe
3001 } // namespace webrtc 3005 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698