From 204cd560074cd6be857c32e0f8d69e77da810e57 Mon Sep 17 00:00:00 2001 From: "buildbot@webrtc.org" Date: Mon, 25 Aug 2014 21:10:18 +0000 Subject: [PATCH] (Auto)update libjingle 74064646-> 74072040 git-svn-id: http://webrtc.googlecode.com/svn/trunk@6972 4adac7df-926f-26a2-2b94-8c16560cd09d --- talk/media/webrtc/webrtcvideoengine.cc | 46 +++++++++++--------------- talk/media/webrtc/webrtcvideoengine.h | 4 +++ 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/talk/media/webrtc/webrtcvideoengine.cc b/talk/media/webrtc/webrtcvideoengine.cc index 6d6ed25fa..e9edf73dc 100644 --- a/talk/media/webrtc/webrtcvideoengine.cc +++ b/talk/media/webrtc/webrtcvideoengine.cc @@ -1560,6 +1560,7 @@ WebRtcVideoMediaChannel::WebRtcVideoMediaChannel( remb_enabled_(false), render_started_(false), first_receive_ssrc_(kSsrcUnset), + receiver_report_ssrc_(kSsrcUnset), num_unsignalled_recv_channels_(0), send_rtx_type_(-1), send_red_type_(-1), @@ -1893,21 +1894,9 @@ bool WebRtcVideoMediaChannel::AddSendStream(const StreamParams& sp) { return false; } - // At this point the channel's local SSRC has been updated. If the channel is - // the default channel make sure that all the receive channels are updated as - // well. Receive channels have to have the same SSRC as the default channel in - // order to send receiver reports with this SSRC. + // Use the SSRC of the default channel in the RTCP receiver reports. if (IsDefaultChannelId(channel_id)) { - for (RecvChannelMap::const_iterator it = recv_channels_.begin(); - it != recv_channels_.end(); ++it) { - WebRtcVideoChannelRecvInfo* info = it->second; - int channel_id = info->channel_id(); - if (engine()->vie()->rtp()->SetLocalSSRC(channel_id, - sp.first_ssrc()) != 0) { - LOG_RTCERR1(SetLocalSSRC, it->first); - return false; - } - } + SetReceiverReportSsrc(sp.first_ssrc()); } send_channel->set_stream_params(sp); @@ -3418,20 +3407,13 @@ bool WebRtcVideoMediaChannel::ConfigureReceiving(int channel_id, return false; } - if (remote_ssrc != kDefaultChannelSsrcKey) { - // Use the same SSRC as our default channel - // (so the RTCP reports are correct). - unsigned int send_ssrc = 0; - webrtc::ViERTP_RTCP* rtp = engine()->vie()->rtp(); - if (rtp->GetLocalSSRC(default_channel_id_, send_ssrc) == -1) { - LOG_RTCERR2(GetLocalSSRC, default_channel_id_, send_ssrc); + if (receiver_report_ssrc_ != kSsrcUnset) { + if (engine()->vie()->rtp()->SetLocalSSRC( + channel_id, receiver_report_ssrc_) == -1) { + LOG_RTCERR2(SetLocalSSRC, channel_id, receiver_report_ssrc_); return false; } - if (rtp->SetLocalSSRC(channel_id, send_ssrc) == -1) { - LOG_RTCERR2(SetLocalSSRC, channel_id, send_ssrc); - return false; - } - } // Else this is the the default channel and we don't change the SSRC. + } // Disable color enhancement since it is a bit too aggressive. if (engine()->vie()->image()->EnableColorEnhancement(channel_id, @@ -4171,6 +4153,18 @@ void WebRtcVideoMediaChannel::MaybeDisconnectCapturer(VideoCapturer* capturer) { } } +void WebRtcVideoMediaChannel::SetReceiverReportSsrc(uint32 ssrc) { + for (RecvChannelMap::const_iterator it = recv_channels_.begin(); + it != recv_channels_.end(); ++it) { + int channel_id = it->second->channel_id(); + if (engine()->vie()->rtp()->SetLocalSSRC(channel_id, ssrc) != 0) { + LOG_RTCERR2(SetLocalSSRC, channel_id, ssrc); + ASSERT(false); + } + } + receiver_report_ssrc_ = ssrc; +} + } // namespace cricket #endif // HAVE_WEBRTC_VIDEO diff --git a/talk/media/webrtc/webrtcvideoengine.h b/talk/media/webrtc/webrtcvideoengine.h index 7e1f4a4ff..dac1aa46a 100644 --- a/talk/media/webrtc/webrtcvideoengine.h +++ b/talk/media/webrtc/webrtcvideoengine.h @@ -421,6 +421,9 @@ class WebRtcVideoMediaChannel : public rtc::MessageHandler, bool RemoveRecvStreamInternal(uint32 ssrc); + // Set the ssrc to use for RTCP receiver reports. + void SetReceiverReportSsrc(uint32 ssrc); + // Global state. WebRtcVideoEngine* engine_; VoiceMediaChannel* voice_channel_; @@ -448,6 +451,7 @@ class WebRtcVideoMediaChannel : public rtc::MessageHandler, std::map associated_payload_types_; bool render_started_; uint32 first_receive_ssrc_; + uint32 receiver_report_ssrc_; std::vector receive_extensions_; int num_unsignalled_recv_channels_;