diff --git a/src/video_engine/main/test/AutoTest/interface/tb_interfaces.h b/src/video_engine/main/test/AutoTest/interface/tb_interfaces.h index e03781593..cc7e46927 100644 --- a/src/video_engine/main/test/AutoTest/interface/tb_interfaces.h +++ b/src/video_engine/main/test/AutoTest/interface/tb_interfaces.h @@ -24,8 +24,6 @@ #include "vie_encryption.h" #include "vie_defines.h" -//using namespace webrtc; - class tbInterfaces { public: diff --git a/src/video_engine/main/test/AutoTest/interface/vie_autotest.h b/src/video_engine/main/test/AutoTest/interface/vie_autotest.h index d17ee8b7f..f9adf3880 100644 --- a/src/video_engine/main/test/AutoTest/interface/vie_autotest.h +++ b/src/video_engine/main/test/AutoTest/interface/vie_autotest.h @@ -37,8 +37,6 @@ #include #endif -using namespace webrtc; - class ViEAutoTest { public: @@ -54,7 +52,8 @@ public: int ViECustomCall(); // general settings functions - bool GetVideoDevice(ViEBase* ptrViEBase, ViECapture* ptrViECapture, + bool GetVideoDevice(webrtc::ViEBase* ptrViEBase, + webrtc::ViECapture* ptrViECapture, char* captureDeviceName, char* captureDeviceUniqueId); bool GetIPAddress(char* IP); #ifndef WEBRTC_ANDROID @@ -70,16 +69,20 @@ public: // video settings functions bool GetVideoPorts(int* txPort, int* rxPort); - bool GetVideoCodec(ViECodec* ptrViECodec, webrtc::VideoCodec& videoCodec); + bool GetVideoCodec(webrtc::ViECodec* ptrViECodec, + webrtc::VideoCodec& videoCodec); // audio settings functions - bool GetAudioDevices(VoEBase* ptrVEBase, VoEHardware* ptrVEHardware, + bool GetAudioDevices(webrtc::VoEBase* ptrVEBase, + webrtc::VoEHardware* ptrVEHardware, char* recordingDeviceName, int& recordingDeviceIndex, char* playbackDeviceName, int& playbackDeviceIndex); - bool GetAudioDevices(VoEBase* ptrVEBase, VoEHardware* ptrVEHardware, + bool GetAudioDevices(webrtc::VoEBase* ptrVEBase, + webrtc::VoEHardware* ptrVEHardware, int& recordingDeviceIndex, int& playbackDeviceIndex); bool GetAudioPorts(int* txPort, int* rxPort); - bool GetAudioCodec(VoECodec* ptrVeCodec, CodecInst& audioCodec); + bool GetAudioCodec(webrtc::VoECodec* ptrVeCodec, + webrtc::CodecInst& audioCodec); // vie_autotest_base.cc int ViEBaseStandardTest(); @@ -135,9 +138,9 @@ private: void* _window1; void* _window2; - VideoRenderType _renderType; - VideoRender* _vrm1; - VideoRender* _vrm2; + webrtc::VideoRenderType _renderType; + webrtc::VideoRender* _vrm1; + webrtc::VideoRender* _vrm2; }; #endif // WEBRTC_VIDEO_ENGINE_MAIN_TEST_AUTOTEST_INTERFACE_VIE_AUTOTEST_H_ diff --git a/src/video_engine/main/test/AutoTest/interface/vie_autotest_main.h b/src/video_engine/main/test/AutoTest/interface/vie_autotest_main.h index 43ce35815..ba73c684b 100644 --- a/src/video_engine/main/test/AutoTest/interface/vie_autotest_main.h +++ b/src/video_engine/main/test/AutoTest/interface/vie_autotest_main.h @@ -13,22 +13,20 @@ #include -using namespace std; - class ViEAutoTestMain { public: ViEAutoTestMain(); bool BeginOSIndependentTesting(); - bool GetAnswer(int index, string& answer); + bool GetAnswer(int index, std::string& answer); int GetClassTestSelection(); - bool GetNextAnswer(string& answer); + bool GetNextAnswer(std::string& answer); bool IsUsingAnswerFile(); bool UseAnswerFile(const char* fileName); private: - string _answers[1024]; + std::string _answers[1024]; int _answersCount; int _answersIndex; bool _useAnswerFile; diff --git a/src/video_engine/main/test/AutoTest/source/tb_external_transport.cc b/src/video_engine/main/test/AutoTest/source/tb_external_transport.cc index 35d7a95ac..67f2ed564 100644 --- a/src/video_engine/main/test/AutoTest/source/tb_external_transport.cc +++ b/src/video_engine/main/test/AutoTest/source/tb_external_transport.cc @@ -35,21 +35,27 @@ #pragma warning(disable: 4355) // 'this' : used in base member initializer list #endif -using namespace webrtc; - -tbExternalTransport::tbExternalTransport(ViENetwork& vieNetwork) : +tbExternalTransport::tbExternalTransport(webrtc::ViENetwork& vieNetwork) : _vieNetwork(vieNetwork), - _thread(*ThreadWrapper::CreateThread(ViEExternalTransportRun, this, - kHighPriority, - "AutotestTransport")), - _event(*EventWrapper::Create()), - _crit(*CriticalSectionWrapper::CreateCriticalSection()), - _statCrit(*CriticalSectionWrapper::CreateCriticalSection()), - _lossRate(0), _networkDelayMs(0), _rtpCount(0), _rtcpCount(0), - _dropCount(0), _rtpPackets(), _rtcpPackets(), _checkSSRC(false), - _lastSSRC(0), _checkSequenceNumber(0), _firstSequenceNumber(0) + _thread(*webrtc::ThreadWrapper::CreateThread( + ViEExternalTransportRun, this, webrtc::kHighPriority, + "AutotestTransport")), + _event(*webrtc::EventWrapper::Create()), + _crit(*webrtc::CriticalSectionWrapper::CreateCriticalSection()), + _statCrit(*webrtc::CriticalSectionWrapper::CreateCriticalSection()), + _lossRate(0), + _networkDelayMs(0), + _rtpCount(0), + _rtcpCount(0), + _dropCount(0), + _rtpPackets(), + _rtcpPackets(), + _checkSSRC(false), + _lastSSRC(0), + _checkSequenceNumber(0), + _firstSequenceNumber(0) { - srand((int) TickTime::MicrosecondTimestamp()); + srand((int) webrtc::TickTime::MicrosecondTimestamp()); unsigned int tId = 0; _thread.Start(tId); } @@ -117,21 +123,21 @@ int tbExternalTransport::SendRTCPPacket(int channel, const void *data, int len) WebRtc_Word32 tbExternalTransport::SetPacketLoss(WebRtc_Word32 lossRate) { - CriticalSectionScoped cs(_statCrit); + webrtc::CriticalSectionScoped cs(_statCrit); _lossRate = lossRate; return 0; } void tbExternalTransport::SetNetworkDelay(WebRtc_Word64 delayMs) { - CriticalSectionScoped cs(_crit); + webrtc::CriticalSectionScoped cs(_crit); _networkDelayMs = delayMs; return; } void tbExternalTransport::ClearStats() { - CriticalSectionScoped cs(_statCrit); + webrtc::CriticalSectionScoped cs(_statCrit); _rtpCount = 0; _dropCount = 0; _rtcpCount = 0; @@ -142,7 +148,7 @@ void tbExternalTransport::GetStats(WebRtc_Word32& numRtpPackets, WebRtc_Word32& numDroppedPackets, WebRtc_Word32& numRtcpPackets) { - CriticalSectionScoped cs(_statCrit); + webrtc::CriticalSectionScoped cs(_statCrit); numRtpPackets = _rtpCount; numDroppedPackets = _dropCount; numRtcpPackets = _rtcpCount; @@ -151,24 +157,24 @@ void tbExternalTransport::GetStats(WebRtc_Word32& numRtpPackets, void tbExternalTransport::EnableSSRCCheck() { - CriticalSectionScoped cs(_statCrit); + webrtc::CriticalSectionScoped cs(_statCrit); _checkSSRC = true; } unsigned int tbExternalTransport::ReceivedSSRC() { - CriticalSectionScoped cs(_statCrit); + webrtc::CriticalSectionScoped cs(_statCrit); return _lastSSRC; } void tbExternalTransport::EnableSequenceNumberCheck() { - CriticalSectionScoped cs(_statCrit); + webrtc::CriticalSectionScoped cs(_statCrit); _checkSequenceNumber = true; } unsigned short tbExternalTransport::GetFirstSequenceNumber() { - CriticalSectionScoped cs(_statCrit); + webrtc::CriticalSectionScoped cs(_statCrit); return _firstSequenceNumber; } @@ -206,7 +212,7 @@ bool tbExternalTransport::ViEExternalTransportProcess() if (packet) { { - CriticalSectionScoped cs(_statCrit); + webrtc::CriticalSectionScoped cs(_statCrit); if (_checkSSRC) { _lastSSRC = ((packet->packetBuffer[8]) << 24); @@ -264,5 +270,5 @@ bool tbExternalTransport::ViEExternalTransportProcess() WebRtc_Word64 tbExternalTransport::NowMs() { - return TickTime::MillisecondTimestamp(); + return webrtc::TickTime::MillisecondTimestamp(); } diff --git a/src/video_engine/main/test/AutoTest/source/vie_autotest.cc b/src/video_engine/main/test/AutoTest/source/vie_autotest.cc index 9b966f4cf..8fa1799b8 100644 --- a/src/video_engine/main/test/AutoTest/source/vie_autotest.cc +++ b/src/video_engine/main/test/AutoTest/source/vie_autotest.cc @@ -25,9 +25,11 @@ char* ViETest::_logStr = NULL; ViEAutoTest::ViEAutoTest(void* window1, void* window2) : _window1(window1), _window2(window2), - _renderType(kRenderDefault), - _vrm1(VideoRender::CreateVideoRender(4561, window1, false, _renderType)), - _vrm2(VideoRender::CreateVideoRender(4562, window2, false, _renderType)) + _renderType(webrtc::kRenderDefault), + _vrm1(webrtc::VideoRender::CreateVideoRender( + 4561, window1, false, _renderType)), + _vrm2(webrtc::VideoRender::CreateVideoRender( + 4562, window2, false, _renderType)) { assert(_vrm1); assert(_vrm2); @@ -37,9 +39,9 @@ ViEAutoTest::ViEAutoTest(void* window1, void* window2) : ViEAutoTest::~ViEAutoTest() { - VideoRender::DestroyVideoRender(_vrm1); + webrtc::VideoRender::DestroyVideoRender(_vrm1); _vrm1 = NULL; - VideoRender::DestroyVideoRender(_vrm2); + webrtc::VideoRender::DestroyVideoRender(_vrm2); _vrm2 = NULL; ViETest::Terminate(); @@ -110,7 +112,6 @@ int ViEAutoTest::ViEAPITest() void ViEAutoTest::PrintVideoCodec(const webrtc::VideoCodec videoCodec) { - using namespace std; ViETest::Log("Video Codec Information:"); switch (videoCodec.codecType) @@ -142,15 +143,6 @@ void ViEAutoTest::PrintVideoCodec(const webrtc::VideoCodec videoCodec) break; } - //cout << "\tcodecSpecific: " << videoCodec.codecSpecific << endl; - //switch(videoCodec.codecSpecific) - //{ - // webrtc::VideoCodecH263 H263; - // webrtc::VideoCodecVP8 VP8; - // webrtc::VideoCodecMPEG4 MPEG4; - // webrtc::VideoCodecGeneric Generic; - //} - ViETest::Log("\theight: %u", videoCodec.height); ViETest::Log("\tmaxBitrate: %u", videoCodec.maxBitrate); ViETest::Log("\tmaxFramerate: %u", videoCodec.maxFramerate); @@ -164,7 +156,6 @@ void ViEAutoTest::PrintVideoCodec(const webrtc::VideoCodec videoCodec) void ViEAutoTest::PrintAudioCodec(const webrtc::CodecInst audioCodec) { - using namespace std; ViETest::Log("Audio Codec Information:"); ViETest::Log("\tchannels: %u", audioCodec.channels); ViETest::Log("\t: %u", audioCodec.pacsize); 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 c5ad755b8..4e54d0f19 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 @@ -32,8 +32,8 @@ int ViEAutoTest::ViEBaseStandardTest() ViETest::Log("Starting a loopback call..."); - VideoEngine* ptrViE = NULL; - ptrViE = VideoEngine::Create(); + webrtc::VideoEngine* ptrViE = NULL; + ptrViE = webrtc::VideoEngine::Create(); numberOfErrors += ViETest::TestError(ptrViE != NULL, "ERROR: %s at line %d", __FUNCTION__, __LINE__); @@ -47,7 +47,7 @@ int ViEAutoTest::ViEBaseStandardTest() numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); #endif - ViEBase* ptrViEBase = ViEBase::GetInterface(ptrViE); + webrtc::ViEBase* ptrViEBase = webrtc::ViEBase::GetInterface(ptrViE); numberOfErrors += ViETest::TestError(ptrViEBase != NULL, "ERROR: %s at line %d", __FUNCTION__, __LINE__); @@ -65,12 +65,12 @@ int ViEAutoTest::ViEBaseStandardTest() numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); - ViECapture* ptrViECapture = ViECapture::GetInterface(ptrViE); + webrtc::ViECapture* ptrViECapture = webrtc::ViECapture::GetInterface(ptrViE); numberOfErrors += ViETest::TestError(ptrViECapture != NULL, "ERROR: %s at line %d", __FUNCTION__, __LINE__); - VideoCaptureModule* vcpm(NULL); + webrtc::VideoCaptureModule* vcpm(NULL); const unsigned int KMaxDeviceNameLength = 128; const unsigned int KMaxUniqueIdLength = 256; @@ -81,8 +81,8 @@ int ViEAutoTest::ViEBaseStandardTest() bool captureDeviceSet = false; int captureId = 0; - VideoCaptureModule::DeviceInfo* devInfo = - VideoCaptureModule::CreateDeviceInfo(0); + webrtc::VideoCaptureModule::DeviceInfo* devInfo = + webrtc::VideoCaptureModule::CreateDeviceInfo(0); for (unsigned int captureIdx = 0; captureIdx < devInfo->NumberOfDevices(); @@ -95,7 +95,7 @@ int ViEAutoTest::ViEBaseStandardTest() "ERROR: %s at line %d", __FUNCTION__, __LINE__); - vcpm = VideoCaptureModule::Create(4571, uniqueId); + vcpm = webrtc::VideoCaptureModule::Create(4571, uniqueId); numberOfErrors += ViETest::TestError(vcpm != NULL, "ERROR: %s at line %d", __FUNCTION__, __LINE__); @@ -110,11 +110,11 @@ int ViEAutoTest::ViEBaseStandardTest() } else { - VideoCaptureModule::Destroy(vcpm); + webrtc::VideoCaptureModule::Destroy(vcpm); vcpm = NULL; } } - VideoCaptureModule::DestroyDeviceInfo(devInfo); + webrtc::VideoCaptureModule::DestroyDeviceInfo(devInfo); numberOfErrors+= ViETest::TestError( captureDeviceSet, @@ -129,17 +129,19 @@ int ViEAutoTest::ViEBaseStandardTest() numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); - ViERTP_RTCP* ptrViERtpRtcp = ViERTP_RTCP::GetInterface(ptrViE); + webrtc::ViERTP_RTCP* ptrViERtpRtcp = + webrtc::ViERTP_RTCP::GetInterface(ptrViE); numberOfErrors += ViETest::TestError(ptrViE != NULL, "ERROR: %s at line %d", __FUNCTION__, __LINE__); - error = ptrViERtpRtcp->SetRTCPStatus(videoChannel, kRtcpCompound_RFC4585); + error = ptrViERtpRtcp->SetRTCPStatus(videoChannel, + webrtc::kRtcpCompound_RFC4585); numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); - error = ptrViERtpRtcp->SetKeyFrameRequestMethod(videoChannel, - kViEKeyFrameRequestPliRtcp); + error = ptrViERtpRtcp->SetKeyFrameRequestMethod( + videoChannel, webrtc::kViEKeyFrameRequestPliRtcp); numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); @@ -147,7 +149,7 @@ int ViEAutoTest::ViEBaseStandardTest() numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); - ViERender* ptrViERender = ViERender::GetInterface(ptrViE); + webrtc::ViERender* ptrViERender = webrtc::ViERender::GetInterface(ptrViE); numberOfErrors += ViETest::TestError(ptrViERender != NULL, "ERROR: %s at line %d", __FUNCTION__, __LINE__); @@ -179,7 +181,7 @@ int ViEAutoTest::ViEBaseStandardTest() numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); - ViECodec* ptrViECodec = ViECodec::GetInterface(ptrViE); + webrtc::ViECodec* ptrViECodec = webrtc::ViECodec::GetInterface(ptrViE); numberOfErrors += ViETest::TestError(ptrViECodec != NULL, "ERROR: %s at line %d", __FUNCTION__, __LINE__); @@ -210,7 +212,8 @@ int ViEAutoTest::ViEBaseStandardTest() __FUNCTION__, __LINE__); } - ViENetwork* ptrViENetwork = ViENetwork::GetInterface(ptrViE); + webrtc::ViENetwork* ptrViENetwork = + webrtc::ViENetwork::GetInterface(ptrViE); numberOfErrors += ViETest::TestError(ptrViENetwork != NULL, "ERROR: %s at line %d", __FUNCTION__, __LINE__); @@ -311,7 +314,7 @@ int ViEAutoTest::ViEBaseStandardTest() numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); - VideoCaptureModule::Destroy(vcpm); + webrtc::VideoCaptureModule::Destroy(vcpm); vcpm = NULL; remainingInterfaces = ptrViECapture->Release(); @@ -348,7 +351,7 @@ int ViEAutoTest::ViEBaseStandardTest() "ERROR: %s at line %d", __FUNCTION__, __LINE__); - bool deleted = VideoEngine::Delete(ptrViE); + bool deleted = webrtc::VideoEngine::Delete(ptrViE); numberOfErrors += ViETest::TestError(deleted == true, "ERROR: %s at line %d", __FUNCTION__, __LINE__); @@ -403,14 +406,14 @@ int ViEAutoTest::ViEBaseAPITest() int error = 0; int numberOfErrors = 0; - VideoEngine* ptrViE = NULL; - ViEBase* ptrViEBase = NULL; + webrtc::VideoEngine* ptrViE = NULL; + webrtc::ViEBase* ptrViEBase = NULL; // Get the ViEBase API - ptrViEBase = ViEBase::GetInterface(ptrViE); + ptrViEBase = webrtc::ViEBase::GetInterface(ptrViE); numberOfErrors += ViETest::TestError(ptrViEBase == NULL); - ptrViE = VideoEngine::Create(); + ptrViE = webrtc::VideoEngine::Create(); numberOfErrors += ViETest::TestError(ptrViE != NULL, "VideoEngine::Create"); #ifdef WEBRTC_ANDROID @@ -425,7 +428,7 @@ int ViEAutoTest::ViEBaseAPITest() numberOfErrors += ViETest::TestError(error == 0, "SetTraceFile error"); #endif - ptrViEBase = ViEBase::GetInterface(ptrViE); + ptrViEBase = webrtc::ViEBase::GetInterface(ptrViE); numberOfErrors += ViETest::TestError(ptrViEBase != NULL); //*************************************************************** @@ -478,16 +481,16 @@ int ViEAutoTest::ViEBaseAPITest() __FUNCTION__, __LINE__); // VoiceEngine - VoiceEngine* ptrVoE = NULL; - VoEBase* ptrVoEBase = NULL; + webrtc::VoiceEngine* ptrVoE = NULL; + webrtc::VoEBase* ptrVoEBase = NULL; int audioChannel = -1; - ptrVoE = VoiceEngine::Create(); + ptrVoE = webrtc::VoiceEngine::Create(); numberOfErrors += ViETest::TestError(ptrVoE != NULL, "ERROR: %s at line %d", __FUNCTION__, __LINE__); - ptrVoEBase = VoEBase::GetInterface(ptrVoE); + ptrVoEBase = webrtc::VoEBase::GetInterface(ptrVoE); numberOfErrors += ViETest::TestError(ptrVoEBase != NULL, "ERROR: %s at line %d", __FUNCTION__, __LINE__); @@ -530,7 +533,7 @@ int ViEAutoTest::ViEBaseAPITest() numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); - ViEBase* ptrViEBase2 = ViEBase::GetInterface(ptrViE); + webrtc::ViEBase* ptrViEBase2 = webrtc::ViEBase::GetInterface(ptrViE); numberOfErrors += ViETest::TestError(ptrViEBase2 != NULL, "ERROR: %s at line %d", __FUNCTION__, __LINE__); @@ -540,7 +543,7 @@ int ViEAutoTest::ViEBaseAPITest() "ERROR: %s at line %d", __FUNCTION__, __LINE__); - bool vieDeleted = VideoEngine::Delete(ptrViE); + bool vieDeleted = webrtc::VideoEngine::Delete(ptrViE); numberOfErrors += ViETest::TestError(vieDeleted == false, "ERROR: %s at line %d", __FUNCTION__, __LINE__); @@ -550,7 +553,7 @@ int ViEAutoTest::ViEBaseAPITest() "ERROR: %s at line %d", __FUNCTION__, __LINE__); - vieDeleted = VideoEngine::Delete(ptrViE); + vieDeleted = webrtc::VideoEngine::Delete(ptrViE); numberOfErrors += ViETest::TestError(vieDeleted == true, "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 7183a458d..668b48750 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 @@ -30,26 +30,27 @@ #include "tb_video_channel.h" #include "video_capture.h" -class CaptureObserver: public ViECaptureObserver +class CaptureObserver: public webrtc::ViECaptureObserver { public: CaptureObserver() : - _brightness(Normal), _alarm(AlarmCleared), _frameRate(0) - {} + _brightness(webrtc::Normal), + _alarm(webrtc::AlarmCleared), + _frameRate(0) {} virtual void BrightnessAlarm(const int captureId, - const Brightness brightness) + const webrtc::Brightness brightness) { _brightness = brightness; switch (brightness) { - case Normal: + case webrtc::Normal: ViETest::Log(" BrightnessAlarm Normal"); break; - case Bright: + case webrtc::Bright: ViETest::Log(" BrightnessAlarm Bright"); break; - case Dark: + case webrtc::Dark: ViETest::Log(" BrightnessAlarm Dark"); break; default: @@ -64,10 +65,11 @@ public: _frameRate = frameRate; } - virtual void NoPictureAlarm(const int captureId, const CaptureAlarm alarm) + virtual void NoPictureAlarm(const int captureId, + const webrtc::CaptureAlarm alarm) { _alarm = alarm; - if (alarm == AlarmRaised) + if (alarm == webrtc::AlarmRaised) { ViETest::Log("NoPictureAlarm CARaised."); } @@ -77,12 +79,12 @@ public: } } - Brightness _brightness; - CaptureAlarm _alarm; + webrtc::Brightness _brightness; + webrtc::CaptureAlarm _alarm; unsigned char _frameRate; }; -class CaptureEffectFilter: public ViEEffectFilter +class CaptureEffectFilter: public webrtc::ViEEffectFilter { public: CaptureEffectFilter(unsigned int reqWidth, unsigned int reqHeight, @@ -135,8 +137,8 @@ int ViEAutoTest::ViECaptureStandardTest() int error = 0; tbInterfaces ViE("WebRTCViECapture_Standard", numberOfErrors); - VideoCaptureModule::DeviceInfo* devInfo = - VideoCaptureModule::CreateDeviceInfo(0); + webrtc::VideoCaptureModule::DeviceInfo* devInfo = + webrtc::VideoCaptureModule::CreateDeviceInfo(0); int numberOfCaptureDevices = devInfo->NumberOfDevices(); ViETest::Log("Number of capture devices %d", numberOfCaptureDevices); @@ -145,7 +147,7 @@ int ViEAutoTest::ViECaptureStandardTest() __LINE__); int captureDeviceId[10]; - VideoCaptureModule* vcpms[10]; + webrtc::VideoCaptureModule* vcpms[10]; memset(vcpms, 0, sizeof(vcpms)); //Check capabilities @@ -186,7 +188,7 @@ int ViEAutoTest::ViECaptureStandardTest() capIndex < numberOfCapabilities; ++capIndex) { - VideoCaptureCapability capability; + webrtc::VideoCaptureCapability capability; error = devInfo->GetCapability(deviceUniqueName, capIndex, capability); numberOfErrors += ViETest::TestError(error == 0, @@ -226,8 +228,8 @@ int ViEAutoTest::ViECaptureStandardTest() "ERROR: %s at line %d", __FUNCTION__, __LINE__); - VideoCaptureModule* vcpm = VideoCaptureModule::Create(deviceIndex, - deviceUniqueName); + webrtc::VideoCaptureModule* vcpm = + webrtc::VideoCaptureModule::Create(deviceIndex, deviceUniqueName); numberOfErrors += ViETest::TestError(vcpm != NULL, "ERROR: %s at line %d", __FUNCTION__, __LINE__); @@ -238,7 +240,7 @@ int ViEAutoTest::ViECaptureStandardTest() numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); - VideoCaptureCapability capability; + webrtc::VideoCaptureCapability capability; error = devInfo->GetCapability(deviceUniqueName, 0, capability); // Test that the camera select the closest capability to the selected @@ -256,7 +258,7 @@ int ViEAutoTest::ViECaptureStandardTest() capability.height = capability.height - 2; capability.width = capability.width - 2; - CaptureCapability vieCapability; + webrtc::CaptureCapability vieCapability; vieCapability.width = capability.width; vieCapability.height = capability.height; vieCapability.codecType = capability.codecType; @@ -267,10 +269,10 @@ int ViEAutoTest::ViECaptureStandardTest() vieCapability); numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); - TickTime startTime = TickTime::Now(); + webrtc::TickTime startTime = webrtc::TickTime::Now(); while (filter._numberOfCapturedFrames < 10 - && (TickTime::Now() - startTime).Milliseconds() < 10000) + && (webrtc::TickTime::Now() - startTime).Milliseconds() < 10000) { AutoTestSleep(100); } @@ -321,7 +323,7 @@ int ViEAutoTest::ViECaptureStandardTest() numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); #endif - VideoCaptureModule::Destroy(vcpms[deviceIndex]); + webrtc::VideoCaptureModule::Destroy(vcpms[deviceIndex]); } #endif if (numberOfErrors > 0) @@ -334,7 +336,7 @@ int ViEAutoTest::ViECaptureStandardTest() ViETest::Log(" "); return numberOfErrors; } - VideoCaptureModule::DestroyDeviceInfo(devInfo); + webrtc::VideoCaptureModule::DestroyDeviceInfo(devInfo); ViETest::Log(" "); ViETest::Log(" ViECapture Standard Test PASSED!"); @@ -381,8 +383,8 @@ int ViEAutoTest::ViECaptureAPITest() WebRtc_UWord8 deviceUniqueName[512]; int captureId = 0; - VideoCaptureModule::DeviceInfo* devInfo = - VideoCaptureModule::CreateDeviceInfo(0); + webrtc::VideoCaptureModule::DeviceInfo* devInfo = + webrtc::VideoCaptureModule::CreateDeviceInfo(0); numberOfErrors += ViETest::TestError(devInfo != NULL, "ERROR: %s at line %d", __FUNCTION__, __LINE__); @@ -393,7 +395,8 @@ int ViEAutoTest::ViECaptureAPITest() numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); - VideoCaptureModule* vcpm = VideoCaptureModule::Create(0, deviceUniqueName); + webrtc::VideoCaptureModule* vcpm = + webrtc::VideoCaptureModule::Create(0, deviceUniqueName); numberOfErrors += ViETest::TestError(vcpm != NULL, "ERROR: %s at line %d", __FUNCTION__, __LINE__); @@ -506,43 +509,43 @@ int ViEAutoTest::ViECaptureAPITest() __FUNCTION__, __LINE__); // Test GetOrientation - VideoCaptureRotation orientation; + webrtc::VideoCaptureRotation orientation; WebRtc_UWord8 dummy_name[5]; error = devInfo->GetOrientation(dummy_name, orientation); numberOfErrors += ViETest::TestError(error == -1, "ERROR: %s at line %d", __FUNCTION__, __LINE__); //Test SetRotation - error = ViE.ptrViECapture->SetRotateCapturedFrames(captureId, - RotateCapturedFrame_90); + error = ViE.ptrViECapture->SetRotateCapturedFrames( + captureId, webrtc::RotateCapturedFrame_90); numberOfErrors += ViETest::TestError(error == -1, "ERROR: %s at line %d", __FUNCTION__, __LINE__); - numberOfErrors += ViETest::TestError(ViE.LastError() - == kViECaptureDeviceDoesnNotExist, "ERROR: %s at line %d", - __FUNCTION__, __LINE__); + numberOfErrors += ViETest::TestError( + ViE.LastError() == kViECaptureDeviceDoesnNotExist, + "ERROR: %s at line %d", __FUNCTION__, __LINE__); // Allocate capture device error = ViE.ptrViECapture->AllocateCaptureDevice(*vcpm, captureId); numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); - error = ViE.ptrViECapture->SetRotateCapturedFrames(captureId, - RotateCapturedFrame_0); + error = ViE.ptrViECapture->SetRotateCapturedFrames( + captureId, webrtc::RotateCapturedFrame_0); numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); - error = ViE.ptrViECapture->SetRotateCapturedFrames(captureId, - RotateCapturedFrame_90); + error = ViE.ptrViECapture->SetRotateCapturedFrames( + captureId, webrtc::RotateCapturedFrame_90); numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); - error = ViE.ptrViECapture->SetRotateCapturedFrames(captureId, - RotateCapturedFrame_180); + error = ViE.ptrViECapture->SetRotateCapturedFrames( + captureId, webrtc::RotateCapturedFrame_180); numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); - error = ViE.ptrViECapture->SetRotateCapturedFrames(captureId, - RotateCapturedFrame_270); + error = ViE.ptrViECapture->SetRotateCapturedFrames( + captureId, webrtc::RotateCapturedFrame_270); numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); @@ -551,8 +554,8 @@ int ViEAutoTest::ViECaptureAPITest() numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); - VideoCaptureModule::DestroyDeviceInfo(devInfo); - VideoCaptureModule::Destroy(vcpm); + webrtc::VideoCaptureModule::DestroyDeviceInfo(devInfo); + webrtc::VideoCaptureModule::Destroy(vcpm); //*************************************************************** // Testing finished. Tear down Video Engine @@ -596,11 +599,12 @@ int ViEAutoTest::ViECaptureExternalCaptureTest() channel.StartReceive(); channel.StartSend(); - VideoCaptureExternal* externalCapture; + webrtc::VideoCaptureExternal* externalCapture; int captureId = 0; // Allocate the external capture device - VideoCaptureModule* vcpm = VideoCaptureModule::Create(0, externalCapture); + webrtc::VideoCaptureModule* vcpm = + webrtc::VideoCaptureModule::Create(0, externalCapture); numberOfErrors += ViETest::TestError(vcpm != NULL, "ERROR: %s at line %d", __FUNCTION__, __LINE__); @@ -675,10 +679,10 @@ int ViEAutoTest::ViECaptureExternalCaptureTest() // } int frameCount = 0; - VideoCaptureCapability capability; + webrtc::VideoCaptureCapability capability; capability.width = 176; capability.height = 144; - capability.rawType = kVideoI420; + capability.rawType = webrtc::kVideoI420; ViETest::Log("Testing external capturing and frame rate callbacks."); // TODO: Change when using a real file! @@ -688,17 +692,17 @@ int ViEAutoTest::ViECaptureExternalCaptureTest() externalCapture->IncomingFrame( videoFrame, videoFrameLength, capability, - TickTime::Now().MillisecondTimestamp()); + webrtc::TickTime::Now().MillisecondTimestamp()); AutoTestSleep(33); if (effectFilter._numberOfCapturedFrames > 2) { // make sure brigthness or no picture alarm has not been triggered - numberOfErrors += ViETest::TestError(observer._brightness == Normal, - "ERROR: %s at line %d", - __FUNCTION__, __LINE__); numberOfErrors += ViETest::TestError( - observer._alarm == AlarmCleared, "ERROR: %s at line %d", + observer._brightness == webrtc::Normal, "ERROR: %s at line %d", + __FUNCTION__, __LINE__); + numberOfErrors += ViETest::TestError( + observer._alarm == webrtc::AlarmCleared, "ERROR: %s at line %d", __FUNCTION__, __LINE__); } frameCount++; @@ -718,10 +722,10 @@ int ViEAutoTest::ViECaptureExternalCaptureTest() { externalCapture->IncomingFrame( videoFrame, videoFrameLength, capability, - TickTime::Now().MillisecondTimestamp()); + webrtc::TickTime::Now().MillisecondTimestamp()); AutoTestSleep(33); } - numberOfErrors += ViETest::TestError(observer._brightness == Bright, + numberOfErrors += ViETest::TestError(observer._brightness == webrtc::Bright, "ERROR: %s at line %d", __FUNCTION__, __LINE__); @@ -734,10 +738,10 @@ int ViEAutoTest::ViECaptureExternalCaptureTest() { externalCapture->IncomingFrame( videoFrame, videoFrameLength, capability, - TickTime::Now().MillisecondTimestamp()); + webrtc::TickTime::Now().MillisecondTimestamp()); AutoTestSleep(33); } - numberOfErrors += ViETest::TestError(observer._brightness == Dark, + numberOfErrors += ViETest::TestError(observer._brightness == webrtc::Dark, "ERROR: %s at line %d", __FUNCTION__, __LINE__); @@ -755,19 +759,19 @@ int ViEAutoTest::ViECaptureExternalCaptureTest() // Test no picture alarm ViETest::Log("Testing NoPictureAlarm."); AutoTestSleep(1050); - numberOfErrors += ViETest::TestError(observer._alarm == AlarmRaised, + numberOfErrors += ViETest::TestError(observer._alarm == webrtc::AlarmRaised, "ERROR: %s at line %d", __FUNCTION__, __LINE__); for (int frame = 0; frame < 10; ++frame) { externalCapture->IncomingFrame( videoFrame, videoFrameLength, capability, - TickTime::Now().MillisecondTimestamp()); + webrtc::TickTime::Now().MillisecondTimestamp()); AutoTestSleep(33); } - numberOfErrors += ViETest::TestError(observer._alarm == AlarmCleared, - "ERROR: %s at line %d", __FUNCTION__, - __LINE__); + numberOfErrors += ViETest::TestError( + observer._alarm == webrtc::AlarmCleared, "ERROR: %s at line %d", + __FUNCTION__, __LINE__); delete videoFrame; 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 2da2fa6b0..f1ead3955 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 @@ -29,8 +29,8 @@ #include "vie_rtp_rtcp.h" #include "voe_base.h" -class ViEAutotestCodecObserever: public ViEEncoderObserver, - public ViEDecoderObserver +class ViEAutotestCodecObserever: public webrtc::ViEEncoderObserver, + public webrtc::ViEDecoderObserver { public: int incomingCodecCalled; @@ -96,7 +96,7 @@ public: } }; -class ViEAutoTestEffectFilter: public ViEEffectFilter +class ViEAutoTestEffectFilter: public webrtc::ViEEffectFilter { public: int numFrames; @@ -137,13 +137,13 @@ int ViEAutoTest::ViECodecStandardTest() tbCaptureDevice captureDevice = tbCaptureDevice(interfaces, numberOfErrors); int captureId = captureDevice.captureId; - VideoEngine* ptrViE = interfaces.ptrViE; - ViEBase* ptrViEBase = interfaces.ptrViEBase; - ViECapture* ptrViECapture = interfaces.ptrViECapture; - ViERender* ptrViERender = interfaces.ptrViERender; - ViECodec* ptrViECodec = interfaces.ptrViECodec; - ViERTP_RTCP* ptrViERtpRtcp = interfaces.ptrViERtpRtcp; - ViENetwork* ptrViENetwork = interfaces.ptrViENetwork; + webrtc::VideoEngine* ptrViE = interfaces.ptrViE; + webrtc::ViEBase* ptrViEBase = interfaces.ptrViEBase; + webrtc::ViECapture* ptrViECapture = interfaces.ptrViECapture; + webrtc::ViERender* ptrViERender = interfaces.ptrViERender; + webrtc::ViECodec* ptrViECodec = interfaces.ptrViECodec; + webrtc::ViERTP_RTCP* ptrViERtpRtcp = interfaces.ptrViERtpRtcp; + webrtc::ViENetwork* ptrViENetwork = interfaces.ptrViENetwork; int videoChannel = -1; error = ptrViEBase->CreateChannel(videoChannel); @@ -154,12 +154,13 @@ int ViEAutoTest::ViECodecStandardTest() numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); - error = ptrViERtpRtcp->SetRTCPStatus(videoChannel, kRtcpCompound_RFC4585); + error = ptrViERtpRtcp->SetRTCPStatus(videoChannel, + webrtc::kRtcpCompound_RFC4585); numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); - error = ptrViERtpRtcp->SetKeyFrameRequestMethod(videoChannel, - kViEKeyFrameRequestPliRtcp); + error = ptrViERtpRtcp->SetKeyFrameRequestMethod( + videoChannel, webrtc::kViEKeyFrameRequestPliRtcp); numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); @@ -204,7 +205,7 @@ int ViEAutoTest::ViECodecStandardTest() videoCodec.width = 640; videoCodec.height = 480; } - if(videoCodec.codecType==kVideoCodecI420) + if(videoCodec.codecType == webrtc::kVideoCodecI420) { videoCodec.width=176; videoCodec.height=144; @@ -251,7 +252,8 @@ int ViEAutoTest::ViECodecStandardTest() // Make sure all codecs runs // { - ViEImageProcess* ptrViEImageProcess = ViEImageProcess::GetInterface(ptrViE); + webrtc::ViEImageProcess* ptrViEImageProcess = + webrtc::ViEImageProcess::GetInterface(ptrViE); ViEAutotestCodecObserever codecObserver; error = ptrViECodec->RegisterDecoderObserver(videoChannel, codecObserver); @@ -269,8 +271,9 @@ int ViEAutoTest::ViECodecStandardTest() __FUNCTION__, __LINE__); if (videoCodec.codecType != webrtc::kVideoCodecMPEG4) { - if(videoCodec.codecType==kVideoCodecI420) // Lower resolution to sockkets keep up. + if(videoCodec.codecType == webrtc::kVideoCodecI420) { + // Lower resolution to sockkets keep up. videoCodec.width=176; videoCodec.height=144; videoCodec.maxFramerate=15; @@ -300,7 +303,7 @@ int ViEAutoTest::ViECodecStandardTest() int maxNumberOfRenderedFrames = videoCodec.maxFramerate * KAutoTestSleepTimeMs / 1000; - if(videoCodec.codecType==kVideoCodecI420) + if(videoCodec.codecType == webrtc::kVideoCodecI420) { // Due to that I420 needs a huge bandwidht- rate control can set frame rate very low. // This happen since we use the same channel as we just tested with vp8. @@ -463,12 +466,12 @@ int ViEAutoTest::ViECodecExtendedTest() tbInterfaces interfaces = tbInterfaces("ViECodecExtendedTest", numberOfErrors); - ViEBase* ptrViEBase = interfaces.ptrViEBase; - ViECapture* ptrViECapture = interfaces.ptrViECapture; - ViERender* ptrViERender = interfaces.ptrViERender; - ViECodec* ptrViECodec = interfaces.ptrViECodec; - ViERTP_RTCP* ptrViERtpRtcp = interfaces.ptrViERtpRtcp; - ViENetwork* ptrViENetwork = interfaces.ptrViENetwork; + webrtc::ViEBase* ptrViEBase = interfaces.ptrViEBase; + webrtc::ViECapture* ptrViECapture = interfaces.ptrViECapture; + webrtc::ViERender* ptrViERender = interfaces.ptrViERender; + webrtc::ViECodec* ptrViECodec = interfaces.ptrViECodec; + webrtc::ViERTP_RTCP* ptrViERtpRtcp = interfaces.ptrViERtpRtcp; + webrtc::ViENetwork* ptrViENetwork = interfaces.ptrViENetwork; tbCaptureDevice captureDevice = tbCaptureDevice(interfaces, numberOfErrors); @@ -484,13 +487,12 @@ int ViEAutoTest::ViECodecExtendedTest() __FUNCTION__, __LINE__); error = ptrViERtpRtcp->SetRTCPStatus(videoChannel, - kRtcpCompound_RFC4585); + webrtc::kRtcpCompound_RFC4585); numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); - error - = ptrViERtpRtcp->SetKeyFrameRequestMethod(videoChannel, - kViEKeyFrameRequestPliRtcp); + error = ptrViERtpRtcp->SetKeyFrameRequestMethod( + videoChannel, webrtc::kViEKeyFrameRequestPliRtcp); numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); @@ -635,9 +637,8 @@ int ViEAutoTest::ViECodecExtendedTest() tbCapture.ConnectTo(videoChannel1); - error - = ViE.ptrViERtpRtcp->SetKeyFrameRequestMethod( - videoChannel1, kViEKeyFrameRequestPliRtcp); + error = ViE.ptrViERtpRtcp->SetKeyFrameRequestMethod( + videoChannel1, webrtc::kViEKeyFrameRequestPliRtcp); numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); @@ -709,7 +710,7 @@ int ViEAutoTest::ViECodecExtendedTest() __FUNCTION__, __LINE__); error = ViE.ptrViERtpRtcp->SetKeyFrameRequestMethod( - videoChannel2, kViEKeyFrameRequestPliRtcp); + videoChannel2, webrtc::kViEKeyFrameRequestPliRtcp); numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); @@ -794,7 +795,7 @@ int ViEAutoTest::ViECodecExtendedTest() __FUNCTION__, __LINE__); error = ViE.ptrViERtpRtcp->SetKeyFrameRequestMethod( - videoChannel3, kViEKeyFrameRequestPliRtcp); + videoChannel3, webrtc::kViEKeyFrameRequestPliRtcp); numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); @@ -897,12 +898,12 @@ int ViEAutoTest::ViECodecAPITest() int error = 0; int numberOfErrors = 0; - VideoEngine* ptrViE = NULL; - ptrViE = VideoEngine::Create(); + webrtc::VideoEngine* ptrViE = NULL; + ptrViE = webrtc::VideoEngine::Create(); numberOfErrors += ViETest::TestError(ptrViE != NULL, "ERROR: %s at line %d", __FUNCTION__, __LINE__); - ViEBase* ptrViEBase = ViEBase::GetInterface(ptrViE); + webrtc::ViEBase* ptrViEBase = webrtc::ViEBase::GetInterface(ptrViE); numberOfErrors += ViETest::TestError(ptrViEBase != NULL, "ERROR: %s at line %d", __FUNCTION__, __LINE__); @@ -916,7 +917,7 @@ int ViEAutoTest::ViECodecAPITest() numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); - ViECodec* ptrViECodec = ViECodec::GetInterface(ptrViE); + webrtc::ViECodec* ptrViECodec = webrtc::ViECodec::GetInterface(ptrViE); numberOfErrors += ViETest::TestError(ptrViECodec != NULL, "ERROR: %s at line %d", __FUNCTION__, __LINE__); @@ -992,7 +993,7 @@ int ViEAutoTest::ViECodecAPITest() "ERROR: %s at line %d", __FUNCTION__, __LINE__); - bool deleted = VideoEngine::Delete(ptrViE); + bool deleted = webrtc::VideoEngine::Delete(ptrViE); numberOfErrors += ViETest::TestError(deleted == true, "ERROR: %s at line %d", __FUNCTION__, __LINE__); 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 627944adf..f8812f528 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 @@ -33,12 +33,12 @@ int ViEAutoTest::ViECustomCall() std::string str; // VoE - VoiceEngine* ptrVE = VoiceEngine::Create(); + webrtc::VoiceEngine* ptrVE = webrtc::VoiceEngine::Create(); numberOfErrors += ViETest::TestError(ptrVE != NULL, "ERROR: %s at line %d", __FUNCTION__, __LINE__); - VoEBase* ptrVEBase = VoEBase::GetInterface(ptrVE); - numberOfErrors += ViETest::TestError(ptrVEBase != NULL, + webrtc::VoEBase* ptrVEBase = webrtc::VoEBase::GetInterface(ptrVE); + numberOfErrors += ViETest::TestError(ptrVEBase != NULL, "ERROR: %s at line %d", __FUNCTION__, __LINE__); @@ -46,29 +46,30 @@ int ViEAutoTest::ViECustomCall() numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); - VoECodec* ptrVECodec = VoECodec::GetInterface(ptrVE); + webrtc::VoECodec* ptrVECodec = webrtc::VoECodec::GetInterface(ptrVE); numberOfErrors += ViETest::TestError(ptrVECodec != NULL, "ERROR: %s at line %d", __FUNCTION__, __LINE__); - VoEHardware* ptrVEHardware = VoEHardware::GetInterface(ptrVE); + webrtc::VoEHardware* ptrVEHardware = + webrtc::VoEHardware::GetInterface(ptrVE); numberOfErrors += ViETest::TestError(ptrVEHardware != NULL, "ERROR: %s at line %d", __FUNCTION__, __LINE__); - VoEAudioProcessing* ptrVEAPM = VoEAudioProcessing::GetInterface(ptrVE); + webrtc::VoEAudioProcessing* ptrVEAPM = + webrtc::VoEAudioProcessing::GetInterface(ptrVE); numberOfErrors += ViETest::TestError(ptrVEAPM != NULL, "ERROR: %s at line %d", __FUNCTION__, __LINE__); // ViE - VideoEngine* ptrViE = NULL; - ptrViE = VideoEngine::Create(); + webrtc::VideoEngine* ptrViE = webrtc::VideoEngine::Create(); numberOfErrors += ViETest::TestError(ptrViE != NULL, "ERROR: %s at line %d", __FUNCTION__, __LINE__); - ViEBase* ptrViEBase = ViEBase::GetInterface(ptrViE); + webrtc::ViEBase* ptrViEBase = webrtc::ViEBase::GetInterface(ptrViE); numberOfErrors += ViETest::TestError(ptrViEBase != NULL, "ERROR: %s at line %d", __FUNCTION__, __LINE__); @@ -77,22 +78,24 @@ int ViEAutoTest::ViECustomCall() numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); - ViECapture* ptrViECapture = ViECapture::GetInterface(ptrViE); + webrtc::ViECapture* ptrViECapture = + webrtc::ViECapture::GetInterface(ptrViE); numberOfErrors += ViETest::TestError(ptrViECapture != NULL, "ERROR: %s at line %d", __FUNCTION__, __LINE__); - ViERender* ptrViERender = ViERender::GetInterface(ptrViE); + webrtc::ViERender* ptrViERender = webrtc::ViERender::GetInterface(ptrViE); numberOfErrors += ViETest::TestError(ptrViERender != NULL, "ERROR: %s at line %d", __FUNCTION__, __LINE__); - ViECodec* ptrViECodec = ViECodec::GetInterface(ptrViE); + webrtc::ViECodec* ptrViECodec = webrtc::ViECodec::GetInterface(ptrViE); numberOfErrors += ViETest::TestError(ptrViECodec != NULL, "ERROR: %s at line %d", __FUNCTION__, __LINE__); - ViENetwork* ptrViENetwork = ViENetwork::GetInterface(ptrViE); + webrtc::ViENetwork* ptrViENetwork = + webrtc::ViENetwork::GetInterface(ptrViE); numberOfErrors += ViETest::TestError(ptrViENetwork != NULL, "ERROR: %s at line %d", __FUNCTION__, __LINE__); @@ -237,12 +240,12 @@ int ViEAutoTest::ViECustomCall() "ERROR: %s at line %d", __FUNCTION__, __LINE__); - error = ptrVEAPM->SetAgcStatus(true, kAgcDefault); + error = ptrVEAPM->SetAgcStatus(true, webrtc::kAgcDefault); numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); - error = ptrVEAPM->SetNsStatus(true, kNsHighSuppression); + error = ptrVEAPM->SetNsStatus(true, webrtc::kNsHighSuppression); numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); @@ -286,19 +289,20 @@ int ViEAutoTest::ViECustomCall() "ERROR: %s at line %d", __FUNCTION__, __LINE__); - ViERTP_RTCP* ptrViERtpRtcp = ViERTP_RTCP::GetInterface(ptrViE); + webrtc::ViERTP_RTCP* ptrViERtpRtcp = + webrtc::ViERTP_RTCP::GetInterface(ptrViE); numberOfErrors += ViETest::TestError(ptrViE != NULL, "ERROR: %s at line %d", __FUNCTION__, __LINE__); error = ptrViERtpRtcp->SetRTCPStatus(videoChannel, - kRtcpCompound_RFC4585); + webrtc::kRtcpCompound_RFC4585); numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); error = ptrViERtpRtcp->SetKeyFrameRequestMethod( - videoChannel, kViEKeyFrameRequestPliRtcp); + videoChannel, webrtc::kViEKeyFrameRequestPliRtcp); numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); @@ -578,7 +582,7 @@ int ViEAutoTest::ViECustomCall() "ERROR: %s at line %d", __FUNCTION__, __LINE__); - bool deleted = VideoEngine::Delete(ptrViE); + bool deleted = webrtc::VideoEngine::Delete(ptrViE); numberOfErrors += ViETest::TestError(deleted == true, "ERROR: %s at line %d", __FUNCTION__, __LINE__); @@ -591,8 +595,8 @@ int ViEAutoTest::ViECustomCall() return numberOfErrors; } -bool ViEAutoTest::GetVideoDevice(ViEBase* ptrViEBase, - ViECapture* ptrViECapture, +bool ViEAutoTest::GetVideoDevice(webrtc::ViEBase* ptrViEBase, + webrtc::ViECapture* ptrViECapture, char* captureDeviceName, char* captureDeviceUniqueId) { @@ -673,8 +677,8 @@ bool ViEAutoTest::GetVideoDevice(ViEBase* ptrViEBase, } } -bool ViEAutoTest::GetAudioDevices(VoEBase* ptrVEBase, - VoEHardware* ptrVEHardware, +bool ViEAutoTest::GetAudioDevices(webrtc::VoEBase* ptrVEBase, + webrtc::VoEHardware* ptrVEHardware, char* recordingDeviceName, int& recordingDeviceIndex, char* playbackDeviceName, @@ -926,7 +930,8 @@ bool ViEAutoTest::GetVideoPorts(int* txPort, int* rxPort) assert(false); return false; } -bool ViEAutoTest::GetVideoCodec(ViECodec* ptrViECodec, + +bool ViEAutoTest::GetVideoCodec(webrtc::ViECodec* ptrViECodec, webrtc::VideoCodec& videoCodec) { int error = 0; 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 1004209d0..4a08247fa 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 @@ -21,7 +21,7 @@ #include "tb_interfaces.h" #include "tb_video_channel.h" -class ViEAutotestEncryption: public Encryption +class ViEAutotestEncryption: public webrtc::Encryption { public: ViEAutotestEncryption() 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 228a03ccc..b95926d00 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 @@ -21,10 +21,7 @@ #include "voe_codec.h" -// TODO: remove using ... -using namespace std; - -class ViEAutotestFileObserver: public ViEFileObserver +class ViEAutotestFileObserver: public webrtc::ViEFileObserver { public: ViEAutotestFileObserver() {}; @@ -56,13 +53,13 @@ int ViEAutoTest::ViEFileStandardTest() tbInterfaces interfaces = tbInterfaces("ViEFileStandardTest", numberOfErrors); - VideoEngine* ptrViE = interfaces.ptrViE; - ViEBase* ptrViEBase = interfaces.ptrViEBase; - ViECapture* ptrViECapture = interfaces.ptrViECapture; - ViERender* ptrViERender = interfaces.ptrViERender; - ViECodec* ptrViECodec = interfaces.ptrViECodec; - ViERTP_RTCP* ptrViERtpRtcp = interfaces.ptrViERtpRtcp; - ViENetwork* ptrViENetwork = interfaces.ptrViENetwork; + webrtc::VideoEngine* ptrViE = interfaces.ptrViE; + webrtc::ViEBase* ptrViEBase = interfaces.ptrViEBase; + webrtc::ViECapture* ptrViECapture = interfaces.ptrViECapture; + webrtc::ViERender* ptrViERender = interfaces.ptrViERender; + webrtc::ViECodec* ptrViECodec = interfaces.ptrViECodec; + webrtc::ViERTP_RTCP* ptrViERtpRtcp = interfaces.ptrViERtpRtcp; + webrtc::ViENetwork* ptrViENetwork = interfaces.ptrViENetwork; tbCaptureDevice captureDevice = tbCaptureDevice(interfaces, numberOfErrors); @@ -82,14 +79,14 @@ int ViEAutoTest::ViEFileStandardTest() __FUNCTION__, __LINE__); error = ptrViERtpRtcp->SetRTCPStatus(videoChannel, - kRtcpCompound_RFC4585); + webrtc::kRtcpCompound_RFC4585); numberOfErrors += ViETest::TestError(error == 0, "ERROR:%d %s at line %d", ptrViEBase->LastError(), __FUNCTION__, __LINE__); error = ptrViERtpRtcp->SetKeyFrameRequestMethod( - videoChannel, kViEKeyFrameRequestPliRtcp); + videoChannel, webrtc::kViEKeyFrameRequestPliRtcp); numberOfErrors += ViETest::TestError(error == 0, "ERROR:%d %s at line %d", ptrViEBase->LastError(), @@ -204,14 +201,14 @@ int ViEAutoTest::ViEFileStandardTest() ptrViEBase->LastError(), __FUNCTION__, __LINE__); - ViEFile* ptrViEFile = ViEFile::GetInterface(ptrViE); + webrtc::ViEFile* ptrViEFile = webrtc::ViEFile::GetInterface(ptrViE); numberOfErrors += ViETest::TestError(error == 0, "ERROR:%d %s at line %d", ptrViEBase->LastError(), __FUNCTION__, __LINE__); - VoiceEngine* ptrVEEngine = VoiceEngine::Create(); - VoEBase* ptrVEBase = VoEBase::GetInterface(ptrVEEngine); + webrtc::VoiceEngine* ptrVEEngine = webrtc::VoiceEngine::Create(); + webrtc::VoEBase* ptrVEBase = webrtc::VoEBase::GetInterface(ptrVEEngine); ptrVEBase->Init(); int audioChannel = ptrVEBase->CreateChannel(); @@ -256,9 +253,9 @@ int ViEAutoTest::ViEFileStandardTest() const char outgoingVideo[1024] = VIE_TEST_FILES_ROOT "outgoingVideo.avi"; char snapshotRenderFileName[256] = VIE_TEST_FILES_ROOT "snapshotRenderer.jpg"; - ViEPicture capturePicture; - ViEPicture renderPicture; - ViEPicture renderTimeoutPicture; // TODO: init with and image + webrtc::ViEPicture capturePicture; + webrtc::ViEPicture renderPicture; + webrtc::ViEPicture renderTimeoutPicture; // TODO: init with and image ViEAutotestFileObserver fileObserver; int fileId; @@ -272,7 +269,8 @@ int ViEAutoTest::ViEFileStandardTest() error = ptrViEFile->StartRecordIncomingVideo(videoChannel, incomingVideo, - NO_AUDIO, audioCodec2, + webrtc::NO_AUDIO, + audioCodec2, videoCodec); numberOfErrors += ViETest::TestError(error == 0, "ERROR:%d %s at line %d", @@ -393,7 +391,8 @@ int ViEAutoTest::ViEFileStandardTest() "seconds", VIDEO_LENGTH); error = ptrViEFile->StartRecordOutgoingVideo(videoChannel, outgoingVideo, - NO_AUDIO, audioCodec2, + webrtc::NO_AUDIO, + audioCodec2, videoCodec); numberOfErrors += ViETest::TestError(error == 0, "ERROR:%d %s at line %d", 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 a9178d28b..0d584beac 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 @@ -21,7 +21,7 @@ #include "tb_video_channel.h" #include "tb_capture_device.h" -class MyEffectFilter: public ViEEffectFilter +class MyEffectFilter: public webrtc::ViEEffectFilter { public: MyEffectFilter() {} 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 e0ea3cc22..78b87b12d 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 @@ -47,8 +47,8 @@ int VideoEngineSampleCode(void* window1, void* window2) // // Create a VideoEngine instance // - VideoEngine* ptrViE = NULL; - ptrViE = VideoEngine::Create(); + webrtc::VideoEngine* ptrViE = NULL; + ptrViE = webrtc::VideoEngine::Create(); if (ptrViE == NULL) { printf("ERROR in VideoEngine::Create\n"); @@ -89,7 +89,7 @@ int VideoEngineSampleCode(void* window1, void* window2) // // Init VideoEngine and create a channel // - ViEBase* ptrViEBase = ViEBase::GetInterface(ptrViE); + webrtc::ViEBase* ptrViEBase = webrtc::ViEBase::GetInterface(ptrViE); if (ptrViEBase == NULL) { printf("ERROR in ViEBase::GetInterface\n"); @@ -114,7 +114,8 @@ int VideoEngineSampleCode(void* window1, void* window2) // // List available capture devices, allocate and connect. // - ViECapture* ptrViECapture = ViECapture::GetInterface(ptrViE); + webrtc::ViECapture* ptrViECapture = + webrtc::ViECapture::GetInterface(ptrViE); if (ptrViEBase == NULL) { printf("ERROR in ViECapture::GetInterface\n"); @@ -191,22 +192,24 @@ int VideoEngineSampleCode(void* window1, void* window2) // // RTP/RTCP settings // - ViERTP_RTCP* ptrViERtpRtcp = ViERTP_RTCP::GetInterface(ptrViE); + webrtc::ViERTP_RTCP* ptrViERtpRtcp = + webrtc::ViERTP_RTCP::GetInterface(ptrViE); if (ptrViERtpRtcp == NULL) { printf("ERROR in ViERTP_RTCP::GetInterface\n"); return -1; } - error = ptrViERtpRtcp->SetRTCPStatus(videoChannel, kRtcpCompound_RFC4585); + error = ptrViERtpRtcp->SetRTCPStatus(videoChannel, + webrtc::kRtcpCompound_RFC4585); if (error == -1) { printf("ERROR in ViERTP_RTCP::SetRTCPStatus\n"); return -1; } - error = ptrViERtpRtcp->SetKeyFrameRequestMethod(videoChannel, - kViEKeyFrameRequestPliRtcp); + error = ptrViERtpRtcp->SetKeyFrameRequestMethod( + videoChannel, webrtc::kViEKeyFrameRequestPliRtcp); if (error == -1) { printf("ERROR in ViERTP_RTCP::SetKeyFrameRequestMethod\n"); @@ -223,7 +226,7 @@ int VideoEngineSampleCode(void* window1, void* window2) // // Set up rendering // - ViERender* ptrViERender = ViERender::GetInterface(ptrViE); + webrtc::ViERender* ptrViERender = webrtc::ViERender::GetInterface(ptrViE); if (ptrViERender == NULL) { printf("ERROR in ViERender::GetInterface\n"); @@ -263,7 +266,7 @@ int VideoEngineSampleCode(void* window1, void* window2) // // Setup codecs // - ViECodec* ptrViECodec = ViECodec::GetInterface(ptrViE); + webrtc::ViECodec* ptrViECodec = webrtc::ViECodec::GetInterface(ptrViE); if (ptrViECodec == NULL) { printf("ERROR in ViECodec::GetInterface\n"); @@ -425,7 +428,8 @@ int VideoEngineSampleCode(void* window1, void* window2) // // Address settings // - ViENetwork* ptrViENetwork = ViENetwork::GetInterface(ptrViE); + webrtc::ViENetwork* ptrViENetwork = + webrtc::ViENetwork::GetInterface(ptrViE); if (ptrViENetwork == NULL) { printf("ERROR in ViENetwork::GetInterface\n"); @@ -600,7 +604,7 @@ int VideoEngineSampleCode(void* window1, void* window2) return -1; } - bool deleted = VideoEngine::Delete(ptrViE); + bool deleted = webrtc::VideoEngine::Delete(ptrViE); if (deleted == false) { printf("ERROR in VideoEngine::Delete\n"); 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 324c16665..6d320bd04 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 @@ -351,7 +351,7 @@ int ViEAutoTestMain::GetClassTestSelection() return -1; } -bool ViEAutoTestMain::GetAnswer(int index, string& answer) +bool ViEAutoTestMain::GetAnswer(int index, std::string& answer) { if (!_useAnswerFile || index > _answersCount) { 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 9da87d09e..6dae45f90 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 @@ -27,7 +27,7 @@ #endif -class ViEAutoTestNetworkObserver: public ViENetworkObserver +class ViEAutoTestNetworkObserver: public webrtc::ViENetworkObserver { public: ViEAutoTestNetworkObserver() @@ -40,7 +40,7 @@ public: { } virtual void PacketTimeout(const int videoChannel, - const ViEPacketTimeout timeout) + const webrtc::ViEPacketTimeout timeout) { } }; @@ -98,8 +98,8 @@ int ViEAutoTest::ViENetworkStandardTest() numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); - error= ViE.ptrViERtpRtcp->SetKeyFrameRequestMethod(tbChannel.videoChannel, - kViEKeyFrameRequestPliRtcp); + error= ViE.ptrViERtpRtcp->SetKeyFrameRequestMethod( + tbChannel.videoChannel, webrtc::kViEKeyFrameRequestPliRtcp); numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); 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 fe77f4e88..133b76ecf 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 @@ -39,7 +39,7 @@ #elif defined(WEBRTC_MAC) #endif -class ViEAutoTestExternalRenderer: public ExternalRenderer +class ViEAutoTestExternalRenderer: public webrtc::ExternalRenderer { public: ViEAutoTestExternalRenderer() : @@ -169,9 +169,10 @@ int ViEAutoTest::ViERenderStandardTest() __FUNCTION__, __LINE__); // Destroy render module and create new in full screen mode - VideoRender::DestroyVideoRender(_vrm1); + webrtc::VideoRender::DestroyVideoRender(_vrm1); _vrm1 = NULL; - _vrm1 = VideoRender::CreateVideoRender(4563, _window1, true, _renderType); + _vrm1 = webrtc::VideoRender::CreateVideoRender( + 4563, _window1, true, _renderType); numberOfErrors += ViETest::TestError(_vrm1, "ERROR: %s at line %d", __FUNCTION__, __LINE__); @@ -207,9 +208,10 @@ int ViEAutoTest::ViERenderStandardTest() __FUNCTION__, __LINE__); // Destroy full screen render module and create new in normal mode - VideoRender::DestroyVideoRender(_vrm1); + webrtc::VideoRender::DestroyVideoRender(_vrm1); _vrm1 = NULL; - _vrm1 = VideoRender::CreateVideoRender(4561, _window1, false, _renderType); + _vrm1 = webrtc::VideoRender::CreateVideoRender( + 4561, _window1, false, _renderType); numberOfErrors += ViETest::TestError(_vrm1, "ERROR: %s at line %d", __FUNCTION__, __LINE__); #endif @@ -366,9 +368,10 @@ int ViEAutoTest::ViERenderExtendedTest() __FUNCTION__, __LINE__); // Destroy render module and create new in full screen mode - VideoRender::DestroyVideoRender(_vrm1); + webrtc::VideoRender::DestroyVideoRender(_vrm1); _vrm1 = NULL; - _vrm1 = VideoRender::CreateVideoRender(4563, _window1, true, _renderType); + _vrm1 = webrtc::VideoRender::CreateVideoRender( + 4563, _window1, true, _renderType); numberOfErrors += ViETest::TestError(_vrm1, "ERROR: %s at line %d", __FUNCTION__, __LINE__); @@ -407,9 +410,10 @@ int ViEAutoTest::ViERenderExtendedTest() __FUNCTION__, __LINE__); // Destroy full screen render module and create new for external rendering - VideoRender::DestroyVideoRender(_vrm1); + webrtc::VideoRender::DestroyVideoRender(_vrm1); _vrm1 = NULL; - _vrm1 = VideoRender::CreateVideoRender(4564, NULL, false, _renderType); + _vrm1 = webrtc::VideoRender::CreateVideoRender(4564, NULL, false, + _renderType); numberOfErrors += ViETest::TestError(_vrm1, "ERROR: %s at line %d", __FUNCTION__, __LINE__); @@ -442,9 +446,10 @@ int ViEAutoTest::ViERenderExtendedTest() // Destroy render module for external rendering and create new in normal // mode - VideoRender::DestroyVideoRender(_vrm1); + webrtc::VideoRender::DestroyVideoRender(_vrm1); _vrm1 = NULL; - _vrm1 = VideoRender::CreateVideoRender(4561, _window1, false, _renderType); + _vrm1 = webrtc::VideoRender::CreateVideoRender(4561, _window1, false, + _renderType); numberOfErrors += ViETest::TestError(_vrm1, "ERROR: %s at line %d", __FUNCTION__, __LINE__); 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 be80401b8..58a976d5e 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 @@ -22,7 +22,7 @@ #include "tb_interfaces.h" #include "tb_video_channel.h" -class ViERtpObserver: public ViERTPObserver +class ViERtpObserver: public webrtc::ViERTPObserver { public: ViERtpObserver() @@ -42,7 +42,7 @@ public: } }; -class ViERtcpObserver: public ViERTCPObserver +class ViERtcpObserver: public webrtc::ViERTCPObserver { public: int _channel; @@ -161,10 +161,10 @@ int ViEAutoTest::ViERtpRtcpStandardTest() numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); - char returnCName[ViERTP_RTCP::KMaxRTCPCNameLength]; - memset(returnCName, 0, ViERTP_RTCP::KMaxRTCPCNameLength); - error - = ViE.ptrViERtpRtcp->GetRTCPCName(tbChannel.videoChannel, returnCName); + char returnCName[webrtc::ViERTP_RTCP::KMaxRTCPCNameLength]; + memset(returnCName, 0, webrtc::ViERTP_RTCP::KMaxRTCPCNameLength); + error = ViE.ptrViERtpRtcp->GetRTCPCName(tbChannel.videoChannel, + returnCName); numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); numberOfErrors += ViETest::TestError((strcmp(sendCName, returnCName) == 0), @@ -177,8 +177,8 @@ int ViEAutoTest::ViERtpRtcpStandardTest() AutoTestSleep(1000); - char remoteCName[ViERTP_RTCP::KMaxRTCPCNameLength]; - memset(remoteCName, 0, ViERTP_RTCP::KMaxRTCPCNameLength); + char remoteCName[webrtc::ViERTP_RTCP::KMaxRTCPCNameLength]; + memset(remoteCName, 0, webrtc::ViERTP_RTCP::KMaxRTCPCNameLength); error = ViE.ptrViERtpRtcp->GetRemoteRTCPCName(tbChannel.videoChannel, remoteCName); numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", @@ -364,11 +364,11 @@ int ViEAutoTest::ViERtpRtcpStandardTest() #endif error = ViE.ptrViERtpRtcp->StartRTPDump(tbChannel.videoChannel, inDumpName, - kRtpIncoming); + webrtc::kRtpIncoming); numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); error = ViE.ptrViERtpRtcp->StartRTPDump(tbChannel.videoChannel, - outDumpName, kRtpOutgoing); + outDumpName, webrtc::kRtpOutgoing); numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); @@ -384,12 +384,12 @@ int ViEAutoTest::ViERtpRtcpStandardTest() AutoTestSleep(1000); - error - = ViE.ptrViERtpRtcp->StopRTPDump(tbChannel.videoChannel, kRtpIncoming); + error = ViE.ptrViERtpRtcp->StopRTPDump(tbChannel.videoChannel, + webrtc::kRtpIncoming); numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); - error - = ViE.ptrViERtpRtcp->StopRTPDump(tbChannel.videoChannel, kRtpOutgoing); + error = ViE.ptrViERtpRtcp->StopRTPDump(tbChannel.videoChannel, + webrtc::kRtpOutgoing); numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); @@ -578,44 +578,45 @@ int ViEAutoTest::ViERtpRtcpAPITest() // // Check different RTCP modes // - ViERTCPMode rtcpMode = kRtcpNone; + webrtc::ViERTCPMode rtcpMode = webrtc::kRtcpNone; error = ViE.ptrViERtpRtcp->GetRTCPStatus(tbChannel.videoChannel, rtcpMode); numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); - numberOfErrors += ViETest::TestError(rtcpMode == kRtcpCompound_RFC4585, + numberOfErrors += ViETest::TestError( + rtcpMode == webrtc::kRtcpCompound_RFC4585, + "ERROR: %s at line %d", __FUNCTION__, __LINE__); + error = ViE.ptrViERtpRtcp->SetRTCPStatus(tbChannel.videoChannel, + webrtc::kRtcpCompound_RFC4585); + numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", + __FUNCTION__, __LINE__); + error = ViE.ptrViERtpRtcp->GetRTCPStatus(tbChannel.videoChannel, rtcpMode); + numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", + __FUNCTION__, __LINE__); + numberOfErrors += ViETest::TestError( + rtcpMode == webrtc::kRtcpCompound_RFC4585, + "ERROR: %s at line %d", __FUNCTION__, __LINE__); + error = ViE.ptrViERtpRtcp->SetRTCPStatus(tbChannel.videoChannel, + webrtc::kRtcpNonCompound_RFC5506); + numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", + __FUNCTION__, __LINE__); + error = ViE.ptrViERtpRtcp->GetRTCPStatus(tbChannel.videoChannel, rtcpMode); + numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", + __FUNCTION__, __LINE__); + numberOfErrors += ViETest::TestError( + rtcpMode == webrtc::kRtcpNonCompound_RFC5506, "ERROR: %s at line %d", + __FUNCTION__, __LINE__); + error = ViE.ptrViERtpRtcp->SetRTCPStatus(tbChannel.videoChannel, + webrtc::kRtcpNone); + numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", + __FUNCTION__, __LINE__); + error = ViE.ptrViERtpRtcp->GetRTCPStatus(tbChannel.videoChannel, rtcpMode); + numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", + __FUNCTION__, __LINE__); + numberOfErrors += ViETest::TestError(rtcpMode == webrtc::kRtcpNone, "ERROR: %s at line %d", __FUNCTION__, __LINE__); error = ViE.ptrViERtpRtcp->SetRTCPStatus(tbChannel.videoChannel, - kRtcpCompound_RFC4585); - numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", - __FUNCTION__, __LINE__); - error = ViE.ptrViERtpRtcp->GetRTCPStatus(tbChannel.videoChannel, rtcpMode); - numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", - __FUNCTION__, __LINE__); - numberOfErrors += ViETest::TestError(rtcpMode == kRtcpCompound_RFC4585, - "ERROR: %s at line %d", __FUNCTION__, - __LINE__); - error = ViE.ptrViERtpRtcp->SetRTCPStatus(tbChannel.videoChannel, - kRtcpNonCompound_RFC5506); - numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", - __FUNCTION__, __LINE__); - error = ViE.ptrViERtpRtcp->GetRTCPStatus(tbChannel.videoChannel, rtcpMode); - numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", - __FUNCTION__, __LINE__); - numberOfErrors += ViETest::TestError(rtcpMode == kRtcpNonCompound_RFC5506, - "ERROR: %s at line %d", __FUNCTION__, - __LINE__); - error = ViE.ptrViERtpRtcp->SetRTCPStatus(tbChannel.videoChannel, kRtcpNone); - numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", - __FUNCTION__, __LINE__); - error = ViE.ptrViERtpRtcp->GetRTCPStatus(tbChannel.videoChannel, rtcpMode); - numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", - __FUNCTION__, __LINE__); - numberOfErrors += ViETest::TestError(rtcpMode == kRtcpNone, - "ERROR: %s at line %d", __FUNCTION__, - __LINE__); - error = ViE.ptrViERtpRtcp->SetRTCPStatus(tbChannel.videoChannel, - kRtcpCompound_RFC4585); + webrtc::kRtcpCompound_RFC4585); numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); @@ -718,7 +719,7 @@ int ViEAutoTest::ViERtpRtcpAPITest() "ERROR: %s at line %d", __FUNCTION__, __LINE__); error = ViE.ptrViERtpRtcp->SetRTCPStatus(tbChannel.videoChannel, - kRtcpCompound_RFC4585); + webrtc::kRtcpCompound_RFC4585); numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); tbChannel.StopSend(); @@ -813,38 +814,39 @@ int ViEAutoTest::ViERtpRtcpAPITest() const char* dumpName = "DumpFileName.rtp"; #endif error = ViE.ptrViERtpRtcp->StartRTPDump(tbChannel.videoChannel, - dumpName, kRtpIncoming); + dumpName, webrtc::kRtpIncoming); numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); error = ViE.ptrViERtpRtcp->StopRTPDump(tbChannel.videoChannel, - kRtpIncoming); + webrtc::kRtpIncoming); numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); error = ViE.ptrViERtpRtcp->StopRTPDump(tbChannel.videoChannel, - kRtpIncoming); + webrtc::kRtpIncoming); numberOfErrors += ViETest::TestError(error == -1, "ERROR: %s at line %d", __FUNCTION__, __LINE__); error = ViE.ptrViERtpRtcp->StartRTPDump(tbChannel.videoChannel, - dumpName, kRtpOutgoing); + dumpName, webrtc::kRtpOutgoing); numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); error = ViE.ptrViERtpRtcp->StopRTPDump(tbChannel.videoChannel, - kRtpOutgoing); + webrtc::kRtpOutgoing); numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); error = ViE.ptrViERtpRtcp->StopRTPDump(tbChannel.videoChannel, - kRtpOutgoing); + webrtc::kRtpOutgoing); numberOfErrors += ViETest::TestError(error == -1, "ERROR: %s at line %d", __FUNCTION__, __LINE__); error = ViE.ptrViERtpRtcp->StartRTPDump(tbChannel.videoChannel, - dumpName, (RTPDirections) 3); + dumpName, + (webrtc::RTPDirections) 3); numberOfErrors += ViETest::TestError(error == -1, "ERROR: %s at line %d", __FUNCTION__, __LINE__); @@ -902,22 +904,22 @@ int ViEAutoTest::ViERtpRtcpAPITest() // { error = ViE.ptrViERtpRtcp->SetKeyFrameRequestMethod( - tbChannel.videoChannel, kViEKeyFrameRequestPliRtcp); + tbChannel.videoChannel, webrtc::kViEKeyFrameRequestPliRtcp); numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); error = ViE.ptrViERtpRtcp->SetKeyFrameRequestMethod( - tbChannel.videoChannel, kViEKeyFrameRequestPliRtcp); + tbChannel.videoChannel, webrtc::kViEKeyFrameRequestPliRtcp); numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); error = ViE.ptrViERtpRtcp->SetKeyFrameRequestMethod( - tbChannel.videoChannel, kViEKeyFrameRequestNone); + tbChannel.videoChannel, webrtc::kViEKeyFrameRequestNone); numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); error = ViE.ptrViERtpRtcp->SetKeyFrameRequestMethod( - tbChannel.videoChannel, kViEKeyFrameRequestNone); + tbChannel.videoChannel, webrtc::kViEKeyFrameRequestNone); numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__);