Revert r4301

R=mikhal@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/1809004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4357 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
tnakamura@webrtc.org
2013-07-16 19:25:04 +00:00
parent 7b2f955e56
commit aa4d96a134
98 changed files with 4306 additions and 2856 deletions

View File

@ -141,11 +141,6 @@ RTCPReceiver::SetRemoteSSRC( const uint32_t ssrc)
return 0;
}
uint32_t RTCPReceiver::RemoteSSRC() const {
CriticalSectionScoped lock(_criticalSectionRTCPReceiver);
return _remoteSSRC;
}
void RTCPReceiver::RegisterRtcpObservers(
RtcpIntraFrameObserver* intra_frame_callback,
RtcpBandwidthObserver* bandwidth_callback,
@ -188,7 +183,7 @@ int32_t RTCPReceiver::ResetRTT(const uint32_t remoteSSRC) {
return 0;
}
int32_t RTCPReceiver::RTT(uint32_t remoteSSRC,
int32_t RTCPReceiver::RTT(const uint32_t remoteSSRC,
uint16_t* RTT,
uint16_t* avgRTT,
uint16_t* minRTT,
@ -1411,4 +1406,43 @@ int32_t RTCPReceiver::TMMBRReceived(const uint32_t size,
return num;
}
int32_t
RTCPReceiver::SetPacketTimeout(const uint32_t timeoutMS)
{
CriticalSectionScoped lock(_criticalSectionRTCPReceiver);
_packetTimeOutMS = timeoutMS;
return 0;
}
void RTCPReceiver::PacketTimeout()
{
if(_packetTimeOutMS == 0)
{
// not configured
return;
}
bool packetTimeOut = false;
{
CriticalSectionScoped lock(_criticalSectionRTCPReceiver);
if(_lastReceived == 0)
{
// not active
return;
}
int64_t now = _clock->TimeInMilliseconds();
if(now - _lastReceived > _packetTimeOutMS)
{
packetTimeOut = true;
_lastReceived = 0; // only one callback
}
}
CriticalSectionScoped lock(_criticalSectionFeedbacks);
if(packetTimeOut && _cbRtcpFeedback)
{
_cbRtcpFeedback->OnRTCPPacketTimeout(_id);
}
}
} // namespace webrtc