Chromium Code Reviews| Index: webrtc/modules/congestion_controller/congestion_controller.cc | 
| diff --git a/webrtc/modules/congestion_controller/congestion_controller.cc b/webrtc/modules/congestion_controller/congestion_controller.cc | 
| index bbdd968dc668f6c51587b891f700c96e39dbcc42..ba11f3758f9aa1c8cb0e206f5c90ec9043daabc4 100644 | 
| --- a/webrtc/modules/congestion_controller/congestion_controller.cc | 
| +++ b/webrtc/modules/congestion_controller/congestion_controller.cc | 
| @@ -23,6 +23,8 @@ | 
| #include "webrtc/modules/remote_bitrate_estimator/include/bwe_defines.h" | 
| #include "webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.h" | 
| #include "webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.h" | 
| +#include "webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h" | 
| +#include "webrtc/modules/rtp_rtcp/source/rtp_packet_received.h" | 
| #include "webrtc/system_wrappers/include/critical_section_wrapper.h" | 
| namespace webrtc { | 
| @@ -197,6 +199,33 @@ CongestionController::CongestionController( | 
| CongestionController::~CongestionController() {} | 
| +void CongestionController::NotifyBweOfReceivedPacket( | 
| 
 
stefan-webrtc
2016/12/19 14:03:31
Call this method "OnReceivedPacket"
 
brandtr
2016/12/19 14:26:53
Done. Alternatively, it could also be called "Inco
 
stefan-webrtc
2016/12/19 15:50:30
Agree, but now it resembles OnSentPacket below, wh
 
 | 
| + const RtpPacketReceived& packet) { | 
| + const bool transport_wide = packet.HasExtension<TransportSequenceNumber>(); | 
| + const bool abs_send_time = packet.HasExtension<AbsoluteSendTime>(); | 
| + const bool t_offset = packet.HasExtension<TransmissionOffset>(); | 
| 
 
stefan-webrtc
2016/12/19 14:03:31
One more tiny request...
Could we move out the rt
 
brandtr
2016/12/19 14:26:53
Done.
 
 | 
| + | 
| + // At least one of the header extensions is needed for the BWE. | 
| + if (!transport_wide && !abs_send_time && !t_offset) | 
| + return; | 
| + | 
| + RTPHeader header; | 
| + packet.GetHeader(&header); | 
| + | 
| + // Send-side BWE. | 
| + if (transport_wide) { | 
| + remote_estimator_proxy_.IncomingPacket(packet.arrival_time_ms(), | 
| + packet.payload_size(), header); | 
| + return; | 
| + } | 
| + | 
| + // Receive-side BWE. | 
| + if (remote_bitrate_estimator_) { | 
| + remote_bitrate_estimator_->IncomingPacket(packet.arrival_time_ms(), | 
| + packet.payload_size(), header); | 
| + } | 
| +} | 
| + | 
| void CongestionController::SetBweBitrates(int min_bitrate_bps, | 
| int start_bitrate_bps, | 
| int max_bitrate_bps) { |