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

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

Issue 2685673003: Define RtpTransportControllerSendInterface. (Closed)
Patch Set: Rebased. 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.h ('k') | webrtc/voice_engine/channel_proxy.h » ('j') | 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) 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/timeutils.h" 24 #include "webrtc/base/timeutils.h"
25 #include "webrtc/call/rtp_transport_controller_send.h"
25 #include "webrtc/config.h" 26 #include "webrtc/config.h"
26 #include "webrtc/logging/rtc_event_log/rtc_event_log.h" 27 #include "webrtc/logging/rtc_event_log/rtc_event_log.h"
27 #include "webrtc/modules/audio_coding/codecs/audio_format_conversion.h" 28 #include "webrtc/modules/audio_coding/codecs/audio_format_conversion.h"
28 #include "webrtc/modules/audio_device/include/audio_device.h" 29 #include "webrtc/modules/audio_device/include/audio_device.h"
29 #include "webrtc/modules/audio_processing/include/audio_processing.h" 30 #include "webrtc/modules/audio_processing/include/audio_processing.h"
30 #include "webrtc/modules/include/module_common_types.h" 31 #include "webrtc/modules/include/module_common_types.h"
31 #include "webrtc/modules/pacing/packet_router.h" 32 #include "webrtc/modules/pacing/packet_router.h"
32 #include "webrtc/modules/rtp_rtcp/include/receive_statistics.h" 33 #include "webrtc/modules/rtp_rtcp/include/receive_statistics.h"
33 #include "webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h" 34 #include "webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h"
34 #include "webrtc/modules/rtp_rtcp/include/rtp_receiver.h" 35 #include "webrtc/modules/rtp_rtcp/include/rtp_receiver.h"
(...skipping 2329 matching lines...) Expand 10 before | Expand all | Expand 10 after
2364 2365
2365 void Channel::EnableReceiveTransportSequenceNumber(int id) { 2366 void Channel::EnableReceiveTransportSequenceNumber(int id) {
2366 rtp_header_parser_->DeregisterRtpHeaderExtension( 2367 rtp_header_parser_->DeregisterRtpHeaderExtension(
2367 kRtpExtensionTransportSequenceNumber); 2368 kRtpExtensionTransportSequenceNumber);
2368 bool ret = rtp_header_parser_->RegisterRtpHeaderExtension( 2369 bool ret = rtp_header_parser_->RegisterRtpHeaderExtension(
2369 kRtpExtensionTransportSequenceNumber, id); 2370 kRtpExtensionTransportSequenceNumber, id);
2370 RTC_DCHECK(ret); 2371 RTC_DCHECK(ret);
2371 } 2372 }
2372 2373
2373 void Channel::RegisterSenderCongestionControlObjects( 2374 void Channel::RegisterSenderCongestionControlObjects(
2374 RtpPacketSender* rtp_packet_sender, 2375 RtpTransportControllerSendInterface* transport,
2375 TransportFeedbackObserver* transport_feedback_observer,
2376 PacketRouter* packet_router,
2377 RtcpBandwidthObserver* bandwidth_observer) { 2376 RtcpBandwidthObserver* bandwidth_observer) {
2377 RtpPacketSender* rtp_packet_sender = transport->packet_sender();
2378 TransportFeedbackObserver* transport_feedback_observer =
2379 transport->transport_feedback_observer();
2380 PacketRouter* packet_router = transport->packet_router();
2381
2378 RTC_DCHECK(rtp_packet_sender); 2382 RTC_DCHECK(rtp_packet_sender);
2379 RTC_DCHECK(transport_feedback_observer); 2383 RTC_DCHECK(transport_feedback_observer);
2380 RTC_DCHECK(packet_router && !packet_router_); 2384 RTC_DCHECK(packet_router && !packet_router_);
2381 rtcp_observer_->SetBandwidthObserver(bandwidth_observer); 2385 rtcp_observer_->SetBandwidthObserver(bandwidth_observer);
2382 feedback_observer_proxy_->SetTransportFeedbackObserver( 2386 feedback_observer_proxy_->SetTransportFeedbackObserver(
2383 transport_feedback_observer); 2387 transport_feedback_observer);
2384 seq_num_allocator_proxy_->SetSequenceNumberAllocator(packet_router); 2388 seq_num_allocator_proxy_->SetSequenceNumberAllocator(packet_router);
2385 rtp_packet_sender_proxy_->SetPacketSender(rtp_packet_sender); 2389 rtp_packet_sender_proxy_->SetPacketSender(rtp_packet_sender);
2386 _rtpRtcpModule->SetStorePacketsStatus(true, 600); 2390 _rtpRtcpModule->SetStorePacketsStatus(true, 600);
2387 packet_router->AddRtpModule(_rtpRtcpModule.get()); 2391 packet_router->AddRtpModule(_rtpRtcpModule.get());
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after
3029 int64_t min_rtt = 0; 3033 int64_t min_rtt = 0;
3030 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != 3034 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) !=
3031 0) { 3035 0) {
3032 return 0; 3036 return 0;
3033 } 3037 }
3034 return rtt; 3038 return rtt;
3035 } 3039 }
3036 3040
3037 } // namespace voe 3041 } // namespace voe
3038 } // namespace webrtc 3042 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/voice_engine/channel.h ('k') | webrtc/voice_engine/channel_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698