Fix mismatch between different NACK list lengths and packet buffers.
This is a second version of http://review.webrtc.org/1065006/ which passes the parameters via methods instead of via constructors. BUG=1289 Review URL: https://webrtc-codereview.appspot.com/1065007 git-svn-id: http://webrtc.googlecode.com/svn/trunk@3456 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -106,7 +106,7 @@ int JitterBufferTest(CmdArgs& args)
|
||||
WebRtc_UWord8 data[1500];
|
||||
VCMPacket packet(data, size, seqNum, timeStamp, true);
|
||||
|
||||
VCMJitterBuffer jb(clock);
|
||||
VCMJitterBuffer jb(clock, -1, -1, true);
|
||||
|
||||
seqNum = 1234;
|
||||
timeStamp = 123*90;
|
||||
|
||||
@ -239,7 +239,7 @@ int MTRxTxTest(CmdArgs& args)
|
||||
FecProtectionParams delta_params = protectionCallback.DeltaFecParameters();
|
||||
FecProtectionParams key_params = protectionCallback.KeyFecParameters();
|
||||
rtp->SetFecParameters(&delta_params, &key_params);
|
||||
rtp->SetNACKStatus(nackEnabled ? kNackRtcp : kNackOff);
|
||||
rtp->SetNACKStatus(nackEnabled ? kNackRtcp : kNackOff, kMaxPacketAgeToNack);
|
||||
|
||||
vcm->SetChannelParameters((WebRtc_UWord32) bitRate,
|
||||
(WebRtc_UWord8) lossRate, rttMS);
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "rtp_player.h"
|
||||
#include "webrtc/modules/video_coding/main/test/rtp_player.h"
|
||||
|
||||
#include <cstdlib>
|
||||
#ifdef WIN32
|
||||
@ -18,9 +18,10 @@
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
#include "../source/internal_defines.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "rtp_rtcp.h"
|
||||
#include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp.h"
|
||||
#include "webrtc/modules/video_coding/main/source/internal_defines.h"
|
||||
#include "webrtc/modules/video_coding/main/test/test_util.h"
|
||||
#include "webrtc/system_wrappers/interface/clock.h"
|
||||
|
||||
using namespace webrtc;
|
||||
@ -191,7 +192,8 @@ WebRtc_Word32 RTPPlayer::Initialize(const PayloadTypeList* payloadList)
|
||||
_randVec[i] = rand();
|
||||
}
|
||||
_randVecPos = 0;
|
||||
WebRtc_Word32 ret = _rtpModule->SetNACKStatus(kNackOff);
|
||||
WebRtc_Word32 ret = _rtpModule->SetNACKStatus(kNackOff,
|
||||
kMaxPacketAgeToNack);
|
||||
if (ret < 0)
|
||||
{
|
||||
return -1;
|
||||
|
||||
@ -22,6 +22,9 @@
|
||||
#include "module_common_types.h"
|
||||
#include "testsupport/fileutils.h"
|
||||
|
||||
enum { kMaxNackListSize = 250 };
|
||||
enum { kMaxPacketAgeToNack = 450 };
|
||||
|
||||
// Class used for passing command line arguments to tests
|
||||
class CmdArgs
|
||||
{
|
||||
|
||||
@ -194,6 +194,7 @@ int RtpPlay(CmdArgs& args)
|
||||
vcm->SetVideoProtection(protectionMethod, protectionEnabled);
|
||||
vcm->SetRenderDelay(renderDelayMs);
|
||||
vcm->SetMinimumPlayoutDelay(minPlayoutDelayMs);
|
||||
vcm->SetNackSettings(kMaxNackListSize, kMaxPacketAgeToNack);
|
||||
|
||||
ret = 0;
|
||||
|
||||
|
||||
@ -84,8 +84,7 @@ int RtpPlayMT(CmdArgs& args, int releaseTestNo, webrtc::VideoCodecType releaseTe
|
||||
protection == kProtectionNack ||
|
||||
kProtectionNackFEC));
|
||||
Clock* clock = Clock::GetRealTimeClock();
|
||||
VideoCodingModule* vcm =
|
||||
VideoCodingModule::Create(1, clock);
|
||||
VideoCodingModule* vcm = VideoCodingModule::Create(1, clock);
|
||||
RtpDataCallback dataCallback(vcm);
|
||||
std::string rtpFilename;
|
||||
rtpFilename = args.inputFile;
|
||||
@ -227,6 +226,7 @@ int RtpPlayMT(CmdArgs& args, int releaseTestNo, webrtc::VideoCodecType releaseTe
|
||||
vcm->SetVideoProtection(protection, protectionEnabled);
|
||||
vcm->SetRenderDelay(renderDelayMs);
|
||||
vcm->SetMinimumPlayoutDelay(minPlayoutDelayMs);
|
||||
vcm->SetNackSettings(kMaxNackListSize, kMaxPacketAgeToNack);
|
||||
|
||||
EventWrapper& waitEvent = *EventWrapper::Create();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user