Breaking out RTP header parsing from the RTP module.
This is the first step in order to move bandwidth estimation closer to the network. The goal is to have RTP header parsing and bandwidth estimation before voice and video engine, and have a joint estimate for audio and video. Moving bandwidth estimation before the RTP module is also required for RTX. TEST=vie_auto_test, voe_auto_test, trybots. BUG=1811 R=andresp@webrtc.org, henrika@webrtc.org, mflodman@webrtc.org Review URL: https://webrtc-codereview.appspot.com/1545004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4129 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -8,13 +8,14 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "test_callbacks.h"
|
||||
#include "webrtc/modules/video_coding/main/test/test_callbacks.h"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include "common_video/libyuv/include/webrtc_libyuv.h"
|
||||
#include "rtp_dump.h"
|
||||
#include "test_macros.h"
|
||||
#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
|
||||
#include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.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"
|
||||
|
||||
namespace webrtc {
|
||||
@ -292,12 +293,15 @@ RTPSendCompleteCallback::SendPacket(int channel, const void *data, int len)
|
||||
_rtpPackets.pop_front();
|
||||
assert(_rtp); // We must have a configured RTP module for this test.
|
||||
// Send to receive side
|
||||
if (_rtp->IncomingPacket((const uint8_t*)packet->data,
|
||||
packet->length) < 0)
|
||||
RTPHeader header;
|
||||
scoped_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create());
|
||||
if (!parser->Parse(packet->data, packet->length, &header)) {
|
||||
delete packet;
|
||||
return -1;
|
||||
}
|
||||
if (_rtp->IncomingRtpPacket(packet->data, packet->length, header) < 0)
|
||||
{
|
||||
delete packet;
|
||||
packet = NULL;
|
||||
// Will return an error after the first packet that goes wrong
|
||||
return -1;
|
||||
}
|
||||
delete packet;
|
||||
|
||||
Reference in New Issue
Block a user