diff --git a/src/video_engine/main/test/AutoTest/interface/vie_autotest_defines.h b/src/video_engine/main/test/AutoTest/interface/vie_autotest_defines.h index ee0f0146fd..77ab878d96 100644 --- a/src/video_engine/main/test/AutoTest/interface/vie_autotest_defines.h +++ b/src/video_engine/main/test/AutoTest/interface/vie_autotest_defines.h @@ -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 } diff --git a/src/video_engine/main/test/AutoTest/source/tb_capture_device.cc b/src/video_engine/main/test/AutoTest/source/tb_capture_device.cc index 297a00b23f..7d23efba7d 100644 --- a/src/video_engine/main/test/AutoTest/source/tb_capture_device.cc +++ b/src/video_engine/main/test/AutoTest/source/tb_capture_device.cc @@ -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; diff --git a/src/video_engine/main/test/AutoTest/source/tb_video_channel.cc b/src/video_engine/main/test/AutoTest/source/tb_video_channel.cc index 8ceb39857a..862ec4e770 100644 --- a/src/video_engine/main/test/AutoTest/source/tb_video_channel.cc +++ b/src/video_engine/main/test/AutoTest/source/tb_video_channel.cc @@ -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__); } - diff --git a/src/video_engine/main/test/AutoTest/source/vie_autotest_base.cc b/src/video_engine/main/test/AutoTest/source/vie_autotest_base.cc index e84b2445e7..c5ad755b8f 100644 --- a/src/video_engine/main/test/AutoTest/source/vie_autotest_base.cc +++ b/src/video_engine/main/test/AutoTest/source/vie_autotest_base.cc @@ -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__); diff --git a/src/video_engine/main/test/AutoTest/source/vie_autotest_capture.cc b/src/video_engine/main/test/AutoTest/source/vie_autotest_capture.cc index 0bcd391f6b..7183a458d7 100644 --- a/src/video_engine/main/test/AutoTest/source/vie_autotest_capture.cc +++ b/src/video_engine/main/test/AutoTest/source/vie_autotest_capture.cc @@ -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__); diff --git a/src/video_engine/main/test/AutoTest/source/vie_autotest_codec.cc b/src/video_engine/main/test/AutoTest/source/vie_autotest_codec.cc index bf58bb0267..2da2fa6b04 100644 --- a/src/video_engine/main/test/AutoTest/source/vie_autotest_codec.cc +++ b/src/video_engine/main/test/AutoTest/source/vie_autotest_codec.cc @@ -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; diff --git a/src/video_engine/main/test/AutoTest/source/vie_autotest_custom_call.cc b/src/video_engine/main/test/AutoTest/source/vie_autotest_custom_call.cc index fa5008965b..627944adfb 100644 --- a/src/video_engine/main/test/AutoTest/source/vie_autotest_custom_call.cc +++ b/src/video_engine/main/test/AutoTest/source/vie_autotest_custom_call.cc @@ -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; diff --git a/src/video_engine/main/test/AutoTest/source/vie_autotest_encryption.cc b/src/video_engine/main/test/AutoTest/source/vie_autotest_encryption.cc index 49e1fa5600..1004209d04 100644 --- a/src/video_engine/main/test/AutoTest/source/vie_autotest_encryption.cc +++ b/src/video_engine/main/test/AutoTest/source/vie_autotest_encryption.cc @@ -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; //*************************************************************** diff --git a/src/video_engine/main/test/AutoTest/source/vie_autotest_file.cc b/src/video_engine/main/test/AutoTest/source/vie_autotest_file.cc index 7668c5d102..228a03ccc6 100644 --- a/src/video_engine/main/test/AutoTest/source/vie_autotest_file.cc +++ b/src/video_engine/main/test/AutoTest/source/vie_autotest_file.cc @@ -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; } - diff --git a/src/video_engine/main/test/AutoTest/source/vie_autotest_image_process.cc b/src/video_engine/main/test/AutoTest/source/vie_autotest_image_process.cc index b71d839f3c..a9178d28b1 100644 --- a/src/video_engine/main/test/AutoTest/source/vie_autotest_image_process.cc +++ b/src/video_engine/main/test/AutoTest/source/vie_autotest_image_process.cc @@ -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); diff --git a/src/video_engine/main/test/AutoTest/source/vie_autotest_loopback.cc b/src/video_engine/main/test/AutoTest/source/vie_autotest_loopback.cc index 736d952f7a..6d4af1ac6d 100644 --- a/src/video_engine/main/test/AutoTest/source/vie_autotest_loopback.cc +++ b/src/video_engine/main/test/AutoTest/source/vie_autotest_loopback.cc @@ -43,8 +43,6 @@ int VideoEngineSampleCode(void* window1, void* window2) //******************************************************** int error = 0; - bool succeeded = true; - int numberOfErrors = 0; // // Create a VideoEngine instance diff --git a/src/video_engine/main/test/AutoTest/source/vie_autotest_main.cc b/src/video_engine/main/test/AutoTest/source/vie_autotest_main.cc index ad43115338..130dc44e91 100644 --- a/src/video_engine/main/test/AutoTest/source/vie_autotest_main.cc +++ b/src/video_engine/main/test/AutoTest/source/vie_autotest_main.cc @@ -90,7 +90,7 @@ bool ViEAutoTestMain::BeginOSIndependentTesting() } else { - int dummy = scanf("%d", &testType); + scanf("%d", &testType); getchar(); } ViETest::Log(""); diff --git a/src/video_engine/main/test/AutoTest/source/vie_autotest_network.cc b/src/video_engine/main/test/AutoTest/source/vie_autotest_network.cc index 9605913022..9da87d09e5 100644 --- a/src/video_engine/main/test/AutoTest/source/vie_autotest_network.cc +++ b/src/video_engine/main/test/AutoTest/source/vie_autotest_network.cc @@ -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", diff --git a/src/video_engine/main/test/AutoTest/source/vie_autotest_render.cc b/src/video_engine/main/test/AutoTest/source/vie_autotest_render.cc index 8a8e9cb5e8..f65192980f 100644 --- a/src/video_engine/main/test/AutoTest/source/vie_autotest_render.cc +++ b/src/video_engine/main/test/AutoTest/source/vie_autotest_render.cc @@ -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 diff --git a/src/video_engine/main/test/AutoTest/source/vie_autotest_rtp_rtcp.cc b/src/video_engine/main/test/AutoTest/source/vie_autotest_rtp_rtcp.cc index d756e60d3d..1b14d06833 100644 --- a/src/video_engine/main/test/AutoTest/source/vie_autotest_rtp_rtcp.cc +++ b/src/video_engine/main/test/AutoTest/source/vie_autotest_rtp_rtcp.cc @@ -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(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__);