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

@ -14,6 +14,8 @@
#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
#include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h"
#include "webrtc/modules/rtp_rtcp/interface/rtp_payload_registry.h"
#include "webrtc/modules/rtp_rtcp/interface/rtp_receiver.h"
#include "webrtc/modules/utility/interface/rtp_dump.h"
#include "webrtc/modules/video_coding/main/test/test_macros.h"
#include "webrtc/system_wrappers/interface/clock.h"
@ -34,7 +36,7 @@ VCMEncodeCompleteCallback::VCMEncodeCompleteCallback(FILE* encodedFile):
_encodeComplete(false),
_width(0),
_height(0),
_codecType(kRTPVideoNoVideo)
_codecType(kRtpVideoNone)
{
//
}
@ -73,14 +75,14 @@ VCMEncodeCompleteCallback::SendData(
rtpInfo.type.Video.width = (uint16_t)_width;
switch (_codecType)
{
case webrtc::kRTPVideoVP8:
case webrtc::kRtpVideoVp8:
rtpInfo.type.Video.codecHeader.VP8.InitRTPVideoHeaderVP8();
rtpInfo.type.Video.codecHeader.VP8.nonReference =
videoHdr->codecHeader.VP8.nonReference;
rtpInfo.type.Video.codecHeader.VP8.pictureId =
videoHdr->codecHeader.VP8.pictureId;
break;
case webrtc::kRTPVideoI420:
case webrtc::kRtpVideoI420:
break;
default:
assert(false);
@ -209,6 +211,8 @@ RTPSendCompleteCallback::RTPSendCompleteCallback(Clock* clock,
const char* filename):
_clock(clock),
_sendCount(0),
rtp_payload_registry_(NULL),
rtp_receiver_(NULL),
_rtp(NULL),
_lossPct(0),
_burstLength(0),
@ -299,7 +303,14 @@ RTPSendCompleteCallback::SendPacket(int channel, const void *data, int len)
delete packet;
return -1;
}
if (_rtp->IncomingRtpPacket(packet->data, packet->length, header) < 0)
PayloadUnion payload_specific;
if (!rtp_payload_registry_->GetPayloadSpecifics(
header.payloadType, &payload_specific)) {
return -1;
}
if (!rtp_receiver_->IncomingRtpPacket(&header, packet->data,
packet->length, payload_specific,
true))
{
delete packet;
return -1;