Update talk to 50918584.
Together with Stefan's http://review.webrtc.org/1960004/. R=mallinath@webrtc.org Review URL: https://webrtc-codereview.appspot.com/2048004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4556 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -10,7 +10,10 @@
|
||||
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
#include "webrtc/common_types.h"
|
||||
#include "webrtc/modules/rtp_rtcp/interface/receive_statistics.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/rtp_rtcp/interface/rtp_rtcp.h"
|
||||
#include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h"
|
||||
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
|
||||
@ -24,10 +27,18 @@ class LoopBackTransport : public webrtc::Transport {
|
||||
LoopBackTransport()
|
||||
: _count(0),
|
||||
_packetLoss(0),
|
||||
rtp_payload_registry_(NULL),
|
||||
rtp_receiver_(NULL),
|
||||
_rtpRtcpModule(NULL) {
|
||||
}
|
||||
void SetSendModule(RtpRtcp* rtpRtcpModule) {
|
||||
void SetSendModule(RtpRtcp* rtpRtcpModule,
|
||||
RTPPayloadRegistry* payload_registry,
|
||||
RtpReceiver* receiver,
|
||||
ReceiveStatistics* receive_statistics) {
|
||||
_rtpRtcpModule = rtpRtcpModule;
|
||||
rtp_payload_registry_ = payload_registry;
|
||||
rtp_receiver_ = receiver;
|
||||
receive_statistics_ = receive_statistics;
|
||||
}
|
||||
void DropEveryNthPacket(int n) {
|
||||
_packetLoss = n;
|
||||
@ -44,8 +55,15 @@ class LoopBackTransport : public webrtc::Transport {
|
||||
if (!parser->Parse(static_cast<const uint8_t*>(data), len, &header)) {
|
||||
return -1;
|
||||
}
|
||||
if (_rtpRtcpModule->IncomingRtpPacket(static_cast<const uint8_t*>(data),
|
||||
len, header) < 0) {
|
||||
PayloadUnion payload_specific;
|
||||
if (!rtp_payload_registry_->GetPayloadSpecifics(
|
||||
header.payloadType, &payload_specific)) {
|
||||
return -1;
|
||||
}
|
||||
receive_statistics_->IncomingPacket(header, len, false, true);
|
||||
if (!rtp_receiver_->IncomingRtpPacket(&header,
|
||||
static_cast<const uint8_t*>(data),
|
||||
len, payload_specific, true)) {
|
||||
return -1;
|
||||
}
|
||||
return len;
|
||||
@ -59,10 +77,13 @@ class LoopBackTransport : public webrtc::Transport {
|
||||
private:
|
||||
int _count;
|
||||
int _packetLoss;
|
||||
ReceiveStatistics* receive_statistics_;
|
||||
RTPPayloadRegistry* rtp_payload_registry_;
|
||||
RtpReceiver* rtp_receiver_;
|
||||
RtpRtcp* _rtpRtcpModule;
|
||||
};
|
||||
|
||||
class RtpReceiver : public RtpData {
|
||||
class TestRtpReceiver : public NullRtpData {
|
||||
public:
|
||||
|
||||
virtual int32_t OnReceivedPayloadData(
|
||||
|
Reference in New Issue
Block a user