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

Unified Diff: webrtc/video/vie_receiver.cc

Issue 1864313003: Move Ownership of RtpModules to VideoSendStream. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebased Created 4 years, 8 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_receiver.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/vie_receiver.cc
diff --git a/webrtc/video/vie_receiver.cc b/webrtc/video/vie_receiver.cc
index e5ec167fa7dbb145780ad2e558aabf4eff5ab0d6..9ead910f5c709d55b3ddd2f91566a75b0edee867 100644
--- a/webrtc/video/vie_receiver.cc
+++ b/webrtc/video/vie_receiver.cc
@@ -124,8 +124,8 @@ int ViEReceiver::GetCsrcs(uint32_t* csrcs) const {
return rtp_receiver_->CSRCs(csrcs);
}
-void ViEReceiver::Init(const std::vector<RtpRtcp*>& modules) {
- rtp_rtcp_ = modules;
+void ViEReceiver::Init(RtpRtcp* rtp_rtcp) {
+ rtp_rtcp_ = rtp_rtcp;
}
RtpReceiver* ViEReceiver::GetRtpReceiver() const {
@@ -318,8 +318,6 @@ void ViEReceiver::NotifyReceiverOfFecPacket(const RTPHeader& header) {
bool ViEReceiver::DeliverRtcp(const uint8_t* rtcp_packet,
size_t rtcp_packet_length) {
- // Should be set by owner at construction time.
- RTC_DCHECK(!rtp_rtcp_.empty());
{
rtc::CritScope lock(&receive_cs_);
if (!receiving_) {
@@ -327,11 +325,10 @@ bool ViEReceiver::DeliverRtcp(const uint8_t* rtcp_packet,
}
}
- for (RtpRtcp* rtp_rtcp : rtp_rtcp_)
- rtp_rtcp->IncomingRtcpPacket(rtcp_packet, rtcp_packet_length);
+ rtp_rtcp_->IncomingRtcpPacket(rtcp_packet, rtcp_packet_length);
int64_t rtt = 0;
- rtp_rtcp_[0]->RTT(rtp_receiver_->SSRC(), &rtt, nullptr, nullptr, nullptr);
+ rtp_rtcp_->RTT(rtp_receiver_->SSRC(), &rtt, nullptr, nullptr, nullptr);
if (rtt == 0) {
// Waiting for valid rtt.
return true;
@@ -339,8 +336,8 @@ bool ViEReceiver::DeliverRtcp(const uint8_t* rtcp_packet,
uint32_t ntp_secs = 0;
uint32_t ntp_frac = 0;
uint32_t rtp_timestamp = 0;
- if (rtp_rtcp_[0]->RemoteNTP(&ntp_secs, &ntp_frac, nullptr, nullptr,
- &rtp_timestamp) != 0) {
+ if (rtp_rtcp_->RemoteNTP(&ntp_secs, &ntp_frac, nullptr, nullptr,
+ &rtp_timestamp) != 0) {
// Waiting for RTCP.
return true;
}
@@ -382,7 +379,7 @@ bool ViEReceiver::IsPacketRetransmitted(const RTPHeader& header,
return false;
// Check if this is a retransmission.
int64_t min_rtt = 0;
- rtp_rtcp_[0]->RTT(rtp_receiver_->SSRC(), nullptr, nullptr, &min_rtt, nullptr);
+ rtp_rtcp_->RTT(rtp_receiver_->SSRC(), nullptr, nullptr, &min_rtt, nullptr);
return !in_order &&
statistician->IsRetransmitOfOldPacket(header, min_rtt);
}
« no previous file with comments | « webrtc/video/vie_receiver.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698