Removing Linux warnings for auto test.

Review URL: http://webrtc-codereview.appspot.com/116002

git-svn-id: http://webrtc.googlecode.com/svn/trunk@365 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
mflodman@webrtc.org 2011-08-15 15:50:59 +00:00
parent 3ab5d5f4d0
commit 3cbbcd98b6
15 changed files with 19 additions and 59 deletions

View File

@ -174,8 +174,7 @@ public:
#if WEBRTC_ANDROID
__android_log_write(ANDROID_LOG_DEBUG, "*WebRTCN*", _logStr);
#else
printf(_logStr);
printf("\n");
printf("%s\n",_logStr);
#endif
#endif
}

View File

@ -11,9 +11,9 @@
#include "tb_capture_device.h"
tbCaptureDevice::tbCaptureDevice(tbInterfaces& Engine, int& nrOfErrors) :
ViE(Engine),
numberOfErrors(nrOfErrors),
captureId(-1),
numberOfErrors(nrOfErrors),
ViE(Engine),
vcpm_(NULL)
{
const unsigned int KMaxDeviceNameLength = 128;

View File

@ -13,7 +13,7 @@
tbVideoChannel::tbVideoChannel(tbInterfaces& Engine, int& nrOfErrors,
webrtc::VideoCodecType sendCodec, int width,
int height, int frameRate, int startBitrate) :
ViE(Engine), numberOfErrors(nrOfErrors), videoChannel(-1)
videoChannel(-1), numberOfErrors(nrOfErrors), ViE(Engine)
{
int error;
error = ViE.ptrViEBase->CreateChannel(videoChannel);
@ -132,4 +132,3 @@ void tbVideoChannel::StopReceive()
numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d",
__FUNCTION__, __LINE__);
}

View File

@ -28,7 +28,6 @@ int ViEAutoTest::ViEBaseStandardTest()
//***************************************************************
int error = 0;
bool succeeded = true;
int numberOfErrors = 0;
ViETest::Log("Starting a loopback call...");
@ -217,7 +216,6 @@ int ViEAutoTest::ViEBaseStandardTest()
__LINE__);
char version[1024] = "";
int versionLength = 1024;
error = ptrViEBase->GetVersion(version);
ViETest::Log("\nUsing WebRTC Video Engine version: %s", version);
@ -403,7 +401,6 @@ int ViEAutoTest::ViEBaseAPITest()
//***************************************************************
int error = 0;
bool succeeded = true;
int numberOfErrors = 0;
VideoEngine* ptrViE = NULL;
@ -534,7 +531,7 @@ int ViEAutoTest::ViEBaseAPITest()
__FUNCTION__, __LINE__);
ViEBase* ptrViEBase2 = ViEBase::GetInterface(ptrViE);
numberOfErrors += ViETest::TestError(ptrViEBase != NULL,
numberOfErrors += ViETest::TestError(ptrViEBase2 != NULL,
"ERROR: %s at line %d", __FUNCTION__,
__LINE__);

View File

@ -85,7 +85,8 @@ public:
class CaptureEffectFilter: public ViEEffectFilter
{
public:
CaptureEffectFilter(int reqWidth, int reqHeight, int& numberOfErrors) :
CaptureEffectFilter(unsigned int reqWidth, unsigned int reqHeight,
int& numberOfErrors) :
_numberOfCapturedFrames(0),
_reqWidth(reqWidth),
_reqHeight(reqHeight),
@ -109,8 +110,8 @@ public:
int _numberOfCapturedFrames;
protected:
int _reqWidth;
int _reqHeight;
unsigned int _reqWidth;
unsigned int _reqHeight;
int& _numberOfErrors;
};
@ -379,7 +380,6 @@ int ViEAutoTest::ViECaptureAPITest()
WebRtc_UWord8 deviceName[128];
WebRtc_UWord8 deviceUniqueName[512];
int captureId = 0;
int dummy = 0;
VideoCaptureModule::DeviceInfo* devInfo =
VideoCaptureModule::CreateDeviceInfo(0);
@ -484,7 +484,7 @@ int ViEAutoTest::ViECaptureAPITest()
numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d",
__FUNCTION__, __LINE__);
// Release invalid capture device
// Release invalid capture device.
error = ViE.ptrViECapture->ReleaseCaptureDevice(captureId + 1);
numberOfErrors += ViETest::TestError(error == -1, "ERROR: %s at line %d",
__FUNCTION__, __LINE__);

View File

@ -129,7 +129,6 @@ int ViEAutoTest::ViECodecStandardTest()
int error = 0;
bool succeeded = true;
int numberOfErrors = 0;
tbInterfaces interfaces = tbInterfaces("ViECodecStandardTest",
@ -451,7 +450,6 @@ int ViEAutoTest::ViECodecStandardTest()
int ViEAutoTest::ViECodecExtendedTest()
{
int error = 0;
bool succeeded = true;
int numberOfErrors = 0;
{
@ -465,7 +463,6 @@ int ViEAutoTest::ViECodecExtendedTest()
tbInterfaces interfaces = tbInterfaces("ViECodecExtendedTest",
numberOfErrors);
VideoEngine* ptrViE = interfaces.ptrViE;
ViEBase* ptrViEBase = interfaces.ptrViEBase;
ViECapture* ptrViECapture = interfaces.ptrViECapture;
ViERender* ptrViERender = interfaces.ptrViERender;
@ -898,7 +895,6 @@ int ViEAutoTest::ViECodecAPITest()
//***************************************************************
int error = 0;
bool succeeded = true;
int numberOfErrors = 0;
VideoEngine* ptrViE = NULL;

View File

@ -29,7 +29,6 @@ int ViEAutoTest::ViECustomCall()
ViETest::Log(" Enter values to use custom settings\n");
int error = 0;
bool succeeded = true;
int numberOfErrors = 0;
std::string str;
@ -107,7 +106,6 @@ int ViEAutoTest::ViECustomCall()
int videoTxPort = 0;
int videoRxPort = 0;
int videoChannel = -1;
int codecIdx = 0;
webrtc::VideoCodec videoCodec;
char audioCaptureDeviceName[KMaxUniqueIdLength] = "";
char audioPlaybackDeviceName[KMaxUniqueIdLength] = "";
@ -684,7 +682,6 @@ bool ViEAutoTest::GetAudioDevices(VoEBase* ptrVEBase,
{
int error = 0;
int numberOfErrors = 0;
int captureDeviceIndex = 0;
std::string str;
const unsigned int KMaxDeviceNameLength = 128;
@ -821,7 +818,6 @@ bool ViEAutoTest::GetAudioDevices(VoEBase* ptrVEBase,
// general settings functions
bool ViEAutoTest::GetIPAddress(char* iIP)
{
int error = 0;
char oIP[16] = DEFAULT_SEND_IP;
std::string str;
@ -865,7 +861,6 @@ bool ViEAutoTest::ValidateIP(std::string iStr)
// video settings functions
bool ViEAutoTest::GetVideoPorts(int* txPort, int* rxPort)
{
int error = 0;
std::string str;
int port = 0;
@ -1019,7 +1014,6 @@ bool ViEAutoTest::GetVideoCodec(ViECodec* ptrViECodec,
// audio settings functions
bool ViEAutoTest::GetAudioPorts(int* txPort, int* rxPort)
{
int error = 0;
int port = 0;
std::string str;

View File

@ -85,7 +85,6 @@ int ViEAutoTest::ViEEncryptionStandardTest()
//***************************************************************
int error = 0;
bool succeeded = true;
int numberOfErrors = 0;
// Create VIE
@ -246,7 +245,6 @@ int ViEAutoTest::ViEEncryptionExtendedTest()
//***************************************************************
int error = 0;
bool succeeded = true;
int numberOfErrors = 0;
// Create VIE
@ -476,7 +474,6 @@ int ViEAutoTest::ViEEncryptionAPITest()
int error = 0;
bool succeeded = true;
int numberOfErrors = 0;
//***************************************************************

View File

@ -48,7 +48,6 @@ int ViEAutoTest::ViEFileStandardTest()
int error = 0;
bool succeeded = true;
int numberOfErrors = 0;
{
@ -245,7 +244,6 @@ int ViEAutoTest::ViEFileStandardTest()
const int RENDER_TIMEOUT = 1000;
const int TEST_SPACING = 1000;
const int UI_UPDATE_INTERVAL = 2000;
const int VIDEO_LENGTH = 5000;
@ -855,4 +853,3 @@ int ViEAutoTest::ViEFileAPITest()
ViETest::Log(" ");
return 0;
}

View File

@ -50,7 +50,6 @@ int ViEAutoTest::ViEImageProcessStandardTest()
int error = 0;
bool succeeded = true;
int numberOfErrors = 0;
int rtpPort = 6000;
@ -209,8 +208,6 @@ int ViEAutoTest::ViEImageProcessExtendedTest()
ViETest::Log("========================================");
ViETest::Log(" ViEImageProcess Extended Test\n");
int error = 0;
bool succeeded = true;
int numberOfErrors = 0;
numberOfErrors = ViEImageProcessStandardTest();
@ -240,10 +237,8 @@ int ViEAutoTest::ViEImageProcessAPITest()
ViETest::Log(" ViEImageProcess API Test\n");
int error = 0;
bool succeeded = true;
int numberOfErrors = 0;
int rtpPort = 6000;
tbInterfaces ViE("ViEImageProcessAPITest", numberOfErrors);
tbVideoChannel tbChannel(ViE, numberOfErrors, webrtc::kVideoCodecVP8);
tbCaptureDevice tbCapture(ViE, numberOfErrors);

View File

@ -43,8 +43,6 @@ int VideoEngineSampleCode(void* window1, void* window2)
//********************************************************
int error = 0;
bool succeeded = true;
int numberOfErrors = 0;
//
// Create a VideoEngine instance

View File

@ -90,7 +90,7 @@ bool ViEAutoTestMain::BeginOSIndependentTesting()
}
else
{
int dummy = scanf("%d", &testType);
scanf("%d", &testType);
getchar();
}
ViETest::Log("");

View File

@ -48,7 +48,6 @@ public:
int ViEAutoTest::ViENetworkStandardTest()
{
int error = 0;
bool succeeded = true;
int numberOfErrors = 0;
tbInterfaces ViE("ViENetworkStandardTest", numberOfErrors); // Create VIE
@ -214,7 +213,6 @@ int ViEAutoTest::ViENetworkExtendedTest()
int numberOfErrors = ViENetworkStandardTest();
int error = 0;
bool succeeded = true;
tbInterfaces ViE("ViENetworkExtendedTest", numberOfErrors); // Create VIE
tbCaptureDevice tbCapture(ViE, numberOfErrors);
@ -283,7 +281,7 @@ int ViEAutoTest::ViENetworkExtendedTest()
ViETest::Log("On Win7 and late Vista, you need to right click the "
"exe and choose");
ViETest::Log("\"Run as administrator\"\n");
int dummyChar = getchar();
getchar();
}
numberOfErrors += ViETest::TestError(error == 0,
"ERROR: %s at line %d",
@ -385,7 +383,6 @@ int ViEAutoTest::ViENetworkAPITest()
int error = 0;
bool succeeded = true;
int numberOfErrors = 0;
tbInterfaces ViE("ViENetworkAPITest", numberOfErrors); // Create VIE
@ -412,7 +409,6 @@ int ViEAutoTest::ViENetworkAPITest()
"ERROR: %s at line %d",
__FUNCTION__, __LINE__);
unsigned char packet[1500];
void* ptrPacket = (void*) packet;
packet[0] = 0x80; // V=2, P=0, X=0, CC=0
packet[1] = 0x78; // M=0, PT = 120 (VP8)
error = ViE.ptrViENetwork->ReceivedRTPPacket(tbChannel.videoChannel,
@ -748,7 +744,7 @@ int ViEAutoTest::ViENetworkAPITest()
ViETest::Log("On Win7 and late Vista, you need to right click the "
"exe and choose");
ViETest::Log("\"Run as administrator\"\n");
int dummyChar = getchar();
getchar();
}
numberOfErrors += ViETest::TestError(error == 0,
"ERROR: %s at line %d",

View File

@ -87,7 +87,6 @@ int ViEAutoTest::ViERenderStandardTest()
int error = 0;
bool succeeded = true;
int numberOfErrors = 0;
int rtpPort = 6000;
@ -251,7 +250,6 @@ int ViEAutoTest::ViERenderExtendedTest()
ViETest::Log(" ViERender Extended Test\n");
int error = 0;
bool succeeded = true;
int numberOfErrors = 0;
int rtpPort = 6000;
@ -476,7 +474,6 @@ int ViEAutoTest::ViERenderAPITest()
ViETest::Log("========================================");
ViETest::Log(" ViERender API Test\n");
int error = 0;
int numberOfErrors = 0;
//TODO add the real tests cases

View File

@ -99,10 +99,8 @@ int ViEAutoTest::ViERtpRtcpStandardTest()
//***************************************************************
int error = 0;
bool succeeded = true;
int numberOfErrors = 0;
int rtpPort = 6000;
// Create VIE
tbInterfaces ViE("ViERtpRtcpStandardTest", numberOfErrors);
// Create a video channel
@ -309,8 +307,10 @@ int ViEAutoTest::ViERtpRtcpStandardTest()
WebRtc_Word32 numDroppedPackets = 0;
WebRtc_Word32 numRtcpPackets = 0;
myTransport.GetStats(numRtpPackets, numDroppedPackets, numRtcpPackets);
numberOfErrors += ViETest::TestError(numRtpPackets == KAutoTestSleepTimeMs
/ (1000 * deltaTimeSeconds), "ERROR: %s at line %d", __FUNCTION__,
WebRtc_Word32 expectedPackets = KAutoTestSleepTimeMs / 1000 *
static_cast<WebRtc_Word32>(deltaTimeSeconds);
numberOfErrors += ViETest::TestError(numRtpPackets == expectedPackets,
"ERROR: %s at line %d", __FUNCTION__,
__LINE__);
// Test to set SSRC
@ -455,12 +455,10 @@ int ViEAutoTest::ViERtpRtcpExtendedTest()
int error = 0;
bool succeeded = true;
int numberOfErrors = 0;
numberOfErrors = ViERtpRtcpStandardTest();
int rtpPort = 6000;
// Create VIE
tbInterfaces ViE("ViERtpRtcpStandardTest", numberOfErrors);
// Create a video channel
@ -568,10 +566,8 @@ int ViEAutoTest::ViERtpRtcpAPITest()
int error = 0;
bool succeeded = true;
int numberOfErrors = 0;
int rtpPort = 6000;
// Create VIE
tbInterfaces ViE("ViERtpRtcpAPITest", numberOfErrors);
// Create a video channel
@ -785,9 +781,8 @@ int ViEAutoTest::ViERtpRtcpAPITest()
numberOfErrors += ViETest::TestError(error == 0,
"ERROR: %s at line %d",
__FUNCTION__, __LINE__);
numberOfErrors += ViETest::TestError((enabled == true,
setPT == getPT,
setDeltaTime == getDeltaTime),
numberOfErrors += ViETest::TestError((enabled == true && setPT == getPT
&& setDeltaTime == getDeltaTime),
"ERROR: %s at line %d",
__FUNCTION__, __LINE__);