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

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: Rebase. 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 e18003d4e73bf845fa584fd8c93e5efd2761cc1d..0780d3cf73d952e927582d79f161ecece19d0fbb 100644
--- a/webrtc/video/video_receive_stream.cc
+++ b/webrtc/video/video_receive_stream.cc
@@ -23,6 +23,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 {
@@ -147,7 +148,8 @@ 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),
@@ -155,6 +157,7 @@ VideoReceiveStream::VideoReceiveStream(
clock_(Clock::GetRealTimeClock()),
congestion_controller_(congestion_controller),
call_stats_(call_stats),
+ remb_(remb),
vcm_(VideoCodingModule::Create(clock_, nullptr, nullptr)),
incoming_video_stream_(
0,
@@ -177,6 +180,9 @@ VideoReceiveStream::VideoReceiveStream(
false) {
LOG(LS_INFO) << "VideoReceiveStream: " << config_.ToString();
+ RTC_DCHECK(congestion_controller_);
the sun 2016/02/08 10:39:23 nit: process_thread missing
stefan-webrtc 2016/02/08 13:30:54 Done.
+ RTC_DCHECK(call_stats_);
+ RTC_DCHECK(remb_);
RTC_CHECK(vie_channel_.Init() == 0);
// Register the channel to receive stats updates.
@@ -210,8 +216,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;
@@ -302,8 +311,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();
congestion_controller_->GetRemoteBitrateEstimator(UseSendSideBwe(config_))

Powered by Google App Engine
This is Rietveld 408576698