Breaking out receive-stats, rtp-payload-registry and rtp-receiver from the

rtp_rtcp implementation.

This refactoring significantly reduces the receive-side RTP parser and receiver
complexity, and makes it possible to implement RTX correctly by having two
instances of receive-statistics.

With this change the dead-or-alive and packet timeout APIs are removed.

TEST=trybots, vie_auto_test, voe_auto_test
BUG=1811
R=mflodman@webrtc.org, pbos@webrtc.org, xians@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4301 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
stefan@webrtc.org
2013-07-05 14:30:48 +00:00
parent d4d9480c05
commit 66b2e5c05a
98 changed files with 2840 additions and 4279 deletions

View File

@ -141,6 +141,11 @@ 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,
@ -183,7 +188,7 @@ int32_t RTCPReceiver::ResetRTT(const uint32_t remoteSSRC) {
return 0;
}
int32_t RTCPReceiver::RTT(const uint32_t remoteSSRC,
int32_t RTCPReceiver::RTT(uint32_t remoteSSRC,
uint16_t* RTT,
uint16_t* avgRTT,
uint16_t* minRTT,
@ -1410,43 +1415,4 @@ 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