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

Unified Diff: webrtc/video/rtp_video_stream_receiver.cc

Issue 2928123002: Use the configured remote ssrc instead of relying on the first received packet. (Closed)
Patch Set: rebase Created 3 years, 6 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/rtp_video_stream_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/rtp_video_stream_receiver.cc
diff --git a/webrtc/video/rtp_video_stream_receiver.cc b/webrtc/video/rtp_video_stream_receiver.cc
index 0a946975d774e66eca2297c3d67b8a1afe9b8707..14e5958c0bb48c228582109e06fcbdeeea54c884 100644
--- a/webrtc/video/rtp_video_stream_receiver.cc
+++ b/webrtc/video/rtp_video_stream_receiver.cc
@@ -127,6 +127,7 @@ RtpVideoStreamReceiver::RtpVideoStreamReceiver(
rtp_rtcp_->SetRTCPStatus(config_.rtp.rtcp_mode);
rtp_rtcp_->SetSSRC(config_.rtp.local_ssrc);
+ rtp_rtcp_->SetRemoteSSRC(config_.rtp.remote_ssrc);
rtp_rtcp_->SetKeyFrameRequestMethod(kKeyFrameReqPliRtcp);
for (size_t i = 0; i < config_.rtp.extensions.size(); ++i) {
@@ -217,7 +218,7 @@ bool RtpVideoStreamReceiver::AddReceiveCodec(const VideoCodec& video_codec) {
}
uint32_t RtpVideoStreamReceiver::GetRemoteSsrc() const {
- return rtp_receiver_->SSRC();
+ return config_.rtp.remote_ssrc;
}
int RtpVideoStreamReceiver::GetCsrcs(uint32_t* csrcs) const {
@@ -302,10 +303,6 @@ int32_t RtpVideoStreamReceiver::OnInitializeDecoder(
return 0;
}
-void RtpVideoStreamReceiver::OnIncomingSSRCChanged(const uint32_t ssrc) {
- rtp_rtcp_->SetRemoteSSRC(ssrc);
-}
-
// This method handles both regular RTP packets and packets recovered
// via FlexFEC.
void RtpVideoStreamReceiver::OnRtpPacket(const RtpPacketReceived& packet) {
@@ -481,7 +478,7 @@ void RtpVideoStreamReceiver::ParseAndHandleEncapsulatingHeader(
return;
}
if (!rtp_payload_registry_.RestoreOriginalPacket(
- restored_packet_, packet, &packet_length, rtp_receiver_->SSRC(),
+ restored_packet_, packet, &packet_length, config_.rtp.remote_ssrc,
header)) {
LOG(LS_WARNING) << "Incoming RTX packet: Invalid RTP header ssrc: "
<< header.ssrc << " payload type: "
@@ -623,7 +620,7 @@ bool RtpVideoStreamReceiver::IsPacketRetransmitted(const RTPHeader& header,
return false;
// Check if this is a retransmission.
int64_t min_rtt = 0;
- rtp_rtcp_->RTT(rtp_receiver_->SSRC(), nullptr, nullptr, &min_rtt, nullptr);
+ rtp_rtcp_->RTT(config_.rtp.remote_ssrc, nullptr, nullptr, &min_rtt, nullptr);
return !in_order &&
statistician->IsRetransmitOfOldPacket(header, min_rtt);
}
« no previous file with comments | « webrtc/video/rtp_video_stream_receiver.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698