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

Unified Diff: webrtc/call/call.cc

Issue 1663413003: Clean up of CongestionController. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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
« no previous file with comments | « webrtc/audio/audio_send_stream_unittest.cc ('k') | webrtc/call/congestion_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/call/call.cc
diff --git a/webrtc/call/call.cc b/webrtc/call/call.cc
index 652cfb0294906fd68095e28ab0ee42e495e3ee71..60f2b4646f95f501ca22e8795766663c58bc7566 100644
--- a/webrtc/call/call.cc
+++ b/webrtc/call/call.cc
@@ -41,6 +41,7 @@
#include "webrtc/video/call_stats.h"
#include "webrtc/video/video_receive_stream.h"
#include "webrtc/video/video_send_stream.h"
+#include "webrtc/video/vie_remb.h"
#include "webrtc/voice_engine/include/voe_codec.h"
namespace webrtc {
@@ -165,6 +166,7 @@ class Call : public webrtc::Call, public PacketReceiver,
int64_t pacer_bitrate_sum_kbits_ GUARDED_BY(&bitrate_crit_);
int64_t num_bitrate_updates_ GUARDED_BY(&bitrate_crit_);
+ rtc::scoped_ptr<VieRemb> remb_;
pbos-webrtc 2016/02/04 13:53:20 VieRemb remb_, don't allocate on the heap here.
stefan-webrtc 2016/02/05 12:58:52 Done.
const rtc::scoped_ptr<CongestionController> congestion_controller_;
RTC_DISALLOW_COPY_AND_ASSIGN(Call);
@@ -196,10 +198,13 @@ Call::Call(const Call::Config& config)
estimated_send_bitrate_sum_kbits_(0),
pacer_bitrate_sum_kbits_(0),
num_bitrate_updates_(0),
+ remb_(new VieRemb(clock_)),
congestion_controller_(
- new CongestionController(module_process_thread_.get(),
+ new CongestionController(clock_,
+ module_process_thread_.get(),
call_stats_.get(),
- this)) {
+ this,
+ remb_.get())) {
RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread());
RTC_DCHECK_GE(config.bitrate_config.min_bitrate_bps, 0);
RTC_DCHECK_GE(config.bitrate_config.start_bitrate_bps,
@@ -226,6 +231,7 @@ Call::Call(const Call::Config& config)
}
Call::~Call() {
+ RTC_DCHECK(!remb_->InUse());
RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread());
UpdateSendHistograms();
UpdateReceiveHistograms();
@@ -379,8 +385,8 @@ webrtc::VideoSendStream* Call::CreateVideoSendStream(
// the call has already started.
VideoSendStream* send_stream = new VideoSendStream(
num_cpu_cores_, module_process_thread_.get(), call_stats_.get(),
- congestion_controller_.get(), bitrate_allocator_.get(), config,
- encoder_config, suspended_video_send_ssrcs_);
+ congestion_controller_.get(), remb_.get(), bitrate_allocator_.get(),
+ config, encoder_config, suspended_video_send_ssrcs_);
if (!network_enabled_)
send_stream->SignalNetworkState(kNetworkDown);
@@ -437,8 +443,8 @@ webrtc::VideoReceiveStream* Call::CreateVideoReceiveStream(
TRACE_EVENT0("webrtc", "Call::CreateVideoReceiveStream");
RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread());
VideoReceiveStream* receive_stream = new VideoReceiveStream(
- num_cpu_cores_, congestion_controller_.get(), config,
- voice_engine(), module_process_thread_.get(), call_stats_.get());
+ num_cpu_cores_, congestion_controller_.get(), config, voice_engine(),
+ module_process_thread_.get(), call_stats_.get(), remb_.get());
WriteLockScoped write_lock(*receive_crit_);
RTC_DCHECK(video_receive_ssrcs_.find(config.rtp.remote_ssrc) ==
« no previous file with comments | « webrtc/audio/audio_send_stream_unittest.cc ('k') | webrtc/call/congestion_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698