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

Unified Diff: webrtc/video/vie_channel.cc

Issue 1721713002: Keep disabled RtpRtcp modules registered. (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/video/vie_channel.h ('k') | webrtc/video/vie_encoder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/vie_channel.cc
diff --git a/webrtc/video/vie_channel.cc b/webrtc/video/vie_channel.cc
index 5d4b1005c583ade5836b58dbe98b95b0d30c049f..701b1c710ff497d54b3eed0b33c6b00cac3c7986 100644
--- a/webrtc/video/vie_channel.cc
+++ b/webrtc/video/vie_channel.cc
@@ -35,9 +35,9 @@
namespace webrtc {
-const int kMinSendSidePacketHistorySize = 600;
-const int kMaxPacketAgeToNack = 450;
-const int kMaxNackListSize = 250;
+static const int kMinSendSidePacketHistorySize = 600;
+static const int kMaxPacketAgeToNack = 450;
+static const int kMaxNackListSize = 250;
// Helper class receiving statistics callbacks.
class ChannelStatsObserver : public CallStatsObserver {
@@ -102,7 +102,6 @@ ViEChannel::ViEChannel(Transport* transport,
packet_router_(packet_router),
bandwidth_observer_(bandwidth_observer),
transport_feedback_observer_(transport_feedback_observer),
- nack_history_size_sender_(kMinSendSidePacketHistorySize),
max_nack_reordering_threshold_(kMaxPacketAgeToNack),
pre_render_callback_(NULL),
last_rtt_ms_(0),
@@ -139,12 +138,13 @@ int32_t ViEChannel::Init() {
module_process_thread_->RegisterModule(vie_receiver_.GetReceiveStatistics());
// RTP/RTCP initialization.
- module_process_thread_->RegisterModule(rtp_rtcp_modules_[0]);
+ for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_)
+ module_process_thread_->RegisterModule(rtp_rtcp);
stefan-webrtc 2016/02/24 14:17:16 Should these be deregistered too?
pbos-webrtc 2016/02/24 14:44:25 They are deregistered in the destructor.
rtp_rtcp_modules_[0]->SetKeyFrameRequestMethod(kKeyFrameReqPliRtcp);
if (paced_sender_) {
for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_)
- rtp_rtcp->SetStorePacketsStatus(true, nack_history_size_sender_);
+ rtp_rtcp->SetStorePacketsStatus(true, kMinSendSidePacketHistorySize);
}
packet_router_->AddRtpModule(rtp_rtcp_modules_[0], sender_);
if (sender_) {
@@ -366,15 +366,11 @@ int32_t ViEChannel::SetSendCodec(const VideoCodec& video_codec,
send_payload_router_->set_active(true);
// Deregister previously registered modules.
- for (size_t i = num_active_modules; i < num_prev_active_modules; ++i) {
- module_process_thread_->DeRegisterModule(rtp_rtcp_modules_[i]);
- packet_router_->RemoveRtpModule(rtp_rtcp_modules_[i], sender_);
- }
+ for (size_t i = num_active_modules; i < num_prev_active_modules; ++i)
+ packet_router_->RemoveRtpModule(rtp_rtcp_modules_[i], true);
// Register new active modules.
- for (size_t i = num_prev_active_modules; i < num_active_modules; ++i) {
- module_process_thread_->RegisterModule(rtp_rtcp_modules_[i]);
- packet_router_->AddRtpModule(rtp_rtcp_modules_[i], sender_);
- }
+ for (size_t i = num_prev_active_modules; i < num_active_modules; ++i)
+ packet_router_->AddRtpModule(rtp_rtcp_modules_[i], true);
return 0;
}
@@ -427,7 +423,7 @@ void ViEChannel::ProcessNACKRequest(const bool enable) {
vie_receiver_.SetNackStatus(true, max_nack_reordering_threshold_);
for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_)
- rtp_rtcp->SetStorePacketsStatus(true, nack_history_size_sender_);
+ rtp_rtcp->SetStorePacketsStatus(true, kMinSendSidePacketHistorySize);
if (!sender_) {
vcm_->RegisterPacketRequestCallback(this);
« no previous file with comments | « webrtc/video/vie_channel.h ('k') | webrtc/video/vie_encoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698