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

Unified Diff: webrtc/video/video_receive_stream.cc

Issue 1663413003: Clean up of CongestionController. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Comments addressed. Created 4 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
Index: webrtc/video/video_receive_stream.cc
diff --git a/webrtc/video/video_receive_stream.cc b/webrtc/video/video_receive_stream.cc
index 7779fddd569bece3461280e104a69dfd2924ac65..6e7ae10cfe05f14602b4c1f76eb1f136282642d9 100644
--- a/webrtc/video/video_receive_stream.cc
+++ b/webrtc/video/video_receive_stream.cc
@@ -22,6 +22,7 @@
#include "webrtc/system_wrappers/include/clock.h"
#include "webrtc/video/call_stats.h"
#include "webrtc/video/receive_statistics_proxy.h"
+#include "webrtc/video/vie_remb.h"
#include "webrtc/video_receive_stream.h"
namespace webrtc {
@@ -144,13 +145,15 @@ VideoReceiveStream::VideoReceiveStream(
const VideoReceiveStream::Config& config,
webrtc::VoiceEngine* voice_engine,
ProcessThread* process_thread,
- CallStats* call_stats)
+ CallStats* call_stats,
+ VieRemb* remb)
: transport_adapter_(config.rtcp_send_transport),
encoded_frame_proxy_(config.pre_decode_callback),
config_(config),
clock_(Clock::GetRealTimeClock()),
congestion_controller_(congestion_controller),
- call_stats_(call_stats) {
+ call_stats_(call_stats),
+ remb_(remb) {
the sun 2016/02/05 15:12:37 RTC_DCHECK(remb); wouldn't hurt to be paranoid abo
stefan-webrtc 2016/02/07 18:29:27 Done.
LOG(LS_INFO) << "VideoReceiveStream: " << config_.ToString();
bool send_side_bwe =
@@ -198,8 +201,11 @@ VideoReceiveStream::VideoReceiveStream(
vie_channel_->SetUseRtxPayloadMappingOnRestore(
config_.rtp.use_rtx_payload_mapping_on_restore);
- congestion_controller_->SetChannelRembStatus(false, config_.rtp.remb,
- vie_channel_->rtp_rtcp());
+ RtpRtcp* rtp_module = vie_channel_->rtp_rtcp();
+ if (config_.rtp.remb) {
+ rtp_module->SetREMBStatus(true);
+ remb_->AddReceiveChannel(rtp_module);
+ }
for (size_t i = 0; i < config_.rtp.extensions.size(); ++i) {
const std::string& extension = config_.rtp.extensions[i].name;
@@ -293,8 +299,10 @@ VideoReceiveStream::~VideoReceiveStream() {
vie_channel_->RegisterPreDecodeImageCallback(nullptr);
call_stats_->DeregisterStatsObserver(vie_channel_->GetStatsObserver());
- congestion_controller_->SetChannelRembStatus(false, false,
- vie_channel_->rtp_rtcp());
+
+ RtpRtcp* rtp_module = vie_channel_->rtp_rtcp();
+ rtp_module->SetREMBStatus(false);
+ remb_->RemoveReceiveChannel(rtp_module);
uint32_t remote_ssrc = vie_channel_->GetRemoteSSRC();
bool send_side_bwe = UseSendSideBwe(config_.rtp.extensions);

Powered by Google App Engine
This is Rietveld 408576698