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

Unified Diff: webrtc/voice_engine/channel.cc

Issue 1628683002: Use separate rtp module lists for send and receive in PacketRouter. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressed comments. Created 4 years, 11 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
« webrtc/modules/pacing/packet_router.cc ('K') | « webrtc/video/vie_channel.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/voice_engine/channel.cc
diff --git a/webrtc/voice_engine/channel.cc b/webrtc/voice_engine/channel.cc
index 25f44c1c66fcbaccc7543121971f0c9cda6dc4e1..4e7cc130781565f1a36e7a847bed0083734c11ac 100644
--- a/webrtc/voice_engine/channel.cc
+++ b/webrtc/voice_engine/channel.cc
@@ -125,6 +125,12 @@ class RtpPacketSenderProxy : public RtpPacketSender {
rtp_packet_sender_ = rtp_packet_sender;
}
+ bool HasPacketSender() const {
+ RTC_DCHECK(thread_checker_.CalledOnValidThread());
+ rtc::CritScope lock(&crit_);
+ return rtp_packet_sender_ != nullptr;
+ }
+
// Implements RtpPacketSender.
void InsertPacket(Priority priority,
uint32_t ssrc,
@@ -2922,6 +2928,9 @@ void Channel::SetCongestionControlObjects(
RtpPacketSender* rtp_packet_sender,
TransportFeedbackObserver* transport_feedback_observer,
PacketRouter* packet_router) {
+ bool sender = rtp_packet_sender != nullptr ||
+ (rtp_packet_sender_proxy_.get() &&
+ rtp_packet_sender_proxy_->HasPacketSender());
the sun 2016/01/25 15:42:01 Can this property change as a consequence of this
stefan-webrtc 2016/01/25 16:00:26 It can change to null as the stream is being teare
the sun 2016/01/26 09:17:03 Very well, but I think this code is becoming hard
stefan-webrtc 2016/01/26 10:50:38 Agree, done.
RTC_DCHECK(packet_router != nullptr || packet_router_ != nullptr);
if (transport_feedback_observer) {
RTC_DCHECK(feedback_observer_proxy_.get());
@@ -2937,9 +2946,9 @@ void Channel::SetCongestionControlObjects(
}
_rtpRtcpModule->SetStorePacketsStatus(rtp_packet_sender != nullptr, 600);
if (packet_router != nullptr) {
- packet_router->AddRtpModule(_rtpRtcpModule.get());
+ packet_router->AddRtpModule(_rtpRtcpModule.get(), sender);
} else {
- packet_router_->RemoveRtpModule(_rtpRtcpModule.get());
+ packet_router_->RemoveRtpModule(_rtpRtcpModule.get(), sender);
}
packet_router_ = packet_router;
}
« webrtc/modules/pacing/packet_router.cc ('K') | « webrtc/video/vie_channel.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698