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

Unified Diff: webrtc/audio/audio_send_stream.cc

Issue 2658233002: Wire up audio packet loss to BWE. (Closed)
Patch Set: Only register BandwidthObserver when needed BWE is negotiated. Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/audio/audio_send_stream.h ('k') | webrtc/audio/audio_send_stream_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/audio/audio_send_stream.cc
diff --git a/webrtc/audio/audio_send_stream.cc b/webrtc/audio/audio_send_stream.cc
index c43d0da573f2c92963c31e83bc27605fb2d1e80d..8d4ad3221ffc6f96e91440190fdd8d226976222f 100644
--- a/webrtc/audio/audio_send_stream.cc
+++ b/webrtc/audio/audio_send_stream.cc
@@ -19,6 +19,7 @@
#include "webrtc/base/event.h"
#include "webrtc/base/logging.h"
#include "webrtc/base/task_queue.h"
+#include "webrtc/modules/bitrate_controller/include/bitrate_controller.h"
#include "webrtc/modules/congestion_controller/include/congestion_controller.h"
#include "webrtc/modules/pacing/paced_sender.h"
#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
@@ -62,9 +63,6 @@ AudioSendStream::AudioSendStream(
channel_proxy_ = voe_impl->GetChannelProxy(config_.voe_channel_id);
channel_proxy_->SetRtcEventLog(event_log);
channel_proxy_->SetRtcpRttStats(rtcp_rtt_stats);
- channel_proxy_->RegisterSenderCongestionControlObjects(
- congestion_controller->pacer(),
- congestion_controller->GetTransportFeedbackObserver(), packet_router);
channel_proxy_->SetRTCPStatus(true);
channel_proxy_->SetLocalSSRC(config.rtp.ssrc);
channel_proxy_->SetRTCP_CNAME(config.rtp.c_name);
@@ -81,10 +79,16 @@ AudioSendStream::AudioSendStream(
} else if (extension.uri == RtpExtension::kTransportSequenceNumberUri) {
channel_proxy_->EnableSendTransportSequenceNumber(extension.id);
congestion_controller->EnablePeriodicAlrProbing(true);
+ bandwidth_observer_.reset(congestion_controller->GetBitrateController()
+ ->CreateRtcpBandwidthObserver());
} else {
RTC_NOTREACHED() << "Registering unsupported RTP extension.";
}
}
+ channel_proxy_->RegisterSenderCongestionControlObjects(
+ congestion_controller->pacer(),
+ congestion_controller->GetTransportFeedbackObserver(), packet_router,
+ bandwidth_observer_.get());
if (!SetupSendCodec()) {
LOG(LS_ERROR) << "Failed to set up send codec state.";
}
« no previous file with comments | « webrtc/audio/audio_send_stream.h ('k') | webrtc/audio/audio_send_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698