Remove 'using namespace' from ViE autotest files.

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@534 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
mflodman@webrtc.org 2011-09-06 14:12:07 +00:00
parent ac75cab618
commit b69bb56741
17 changed files with 337 additions and 318 deletions

View File

@ -24,8 +24,6 @@
#include "vie_encryption.h" #include "vie_encryption.h"
#include "vie_defines.h" #include "vie_defines.h"
//using namespace webrtc;
class tbInterfaces class tbInterfaces
{ {
public: public:

View File

@ -37,8 +37,6 @@
#include <string> #include <string>
#endif #endif
using namespace webrtc;
class ViEAutoTest class ViEAutoTest
{ {
public: public:
@ -54,7 +52,8 @@ public:
int ViECustomCall(); int ViECustomCall();
// general settings functions // general settings functions
bool GetVideoDevice(ViEBase* ptrViEBase, ViECapture* ptrViECapture, bool GetVideoDevice(webrtc::ViEBase* ptrViEBase,
webrtc::ViECapture* ptrViECapture,
char* captureDeviceName, char* captureDeviceUniqueId); char* captureDeviceName, char* captureDeviceUniqueId);
bool GetIPAddress(char* IP); bool GetIPAddress(char* IP);
#ifndef WEBRTC_ANDROID #ifndef WEBRTC_ANDROID
@ -70,16 +69,20 @@ public:
// video settings functions // video settings functions
bool GetVideoPorts(int* txPort, int* rxPort); bool GetVideoPorts(int* txPort, int* rxPort);
bool GetVideoCodec(ViECodec* ptrViECodec, webrtc::VideoCodec& videoCodec); bool GetVideoCodec(webrtc::ViECodec* ptrViECodec,
webrtc::VideoCodec& videoCodec);
// audio settings functions // audio settings functions
bool GetAudioDevices(VoEBase* ptrVEBase, VoEHardware* ptrVEHardware, bool GetAudioDevices(webrtc::VoEBase* ptrVEBase,
webrtc::VoEHardware* ptrVEHardware,
char* recordingDeviceName, int& recordingDeviceIndex, char* recordingDeviceName, int& recordingDeviceIndex,
char* playbackDeviceName, int& playbackDeviceIndex); char* playbackDeviceName, int& playbackDeviceIndex);
bool GetAudioDevices(VoEBase* ptrVEBase, VoEHardware* ptrVEHardware, bool GetAudioDevices(webrtc::VoEBase* ptrVEBase,
webrtc::VoEHardware* ptrVEHardware,
int& recordingDeviceIndex, int& playbackDeviceIndex); int& recordingDeviceIndex, int& playbackDeviceIndex);
bool GetAudioPorts(int* txPort, int* rxPort); bool GetAudioPorts(int* txPort, int* rxPort);
bool GetAudioCodec(VoECodec* ptrVeCodec, CodecInst& audioCodec); bool GetAudioCodec(webrtc::VoECodec* ptrVeCodec,
webrtc::CodecInst& audioCodec);
// vie_autotest_base.cc // vie_autotest_base.cc
int ViEBaseStandardTest(); int ViEBaseStandardTest();
@ -135,9 +138,9 @@ private:
void* _window1; void* _window1;
void* _window2; void* _window2;
VideoRenderType _renderType; webrtc::VideoRenderType _renderType;
VideoRender* _vrm1; webrtc::VideoRender* _vrm1;
VideoRender* _vrm2; webrtc::VideoRender* _vrm2;
}; };
#endif // WEBRTC_VIDEO_ENGINE_MAIN_TEST_AUTOTEST_INTERFACE_VIE_AUTOTEST_H_ #endif // WEBRTC_VIDEO_ENGINE_MAIN_TEST_AUTOTEST_INTERFACE_VIE_AUTOTEST_H_

View File

@ -13,22 +13,20 @@
#include <string> #include <string>
using namespace std;
class ViEAutoTestMain class ViEAutoTestMain
{ {
public: public:
ViEAutoTestMain(); ViEAutoTestMain();
bool BeginOSIndependentTesting(); bool BeginOSIndependentTesting();
bool GetAnswer(int index, string& answer); bool GetAnswer(int index, std::string& answer);
int GetClassTestSelection(); int GetClassTestSelection();
bool GetNextAnswer(string& answer); bool GetNextAnswer(std::string& answer);
bool IsUsingAnswerFile(); bool IsUsingAnswerFile();
bool UseAnswerFile(const char* fileName); bool UseAnswerFile(const char* fileName);
private: private:
string _answers[1024]; std::string _answers[1024];
int _answersCount; int _answersCount;
int _answersIndex; int _answersIndex;
bool _useAnswerFile; bool _useAnswerFile;

View File

@ -35,21 +35,27 @@
#pragma warning(disable: 4355) // 'this' : used in base member initializer list #pragma warning(disable: 4355) // 'this' : used in base member initializer list
#endif #endif
using namespace webrtc; tbExternalTransport::tbExternalTransport(webrtc::ViENetwork& vieNetwork) :
tbExternalTransport::tbExternalTransport(ViENetwork& vieNetwork) :
_vieNetwork(vieNetwork), _vieNetwork(vieNetwork),
_thread(*ThreadWrapper::CreateThread(ViEExternalTransportRun, this, _thread(*webrtc::ThreadWrapper::CreateThread(
kHighPriority, ViEExternalTransportRun, this, webrtc::kHighPriority,
"AutotestTransport")), "AutotestTransport")),
_event(*EventWrapper::Create()), _event(*webrtc::EventWrapper::Create()),
_crit(*CriticalSectionWrapper::CreateCriticalSection()), _crit(*webrtc::CriticalSectionWrapper::CreateCriticalSection()),
_statCrit(*CriticalSectionWrapper::CreateCriticalSection()), _statCrit(*webrtc::CriticalSectionWrapper::CreateCriticalSection()),
_lossRate(0), _networkDelayMs(0), _rtpCount(0), _rtcpCount(0), _lossRate(0),
_dropCount(0), _rtpPackets(), _rtcpPackets(), _checkSSRC(false), _networkDelayMs(0),
_lastSSRC(0), _checkSequenceNumber(0), _firstSequenceNumber(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; unsigned int tId = 0;
_thread.Start(tId); _thread.Start(tId);
} }
@ -117,21 +123,21 @@ int tbExternalTransport::SendRTCPPacket(int channel, const void *data, int len)
WebRtc_Word32 tbExternalTransport::SetPacketLoss(WebRtc_Word32 lossRate) WebRtc_Word32 tbExternalTransport::SetPacketLoss(WebRtc_Word32 lossRate)
{ {
CriticalSectionScoped cs(_statCrit); webrtc::CriticalSectionScoped cs(_statCrit);
_lossRate = lossRate; _lossRate = lossRate;
return 0; return 0;
} }
void tbExternalTransport::SetNetworkDelay(WebRtc_Word64 delayMs) void tbExternalTransport::SetNetworkDelay(WebRtc_Word64 delayMs)
{ {
CriticalSectionScoped cs(_crit); webrtc::CriticalSectionScoped cs(_crit);
_networkDelayMs = delayMs; _networkDelayMs = delayMs;
return; return;
} }
void tbExternalTransport::ClearStats() void tbExternalTransport::ClearStats()
{ {
CriticalSectionScoped cs(_statCrit); webrtc::CriticalSectionScoped cs(_statCrit);
_rtpCount = 0; _rtpCount = 0;
_dropCount = 0; _dropCount = 0;
_rtcpCount = 0; _rtcpCount = 0;
@ -142,7 +148,7 @@ void tbExternalTransport::GetStats(WebRtc_Word32& numRtpPackets,
WebRtc_Word32& numDroppedPackets, WebRtc_Word32& numDroppedPackets,
WebRtc_Word32& numRtcpPackets) WebRtc_Word32& numRtcpPackets)
{ {
CriticalSectionScoped cs(_statCrit); webrtc::CriticalSectionScoped cs(_statCrit);
numRtpPackets = _rtpCount; numRtpPackets = _rtpCount;
numDroppedPackets = _dropCount; numDroppedPackets = _dropCount;
numRtcpPackets = _rtcpCount; numRtcpPackets = _rtcpCount;
@ -151,24 +157,24 @@ void tbExternalTransport::GetStats(WebRtc_Word32& numRtpPackets,
void tbExternalTransport::EnableSSRCCheck() void tbExternalTransport::EnableSSRCCheck()
{ {
CriticalSectionScoped cs(_statCrit); webrtc::CriticalSectionScoped cs(_statCrit);
_checkSSRC = true; _checkSSRC = true;
} }
unsigned int tbExternalTransport::ReceivedSSRC() unsigned int tbExternalTransport::ReceivedSSRC()
{ {
CriticalSectionScoped cs(_statCrit); webrtc::CriticalSectionScoped cs(_statCrit);
return _lastSSRC; return _lastSSRC;
} }
void tbExternalTransport::EnableSequenceNumberCheck() void tbExternalTransport::EnableSequenceNumberCheck()
{ {
CriticalSectionScoped cs(_statCrit); webrtc::CriticalSectionScoped cs(_statCrit);
_checkSequenceNumber = true; _checkSequenceNumber = true;
} }
unsigned short tbExternalTransport::GetFirstSequenceNumber() unsigned short tbExternalTransport::GetFirstSequenceNumber()
{ {
CriticalSectionScoped cs(_statCrit); webrtc::CriticalSectionScoped cs(_statCrit);
return _firstSequenceNumber; return _firstSequenceNumber;
} }
@ -206,7 +212,7 @@ bool tbExternalTransport::ViEExternalTransportProcess()
if (packet) if (packet)
{ {
{ {
CriticalSectionScoped cs(_statCrit); webrtc::CriticalSectionScoped cs(_statCrit);
if (_checkSSRC) if (_checkSSRC)
{ {
_lastSSRC = ((packet->packetBuffer[8]) << 24); _lastSSRC = ((packet->packetBuffer[8]) << 24);
@ -264,5 +270,5 @@ bool tbExternalTransport::ViEExternalTransportProcess()
WebRtc_Word64 tbExternalTransport::NowMs() WebRtc_Word64 tbExternalTransport::NowMs()
{ {
return TickTime::MillisecondTimestamp(); return webrtc::TickTime::MillisecondTimestamp();
} }

View File

@ -25,9 +25,11 @@ char* ViETest::_logStr = NULL;
ViEAutoTest::ViEAutoTest(void* window1, void* window2) : ViEAutoTest::ViEAutoTest(void* window1, void* window2) :
_window1(window1), _window1(window1),
_window2(window2), _window2(window2),
_renderType(kRenderDefault), _renderType(webrtc::kRenderDefault),
_vrm1(VideoRender::CreateVideoRender(4561, window1, false, _renderType)), _vrm1(webrtc::VideoRender::CreateVideoRender(
_vrm2(VideoRender::CreateVideoRender(4562, window2, false, _renderType)) 4561, window1, false, _renderType)),
_vrm2(webrtc::VideoRender::CreateVideoRender(
4562, window2, false, _renderType))
{ {
assert(_vrm1); assert(_vrm1);
assert(_vrm2); assert(_vrm2);
@ -37,9 +39,9 @@ ViEAutoTest::ViEAutoTest(void* window1, void* window2) :
ViEAutoTest::~ViEAutoTest() ViEAutoTest::~ViEAutoTest()
{ {
VideoRender::DestroyVideoRender(_vrm1); webrtc::VideoRender::DestroyVideoRender(_vrm1);
_vrm1 = NULL; _vrm1 = NULL;
VideoRender::DestroyVideoRender(_vrm2); webrtc::VideoRender::DestroyVideoRender(_vrm2);
_vrm2 = NULL; _vrm2 = NULL;
ViETest::Terminate(); ViETest::Terminate();
@ -110,7 +112,6 @@ int ViEAutoTest::ViEAPITest()
void ViEAutoTest::PrintVideoCodec(const webrtc::VideoCodec videoCodec) void ViEAutoTest::PrintVideoCodec(const webrtc::VideoCodec videoCodec)
{ {
using namespace std;
ViETest::Log("Video Codec Information:"); ViETest::Log("Video Codec Information:");
switch (videoCodec.codecType) switch (videoCodec.codecType)
@ -142,15 +143,6 @@ void ViEAutoTest::PrintVideoCodec(const webrtc::VideoCodec videoCodec)
break; 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("\theight: %u", videoCodec.height);
ViETest::Log("\tmaxBitrate: %u", videoCodec.maxBitrate); ViETest::Log("\tmaxBitrate: %u", videoCodec.maxBitrate);
ViETest::Log("\tmaxFramerate: %u", videoCodec.maxFramerate); ViETest::Log("\tmaxFramerate: %u", videoCodec.maxFramerate);
@ -164,7 +156,6 @@ void ViEAutoTest::PrintVideoCodec(const webrtc::VideoCodec videoCodec)
void ViEAutoTest::PrintAudioCodec(const webrtc::CodecInst audioCodec) void ViEAutoTest::PrintAudioCodec(const webrtc::CodecInst audioCodec)
{ {
using namespace std;
ViETest::Log("Audio Codec Information:"); ViETest::Log("Audio Codec Information:");
ViETest::Log("\tchannels: %u", audioCodec.channels); ViETest::Log("\tchannels: %u", audioCodec.channels);
ViETest::Log("\t: %u", audioCodec.pacsize); ViETest::Log("\t: %u", audioCodec.pacsize);

View File

@ -32,8 +32,8 @@ int ViEAutoTest::ViEBaseStandardTest()
ViETest::Log("Starting a loopback call..."); ViETest::Log("Starting a loopback call...");
VideoEngine* ptrViE = NULL; webrtc::VideoEngine* ptrViE = NULL;
ptrViE = VideoEngine::Create(); ptrViE = webrtc::VideoEngine::Create();
numberOfErrors += ViETest::TestError(ptrViE != NULL, numberOfErrors += ViETest::TestError(ptrViE != NULL,
"ERROR: %s at line %d", __FUNCTION__, "ERROR: %s at line %d", __FUNCTION__,
__LINE__); __LINE__);
@ -47,7 +47,7 @@ int ViEAutoTest::ViEBaseStandardTest()
numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
#endif #endif
ViEBase* ptrViEBase = ViEBase::GetInterface(ptrViE); webrtc::ViEBase* ptrViEBase = webrtc::ViEBase::GetInterface(ptrViE);
numberOfErrors += ViETest::TestError(ptrViEBase != NULL, numberOfErrors += ViETest::TestError(ptrViEBase != NULL,
"ERROR: %s at line %d", __FUNCTION__, "ERROR: %s at line %d", __FUNCTION__,
__LINE__); __LINE__);
@ -65,12 +65,12 @@ int ViEAutoTest::ViEBaseStandardTest()
numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
ViECapture* ptrViECapture = ViECapture::GetInterface(ptrViE); webrtc::ViECapture* ptrViECapture = webrtc::ViECapture::GetInterface(ptrViE);
numberOfErrors += ViETest::TestError(ptrViECapture != NULL, numberOfErrors += ViETest::TestError(ptrViECapture != NULL,
"ERROR: %s at line %d", __FUNCTION__, "ERROR: %s at line %d", __FUNCTION__,
__LINE__); __LINE__);
VideoCaptureModule* vcpm(NULL); webrtc::VideoCaptureModule* vcpm(NULL);
const unsigned int KMaxDeviceNameLength = 128; const unsigned int KMaxDeviceNameLength = 128;
const unsigned int KMaxUniqueIdLength = 256; const unsigned int KMaxUniqueIdLength = 256;
@ -81,8 +81,8 @@ int ViEAutoTest::ViEBaseStandardTest()
bool captureDeviceSet = false; bool captureDeviceSet = false;
int captureId = 0; int captureId = 0;
VideoCaptureModule::DeviceInfo* devInfo = webrtc::VideoCaptureModule::DeviceInfo* devInfo =
VideoCaptureModule::CreateDeviceInfo(0); webrtc::VideoCaptureModule::CreateDeviceInfo(0);
for (unsigned int captureIdx = 0; for (unsigned int captureIdx = 0;
captureIdx < devInfo->NumberOfDevices(); captureIdx < devInfo->NumberOfDevices();
@ -95,7 +95,7 @@ int ViEAutoTest::ViEBaseStandardTest()
"ERROR: %s at line %d", "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
vcpm = VideoCaptureModule::Create(4571, uniqueId); vcpm = webrtc::VideoCaptureModule::Create(4571, uniqueId);
numberOfErrors += ViETest::TestError(vcpm != NULL, numberOfErrors += ViETest::TestError(vcpm != NULL,
"ERROR: %s at line %d", "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
@ -110,11 +110,11 @@ int ViEAutoTest::ViEBaseStandardTest()
} }
else else
{ {
VideoCaptureModule::Destroy(vcpm); webrtc::VideoCaptureModule::Destroy(vcpm);
vcpm = NULL; vcpm = NULL;
} }
} }
VideoCaptureModule::DestroyDeviceInfo(devInfo); webrtc::VideoCaptureModule::DestroyDeviceInfo(devInfo);
numberOfErrors+= ViETest::TestError( numberOfErrors+= ViETest::TestError(
captureDeviceSet, captureDeviceSet,
@ -129,17 +129,19 @@ int ViEAutoTest::ViEBaseStandardTest()
numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
ViERTP_RTCP* ptrViERtpRtcp = ViERTP_RTCP::GetInterface(ptrViE); webrtc::ViERTP_RTCP* ptrViERtpRtcp =
webrtc::ViERTP_RTCP::GetInterface(ptrViE);
numberOfErrors += ViETest::TestError(ptrViE != NULL, numberOfErrors += ViETest::TestError(ptrViE != NULL,
"ERROR: %s at line %d", __FUNCTION__, "ERROR: %s at line %d", __FUNCTION__,
__LINE__); __LINE__);
error = ptrViERtpRtcp->SetRTCPStatus(videoChannel, kRtcpCompound_RFC4585); error = ptrViERtpRtcp->SetRTCPStatus(videoChannel,
webrtc::kRtcpCompound_RFC4585);
numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
error = ptrViERtpRtcp->SetKeyFrameRequestMethod(videoChannel, error = ptrViERtpRtcp->SetKeyFrameRequestMethod(
kViEKeyFrameRequestPliRtcp); videoChannel, webrtc::kViEKeyFrameRequestPliRtcp);
numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
@ -147,7 +149,7 @@ int ViEAutoTest::ViEBaseStandardTest()
numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
ViERender* ptrViERender = ViERender::GetInterface(ptrViE); webrtc::ViERender* ptrViERender = webrtc::ViERender::GetInterface(ptrViE);
numberOfErrors += ViETest::TestError(ptrViERender != NULL, numberOfErrors += ViETest::TestError(ptrViERender != NULL,
"ERROR: %s at line %d", __FUNCTION__, "ERROR: %s at line %d", __FUNCTION__,
__LINE__); __LINE__);
@ -179,7 +181,7 @@ int ViEAutoTest::ViEBaseStandardTest()
numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
ViECodec* ptrViECodec = ViECodec::GetInterface(ptrViE); webrtc::ViECodec* ptrViECodec = webrtc::ViECodec::GetInterface(ptrViE);
numberOfErrors += ViETest::TestError(ptrViECodec != NULL, numberOfErrors += ViETest::TestError(ptrViECodec != NULL,
"ERROR: %s at line %d", __FUNCTION__, "ERROR: %s at line %d", __FUNCTION__,
__LINE__); __LINE__);
@ -210,7 +212,8 @@ int ViEAutoTest::ViEBaseStandardTest()
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
} }
ViENetwork* ptrViENetwork = ViENetwork::GetInterface(ptrViE); webrtc::ViENetwork* ptrViENetwork =
webrtc::ViENetwork::GetInterface(ptrViE);
numberOfErrors += ViETest::TestError(ptrViENetwork != NULL, numberOfErrors += ViETest::TestError(ptrViENetwork != NULL,
"ERROR: %s at line %d", __FUNCTION__, "ERROR: %s at line %d", __FUNCTION__,
__LINE__); __LINE__);
@ -311,7 +314,7 @@ int ViEAutoTest::ViEBaseStandardTest()
numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
VideoCaptureModule::Destroy(vcpm); webrtc::VideoCaptureModule::Destroy(vcpm);
vcpm = NULL; vcpm = NULL;
remainingInterfaces = ptrViECapture->Release(); remainingInterfaces = ptrViECapture->Release();
@ -348,7 +351,7 @@ int ViEAutoTest::ViEBaseStandardTest()
"ERROR: %s at line %d", __FUNCTION__, "ERROR: %s at line %d", __FUNCTION__,
__LINE__); __LINE__);
bool deleted = VideoEngine::Delete(ptrViE); bool deleted = webrtc::VideoEngine::Delete(ptrViE);
numberOfErrors += ViETest::TestError(deleted == true, numberOfErrors += ViETest::TestError(deleted == true,
"ERROR: %s at line %d", __FUNCTION__, "ERROR: %s at line %d", __FUNCTION__,
__LINE__); __LINE__);
@ -403,14 +406,14 @@ int ViEAutoTest::ViEBaseAPITest()
int error = 0; int error = 0;
int numberOfErrors = 0; int numberOfErrors = 0;
VideoEngine* ptrViE = NULL; webrtc::VideoEngine* ptrViE = NULL;
ViEBase* ptrViEBase = NULL; webrtc::ViEBase* ptrViEBase = NULL;
// Get the ViEBase API // Get the ViEBase API
ptrViEBase = ViEBase::GetInterface(ptrViE); ptrViEBase = webrtc::ViEBase::GetInterface(ptrViE);
numberOfErrors += ViETest::TestError(ptrViEBase == NULL); numberOfErrors += ViETest::TestError(ptrViEBase == NULL);
ptrViE = VideoEngine::Create(); ptrViE = webrtc::VideoEngine::Create();
numberOfErrors += ViETest::TestError(ptrViE != NULL, "VideoEngine::Create"); numberOfErrors += ViETest::TestError(ptrViE != NULL, "VideoEngine::Create");
#ifdef WEBRTC_ANDROID #ifdef WEBRTC_ANDROID
@ -425,7 +428,7 @@ int ViEAutoTest::ViEBaseAPITest()
numberOfErrors += ViETest::TestError(error == 0, "SetTraceFile error"); numberOfErrors += ViETest::TestError(error == 0, "SetTraceFile error");
#endif #endif
ptrViEBase = ViEBase::GetInterface(ptrViE); ptrViEBase = webrtc::ViEBase::GetInterface(ptrViE);
numberOfErrors += ViETest::TestError(ptrViEBase != NULL); numberOfErrors += ViETest::TestError(ptrViEBase != NULL);
//*************************************************************** //***************************************************************
@ -478,16 +481,16 @@ int ViEAutoTest::ViEBaseAPITest()
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
// VoiceEngine // VoiceEngine
VoiceEngine* ptrVoE = NULL; webrtc::VoiceEngine* ptrVoE = NULL;
VoEBase* ptrVoEBase = NULL; webrtc::VoEBase* ptrVoEBase = NULL;
int audioChannel = -1; int audioChannel = -1;
ptrVoE = VoiceEngine::Create(); ptrVoE = webrtc::VoiceEngine::Create();
numberOfErrors += ViETest::TestError(ptrVoE != NULL, numberOfErrors += ViETest::TestError(ptrVoE != NULL,
"ERROR: %s at line %d", __FUNCTION__, "ERROR: %s at line %d", __FUNCTION__,
__LINE__); __LINE__);
ptrVoEBase = VoEBase::GetInterface(ptrVoE); ptrVoEBase = webrtc::VoEBase::GetInterface(ptrVoE);
numberOfErrors += ViETest::TestError(ptrVoEBase != NULL, numberOfErrors += ViETest::TestError(ptrVoEBase != NULL,
"ERROR: %s at line %d", __FUNCTION__, "ERROR: %s at line %d", __FUNCTION__,
__LINE__); __LINE__);
@ -530,7 +533,7 @@ int ViEAutoTest::ViEBaseAPITest()
numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
ViEBase* ptrViEBase2 = ViEBase::GetInterface(ptrViE); webrtc::ViEBase* ptrViEBase2 = webrtc::ViEBase::GetInterface(ptrViE);
numberOfErrors += ViETest::TestError(ptrViEBase2 != NULL, numberOfErrors += ViETest::TestError(ptrViEBase2 != NULL,
"ERROR: %s at line %d", __FUNCTION__, "ERROR: %s at line %d", __FUNCTION__,
__LINE__); __LINE__);
@ -540,7 +543,7 @@ int ViEAutoTest::ViEBaseAPITest()
"ERROR: %s at line %d", __FUNCTION__, "ERROR: %s at line %d", __FUNCTION__,
__LINE__); __LINE__);
bool vieDeleted = VideoEngine::Delete(ptrViE); bool vieDeleted = webrtc::VideoEngine::Delete(ptrViE);
numberOfErrors += ViETest::TestError(vieDeleted == false, numberOfErrors += ViETest::TestError(vieDeleted == false,
"ERROR: %s at line %d", __FUNCTION__, "ERROR: %s at line %d", __FUNCTION__,
__LINE__); __LINE__);
@ -550,7 +553,7 @@ int ViEAutoTest::ViEBaseAPITest()
"ERROR: %s at line %d", __FUNCTION__, "ERROR: %s at line %d", __FUNCTION__,
__LINE__); __LINE__);
vieDeleted = VideoEngine::Delete(ptrViE); vieDeleted = webrtc::VideoEngine::Delete(ptrViE);
numberOfErrors += ViETest::TestError(vieDeleted == true, numberOfErrors += ViETest::TestError(vieDeleted == true,
"ERROR: %s at line %d", __FUNCTION__, "ERROR: %s at line %d", __FUNCTION__,
__LINE__); __LINE__);

View File

@ -30,26 +30,27 @@
#include "tb_video_channel.h" #include "tb_video_channel.h"
#include "video_capture.h" #include "video_capture.h"
class CaptureObserver: public ViECaptureObserver class CaptureObserver: public webrtc::ViECaptureObserver
{ {
public: public:
CaptureObserver() : CaptureObserver() :
_brightness(Normal), _alarm(AlarmCleared), _frameRate(0) _brightness(webrtc::Normal),
{} _alarm(webrtc::AlarmCleared),
_frameRate(0) {}
virtual void BrightnessAlarm(const int captureId, virtual void BrightnessAlarm(const int captureId,
const Brightness brightness) const webrtc::Brightness brightness)
{ {
_brightness = brightness; _brightness = brightness;
switch (brightness) switch (brightness)
{ {
case Normal: case webrtc::Normal:
ViETest::Log(" BrightnessAlarm Normal"); ViETest::Log(" BrightnessAlarm Normal");
break; break;
case Bright: case webrtc::Bright:
ViETest::Log(" BrightnessAlarm Bright"); ViETest::Log(" BrightnessAlarm Bright");
break; break;
case Dark: case webrtc::Dark:
ViETest::Log(" BrightnessAlarm Dark"); ViETest::Log(" BrightnessAlarm Dark");
break; break;
default: default:
@ -64,10 +65,11 @@ public:
_frameRate = frameRate; _frameRate = frameRate;
} }
virtual void NoPictureAlarm(const int captureId, const CaptureAlarm alarm) virtual void NoPictureAlarm(const int captureId,
const webrtc::CaptureAlarm alarm)
{ {
_alarm = alarm; _alarm = alarm;
if (alarm == AlarmRaised) if (alarm == webrtc::AlarmRaised)
{ {
ViETest::Log("NoPictureAlarm CARaised."); ViETest::Log("NoPictureAlarm CARaised.");
} }
@ -77,12 +79,12 @@ public:
} }
} }
Brightness _brightness; webrtc::Brightness _brightness;
CaptureAlarm _alarm; webrtc::CaptureAlarm _alarm;
unsigned char _frameRate; unsigned char _frameRate;
}; };
class CaptureEffectFilter: public ViEEffectFilter class CaptureEffectFilter: public webrtc::ViEEffectFilter
{ {
public: public:
CaptureEffectFilter(unsigned int reqWidth, unsigned int reqHeight, CaptureEffectFilter(unsigned int reqWidth, unsigned int reqHeight,
@ -135,8 +137,8 @@ int ViEAutoTest::ViECaptureStandardTest()
int error = 0; int error = 0;
tbInterfaces ViE("WebRTCViECapture_Standard", numberOfErrors); tbInterfaces ViE("WebRTCViECapture_Standard", numberOfErrors);
VideoCaptureModule::DeviceInfo* devInfo = webrtc::VideoCaptureModule::DeviceInfo* devInfo =
VideoCaptureModule::CreateDeviceInfo(0); webrtc::VideoCaptureModule::CreateDeviceInfo(0);
int numberOfCaptureDevices = devInfo->NumberOfDevices(); int numberOfCaptureDevices = devInfo->NumberOfDevices();
ViETest::Log("Number of capture devices %d", numberOfCaptureDevices); ViETest::Log("Number of capture devices %d", numberOfCaptureDevices);
@ -145,7 +147,7 @@ int ViEAutoTest::ViECaptureStandardTest()
__LINE__); __LINE__);
int captureDeviceId[10]; int captureDeviceId[10];
VideoCaptureModule* vcpms[10]; webrtc::VideoCaptureModule* vcpms[10];
memset(vcpms, 0, sizeof(vcpms)); memset(vcpms, 0, sizeof(vcpms));
//Check capabilities //Check capabilities
@ -186,7 +188,7 @@ int ViEAutoTest::ViECaptureStandardTest()
capIndex < numberOfCapabilities; capIndex < numberOfCapabilities;
++capIndex) ++capIndex)
{ {
VideoCaptureCapability capability; webrtc::VideoCaptureCapability capability;
error = devInfo->GetCapability(deviceUniqueName, capIndex, error = devInfo->GetCapability(deviceUniqueName, capIndex,
capability); capability);
numberOfErrors += ViETest::TestError(error == 0, numberOfErrors += ViETest::TestError(error == 0,
@ -226,8 +228,8 @@ int ViEAutoTest::ViECaptureStandardTest()
"ERROR: %s at line %d", "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
VideoCaptureModule* vcpm = VideoCaptureModule::Create(deviceIndex, webrtc::VideoCaptureModule* vcpm =
deviceUniqueName); webrtc::VideoCaptureModule::Create(deviceIndex, deviceUniqueName);
numberOfErrors += ViETest::TestError(vcpm != NULL, numberOfErrors += ViETest::TestError(vcpm != NULL,
"ERROR: %s at line %d", "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
@ -238,7 +240,7 @@ int ViEAutoTest::ViECaptureStandardTest()
numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
VideoCaptureCapability capability; webrtc::VideoCaptureCapability capability;
error = devInfo->GetCapability(deviceUniqueName, 0, capability); error = devInfo->GetCapability(deviceUniqueName, 0, capability);
// Test that the camera select the closest capability to the selected // Test that the camera select the closest capability to the selected
@ -256,7 +258,7 @@ int ViEAutoTest::ViECaptureStandardTest()
capability.height = capability.height - 2; capability.height = capability.height - 2;
capability.width = capability.width - 2; capability.width = capability.width - 2;
CaptureCapability vieCapability; webrtc::CaptureCapability vieCapability;
vieCapability.width = capability.width; vieCapability.width = capability.width;
vieCapability.height = capability.height; vieCapability.height = capability.height;
vieCapability.codecType = capability.codecType; vieCapability.codecType = capability.codecType;
@ -267,10 +269,10 @@ int ViEAutoTest::ViECaptureStandardTest()
vieCapability); vieCapability);
numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
TickTime startTime = TickTime::Now(); webrtc::TickTime startTime = webrtc::TickTime::Now();
while (filter._numberOfCapturedFrames < 10 while (filter._numberOfCapturedFrames < 10
&& (TickTime::Now() - startTime).Milliseconds() < 10000) && (webrtc::TickTime::Now() - startTime).Milliseconds() < 10000)
{ {
AutoTestSleep(100); AutoTestSleep(100);
} }
@ -321,7 +323,7 @@ int ViEAutoTest::ViECaptureStandardTest()
numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
#endif #endif
VideoCaptureModule::Destroy(vcpms[deviceIndex]); webrtc::VideoCaptureModule::Destroy(vcpms[deviceIndex]);
} }
#endif #endif
if (numberOfErrors > 0) if (numberOfErrors > 0)
@ -334,7 +336,7 @@ int ViEAutoTest::ViECaptureStandardTest()
ViETest::Log(" "); ViETest::Log(" ");
return numberOfErrors; return numberOfErrors;
} }
VideoCaptureModule::DestroyDeviceInfo(devInfo); webrtc::VideoCaptureModule::DestroyDeviceInfo(devInfo);
ViETest::Log(" "); ViETest::Log(" ");
ViETest::Log(" ViECapture Standard Test PASSED!"); ViETest::Log(" ViECapture Standard Test PASSED!");
@ -381,8 +383,8 @@ int ViEAutoTest::ViECaptureAPITest()
WebRtc_UWord8 deviceUniqueName[512]; WebRtc_UWord8 deviceUniqueName[512];
int captureId = 0; int captureId = 0;
VideoCaptureModule::DeviceInfo* devInfo = webrtc::VideoCaptureModule::DeviceInfo* devInfo =
VideoCaptureModule::CreateDeviceInfo(0); webrtc::VideoCaptureModule::CreateDeviceInfo(0);
numberOfErrors += ViETest::TestError(devInfo != NULL, numberOfErrors += ViETest::TestError(devInfo != NULL,
"ERROR: %s at line %d", __FUNCTION__, "ERROR: %s at line %d", __FUNCTION__,
__LINE__); __LINE__);
@ -393,7 +395,8 @@ int ViEAutoTest::ViECaptureAPITest()
numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __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", numberOfErrors += ViETest::TestError(vcpm != NULL, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
@ -506,43 +509,43 @@ int ViEAutoTest::ViECaptureAPITest()
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
// Test GetOrientation // Test GetOrientation
VideoCaptureRotation orientation; webrtc::VideoCaptureRotation orientation;
WebRtc_UWord8 dummy_name[5]; WebRtc_UWord8 dummy_name[5];
error = devInfo->GetOrientation(dummy_name, orientation); error = devInfo->GetOrientation(dummy_name, orientation);
numberOfErrors += ViETest::TestError(error == -1, "ERROR: %s at line %d", numberOfErrors += ViETest::TestError(error == -1, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
//Test SetRotation //Test SetRotation
error = ViE.ptrViECapture->SetRotateCapturedFrames(captureId, error = ViE.ptrViECapture->SetRotateCapturedFrames(
RotateCapturedFrame_90); captureId, webrtc::RotateCapturedFrame_90);
numberOfErrors += ViETest::TestError(error == -1, "ERROR: %s at line %d", numberOfErrors += ViETest::TestError(error == -1, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
numberOfErrors += ViETest::TestError(ViE.LastError() numberOfErrors += ViETest::TestError(
== kViECaptureDeviceDoesnNotExist, "ERROR: %s at line %d", ViE.LastError() == kViECaptureDeviceDoesnNotExist,
__FUNCTION__, __LINE__); "ERROR: %s at line %d", __FUNCTION__, __LINE__);
// Allocate capture device // Allocate capture device
error = ViE.ptrViECapture->AllocateCaptureDevice(*vcpm, captureId); error = ViE.ptrViECapture->AllocateCaptureDevice(*vcpm, captureId);
numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
error = ViE.ptrViECapture->SetRotateCapturedFrames(captureId, error = ViE.ptrViECapture->SetRotateCapturedFrames(
RotateCapturedFrame_0); captureId, webrtc::RotateCapturedFrame_0);
numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
error = ViE.ptrViECapture->SetRotateCapturedFrames(captureId, error = ViE.ptrViECapture->SetRotateCapturedFrames(
RotateCapturedFrame_90); captureId, webrtc::RotateCapturedFrame_90);
numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
error = ViE.ptrViECapture->SetRotateCapturedFrames(captureId, error = ViE.ptrViECapture->SetRotateCapturedFrames(
RotateCapturedFrame_180); captureId, webrtc::RotateCapturedFrame_180);
numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
error = ViE.ptrViECapture->SetRotateCapturedFrames(captureId, error = ViE.ptrViECapture->SetRotateCapturedFrames(
RotateCapturedFrame_270); captureId, webrtc::RotateCapturedFrame_270);
numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
@ -551,8 +554,8 @@ int ViEAutoTest::ViECaptureAPITest()
numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
VideoCaptureModule::DestroyDeviceInfo(devInfo); webrtc::VideoCaptureModule::DestroyDeviceInfo(devInfo);
VideoCaptureModule::Destroy(vcpm); webrtc::VideoCaptureModule::Destroy(vcpm);
//*************************************************************** //***************************************************************
// Testing finished. Tear down Video Engine // Testing finished. Tear down Video Engine
@ -596,11 +599,12 @@ int ViEAutoTest::ViECaptureExternalCaptureTest()
channel.StartReceive(); channel.StartReceive();
channel.StartSend(); channel.StartSend();
VideoCaptureExternal* externalCapture; webrtc::VideoCaptureExternal* externalCapture;
int captureId = 0; int captureId = 0;
// Allocate the external capture device // 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", numberOfErrors += ViETest::TestError(vcpm != NULL, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
@ -675,10 +679,10 @@ int ViEAutoTest::ViECaptureExternalCaptureTest()
// } // }
int frameCount = 0; int frameCount = 0;
VideoCaptureCapability capability; webrtc::VideoCaptureCapability capability;
capability.width = 176; capability.width = 176;
capability.height = 144; capability.height = 144;
capability.rawType = kVideoI420; capability.rawType = webrtc::kVideoI420;
ViETest::Log("Testing external capturing and frame rate callbacks."); ViETest::Log("Testing external capturing and frame rate callbacks.");
// TODO: Change when using a real file! // TODO: Change when using a real file!
@ -688,17 +692,17 @@ int ViEAutoTest::ViECaptureExternalCaptureTest()
externalCapture->IncomingFrame( externalCapture->IncomingFrame(
videoFrame, videoFrameLength, capability, videoFrame, videoFrameLength, capability,
TickTime::Now().MillisecondTimestamp()); webrtc::TickTime::Now().MillisecondTimestamp());
AutoTestSleep(33); AutoTestSleep(33);
if (effectFilter._numberOfCapturedFrames > 2) if (effectFilter._numberOfCapturedFrames > 2)
{ {
// make sure brigthness or no picture alarm has not been triggered // 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( 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__); __FUNCTION__, __LINE__);
} }
frameCount++; frameCount++;
@ -718,10 +722,10 @@ int ViEAutoTest::ViECaptureExternalCaptureTest()
{ {
externalCapture->IncomingFrame( externalCapture->IncomingFrame(
videoFrame, videoFrameLength, capability, videoFrame, videoFrameLength, capability,
TickTime::Now().MillisecondTimestamp()); webrtc::TickTime::Now().MillisecondTimestamp());
AutoTestSleep(33); AutoTestSleep(33);
} }
numberOfErrors += ViETest::TestError(observer._brightness == Bright, numberOfErrors += ViETest::TestError(observer._brightness == webrtc::Bright,
"ERROR: %s at line %d", __FUNCTION__, "ERROR: %s at line %d", __FUNCTION__,
__LINE__); __LINE__);
@ -734,10 +738,10 @@ int ViEAutoTest::ViECaptureExternalCaptureTest()
{ {
externalCapture->IncomingFrame( externalCapture->IncomingFrame(
videoFrame, videoFrameLength, capability, videoFrame, videoFrameLength, capability,
TickTime::Now().MillisecondTimestamp()); webrtc::TickTime::Now().MillisecondTimestamp());
AutoTestSleep(33); AutoTestSleep(33);
} }
numberOfErrors += ViETest::TestError(observer._brightness == Dark, numberOfErrors += ViETest::TestError(observer._brightness == webrtc::Dark,
"ERROR: %s at line %d", __FUNCTION__, "ERROR: %s at line %d", __FUNCTION__,
__LINE__); __LINE__);
@ -755,19 +759,19 @@ int ViEAutoTest::ViECaptureExternalCaptureTest()
// Test no picture alarm // Test no picture alarm
ViETest::Log("Testing NoPictureAlarm."); ViETest::Log("Testing NoPictureAlarm.");
AutoTestSleep(1050); AutoTestSleep(1050);
numberOfErrors += ViETest::TestError(observer._alarm == AlarmRaised, numberOfErrors += ViETest::TestError(observer._alarm == webrtc::AlarmRaised,
"ERROR: %s at line %d", __FUNCTION__, "ERROR: %s at line %d", __FUNCTION__,
__LINE__); __LINE__);
for (int frame = 0; frame < 10; ++frame) for (int frame = 0; frame < 10; ++frame)
{ {
externalCapture->IncomingFrame( externalCapture->IncomingFrame(
videoFrame, videoFrameLength, capability, videoFrame, videoFrameLength, capability,
TickTime::Now().MillisecondTimestamp()); webrtc::TickTime::Now().MillisecondTimestamp());
AutoTestSleep(33); AutoTestSleep(33);
} }
numberOfErrors += ViETest::TestError(observer._alarm == AlarmCleared, numberOfErrors += ViETest::TestError(
"ERROR: %s at line %d", __FUNCTION__, observer._alarm == webrtc::AlarmCleared, "ERROR: %s at line %d",
__LINE__); __FUNCTION__, __LINE__);
delete videoFrame; delete videoFrame;

View File

@ -29,8 +29,8 @@
#include "vie_rtp_rtcp.h" #include "vie_rtp_rtcp.h"
#include "voe_base.h" #include "voe_base.h"
class ViEAutotestCodecObserever: public ViEEncoderObserver, class ViEAutotestCodecObserever: public webrtc::ViEEncoderObserver,
public ViEDecoderObserver public webrtc::ViEDecoderObserver
{ {
public: public:
int incomingCodecCalled; int incomingCodecCalled;
@ -96,7 +96,7 @@ public:
} }
}; };
class ViEAutoTestEffectFilter: public ViEEffectFilter class ViEAutoTestEffectFilter: public webrtc::ViEEffectFilter
{ {
public: public:
int numFrames; int numFrames;
@ -137,13 +137,13 @@ int ViEAutoTest::ViECodecStandardTest()
tbCaptureDevice captureDevice = tbCaptureDevice(interfaces, numberOfErrors); tbCaptureDevice captureDevice = tbCaptureDevice(interfaces, numberOfErrors);
int captureId = captureDevice.captureId; int captureId = captureDevice.captureId;
VideoEngine* ptrViE = interfaces.ptrViE; webrtc::VideoEngine* ptrViE = interfaces.ptrViE;
ViEBase* ptrViEBase = interfaces.ptrViEBase; webrtc::ViEBase* ptrViEBase = interfaces.ptrViEBase;
ViECapture* ptrViECapture = interfaces.ptrViECapture; webrtc::ViECapture* ptrViECapture = interfaces.ptrViECapture;
ViERender* ptrViERender = interfaces.ptrViERender; webrtc::ViERender* ptrViERender = interfaces.ptrViERender;
ViECodec* ptrViECodec = interfaces.ptrViECodec; webrtc::ViECodec* ptrViECodec = interfaces.ptrViECodec;
ViERTP_RTCP* ptrViERtpRtcp = interfaces.ptrViERtpRtcp; webrtc::ViERTP_RTCP* ptrViERtpRtcp = interfaces.ptrViERtpRtcp;
ViENetwork* ptrViENetwork = interfaces.ptrViENetwork; webrtc::ViENetwork* ptrViENetwork = interfaces.ptrViENetwork;
int videoChannel = -1; int videoChannel = -1;
error = ptrViEBase->CreateChannel(videoChannel); error = ptrViEBase->CreateChannel(videoChannel);
@ -154,12 +154,13 @@ int ViEAutoTest::ViECodecStandardTest()
numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __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", numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
error = ptrViERtpRtcp->SetKeyFrameRequestMethod(videoChannel, error = ptrViERtpRtcp->SetKeyFrameRequestMethod(
kViEKeyFrameRequestPliRtcp); videoChannel, webrtc::kViEKeyFrameRequestPliRtcp);
numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
@ -204,7 +205,7 @@ int ViEAutoTest::ViECodecStandardTest()
videoCodec.width = 640; videoCodec.width = 640;
videoCodec.height = 480; videoCodec.height = 480;
} }
if(videoCodec.codecType==kVideoCodecI420) if(videoCodec.codecType == webrtc::kVideoCodecI420)
{ {
videoCodec.width=176; videoCodec.width=176;
videoCodec.height=144; videoCodec.height=144;
@ -251,7 +252,8 @@ int ViEAutoTest::ViECodecStandardTest()
// Make sure all codecs runs // Make sure all codecs runs
// //
{ {
ViEImageProcess* ptrViEImageProcess = ViEImageProcess::GetInterface(ptrViE); webrtc::ViEImageProcess* ptrViEImageProcess =
webrtc::ViEImageProcess::GetInterface(ptrViE);
ViEAutotestCodecObserever codecObserver; ViEAutotestCodecObserever codecObserver;
error = ptrViECodec->RegisterDecoderObserver(videoChannel, error = ptrViECodec->RegisterDecoderObserver(videoChannel,
codecObserver); codecObserver);
@ -269,8 +271,9 @@ int ViEAutoTest::ViECodecStandardTest()
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
if (videoCodec.codecType != webrtc::kVideoCodecMPEG4) 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.width=176;
videoCodec.height=144; videoCodec.height=144;
videoCodec.maxFramerate=15; videoCodec.maxFramerate=15;
@ -300,7 +303,7 @@ int ViEAutoTest::ViECodecStandardTest()
int maxNumberOfRenderedFrames = videoCodec.maxFramerate int maxNumberOfRenderedFrames = videoCodec.maxFramerate
* KAutoTestSleepTimeMs / 1000; * 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. // 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. // 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", tbInterfaces interfaces = tbInterfaces("ViECodecExtendedTest",
numberOfErrors); numberOfErrors);
ViEBase* ptrViEBase = interfaces.ptrViEBase; webrtc::ViEBase* ptrViEBase = interfaces.ptrViEBase;
ViECapture* ptrViECapture = interfaces.ptrViECapture; webrtc::ViECapture* ptrViECapture = interfaces.ptrViECapture;
ViERender* ptrViERender = interfaces.ptrViERender; webrtc::ViERender* ptrViERender = interfaces.ptrViERender;
ViECodec* ptrViECodec = interfaces.ptrViECodec; webrtc::ViECodec* ptrViECodec = interfaces.ptrViECodec;
ViERTP_RTCP* ptrViERtpRtcp = interfaces.ptrViERtpRtcp; webrtc::ViERTP_RTCP* ptrViERtpRtcp = interfaces.ptrViERtpRtcp;
ViENetwork* ptrViENetwork = interfaces.ptrViENetwork; webrtc::ViENetwork* ptrViENetwork = interfaces.ptrViENetwork;
tbCaptureDevice captureDevice = tbCaptureDevice(interfaces, tbCaptureDevice captureDevice = tbCaptureDevice(interfaces,
numberOfErrors); numberOfErrors);
@ -484,13 +487,12 @@ int ViEAutoTest::ViECodecExtendedTest()
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
error = ptrViERtpRtcp->SetRTCPStatus(videoChannel, error = ptrViERtpRtcp->SetRTCPStatus(videoChannel,
kRtcpCompound_RFC4585); webrtc::kRtcpCompound_RFC4585);
numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
error error = ptrViERtpRtcp->SetKeyFrameRequestMethod(
= ptrViERtpRtcp->SetKeyFrameRequestMethod(videoChannel, videoChannel, webrtc::kViEKeyFrameRequestPliRtcp);
kViEKeyFrameRequestPliRtcp);
numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
@ -635,9 +637,8 @@ int ViEAutoTest::ViECodecExtendedTest()
tbCapture.ConnectTo(videoChannel1); tbCapture.ConnectTo(videoChannel1);
error error = ViE.ptrViERtpRtcp->SetKeyFrameRequestMethod(
= ViE.ptrViERtpRtcp->SetKeyFrameRequestMethod( videoChannel1, webrtc::kViEKeyFrameRequestPliRtcp);
videoChannel1, kViEKeyFrameRequestPliRtcp);
numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
@ -709,7 +710,7 @@ int ViEAutoTest::ViECodecExtendedTest()
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
error = ViE.ptrViERtpRtcp->SetKeyFrameRequestMethod( error = ViE.ptrViERtpRtcp->SetKeyFrameRequestMethod(
videoChannel2, kViEKeyFrameRequestPliRtcp); videoChannel2, webrtc::kViEKeyFrameRequestPliRtcp);
numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
@ -794,7 +795,7 @@ int ViEAutoTest::ViECodecExtendedTest()
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
error = ViE.ptrViERtpRtcp->SetKeyFrameRequestMethod( error = ViE.ptrViERtpRtcp->SetKeyFrameRequestMethod(
videoChannel3, kViEKeyFrameRequestPliRtcp); videoChannel3, webrtc::kViEKeyFrameRequestPliRtcp);
numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
@ -897,12 +898,12 @@ int ViEAutoTest::ViECodecAPITest()
int error = 0; int error = 0;
int numberOfErrors = 0; int numberOfErrors = 0;
VideoEngine* ptrViE = NULL; webrtc::VideoEngine* ptrViE = NULL;
ptrViE = VideoEngine::Create(); ptrViE = webrtc::VideoEngine::Create();
numberOfErrors += ViETest::TestError(ptrViE != NULL, "ERROR: %s at line %d", numberOfErrors += ViETest::TestError(ptrViE != NULL, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
ViEBase* ptrViEBase = ViEBase::GetInterface(ptrViE); webrtc::ViEBase* ptrViEBase = webrtc::ViEBase::GetInterface(ptrViE);
numberOfErrors += ViETest::TestError(ptrViEBase != NULL, numberOfErrors += ViETest::TestError(ptrViEBase != NULL,
"ERROR: %s at line %d", __FUNCTION__, "ERROR: %s at line %d", __FUNCTION__,
__LINE__); __LINE__);
@ -916,7 +917,7 @@ int ViEAutoTest::ViECodecAPITest()
numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
ViECodec* ptrViECodec = ViECodec::GetInterface(ptrViE); webrtc::ViECodec* ptrViECodec = webrtc::ViECodec::GetInterface(ptrViE);
numberOfErrors += ViETest::TestError(ptrViECodec != NULL, numberOfErrors += ViETest::TestError(ptrViECodec != NULL,
"ERROR: %s at line %d", __FUNCTION__, "ERROR: %s at line %d", __FUNCTION__,
__LINE__); __LINE__);
@ -992,7 +993,7 @@ int ViEAutoTest::ViECodecAPITest()
"ERROR: %s at line %d", __FUNCTION__, "ERROR: %s at line %d", __FUNCTION__,
__LINE__); __LINE__);
bool deleted = VideoEngine::Delete(ptrViE); bool deleted = webrtc::VideoEngine::Delete(ptrViE);
numberOfErrors += ViETest::TestError(deleted == true, numberOfErrors += ViETest::TestError(deleted == true,
"ERROR: %s at line %d", __FUNCTION__, "ERROR: %s at line %d", __FUNCTION__,
__LINE__); __LINE__);

View File

@ -33,12 +33,12 @@ int ViEAutoTest::ViECustomCall()
std::string str; std::string str;
// VoE // VoE
VoiceEngine* ptrVE = VoiceEngine::Create(); webrtc::VoiceEngine* ptrVE = webrtc::VoiceEngine::Create();
numberOfErrors += ViETest::TestError(ptrVE != NULL, "ERROR: %s at line %d", numberOfErrors += ViETest::TestError(ptrVE != NULL, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
VoEBase* ptrVEBase = VoEBase::GetInterface(ptrVE); webrtc::VoEBase* ptrVEBase = webrtc::VoEBase::GetInterface(ptrVE);
numberOfErrors += ViETest::TestError(ptrVEBase != NULL, numberOfErrors += ViETest::TestError(ptrVEBase != NULL,
"ERROR: %s at line %d", __FUNCTION__, "ERROR: %s at line %d", __FUNCTION__,
__LINE__); __LINE__);
@ -46,29 +46,30 @@ int ViEAutoTest::ViECustomCall()
numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
VoECodec* ptrVECodec = VoECodec::GetInterface(ptrVE); webrtc::VoECodec* ptrVECodec = webrtc::VoECodec::GetInterface(ptrVE);
numberOfErrors += ViETest::TestError(ptrVECodec != NULL, numberOfErrors += ViETest::TestError(ptrVECodec != NULL,
"ERROR: %s at line %d", __FUNCTION__, "ERROR: %s at line %d", __FUNCTION__,
__LINE__); __LINE__);
VoEHardware* ptrVEHardware = VoEHardware::GetInterface(ptrVE); webrtc::VoEHardware* ptrVEHardware =
webrtc::VoEHardware::GetInterface(ptrVE);
numberOfErrors += ViETest::TestError(ptrVEHardware != NULL, numberOfErrors += ViETest::TestError(ptrVEHardware != NULL,
"ERROR: %s at line %d", __FUNCTION__, "ERROR: %s at line %d", __FUNCTION__,
__LINE__); __LINE__);
VoEAudioProcessing* ptrVEAPM = VoEAudioProcessing::GetInterface(ptrVE); webrtc::VoEAudioProcessing* ptrVEAPM =
webrtc::VoEAudioProcessing::GetInterface(ptrVE);
numberOfErrors += ViETest::TestError(ptrVEAPM != NULL, numberOfErrors += ViETest::TestError(ptrVEAPM != NULL,
"ERROR: %s at line %d", __FUNCTION__, "ERROR: %s at line %d", __FUNCTION__,
__LINE__); __LINE__);
// ViE // ViE
VideoEngine* ptrViE = NULL; webrtc::VideoEngine* ptrViE = webrtc::VideoEngine::Create();
ptrViE = VideoEngine::Create();
numberOfErrors += ViETest::TestError(ptrViE != NULL, numberOfErrors += ViETest::TestError(ptrViE != NULL,
"ERROR: %s at line %d", __FUNCTION__, "ERROR: %s at line %d", __FUNCTION__,
__LINE__); __LINE__);
ViEBase* ptrViEBase = ViEBase::GetInterface(ptrViE); webrtc::ViEBase* ptrViEBase = webrtc::ViEBase::GetInterface(ptrViE);
numberOfErrors += ViETest::TestError(ptrViEBase != NULL, numberOfErrors += ViETest::TestError(ptrViEBase != NULL,
"ERROR: %s at line %d", __FUNCTION__, "ERROR: %s at line %d", __FUNCTION__,
__LINE__); __LINE__);
@ -77,22 +78,24 @@ int ViEAutoTest::ViECustomCall()
numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
ViECapture* ptrViECapture = ViECapture::GetInterface(ptrViE); webrtc::ViECapture* ptrViECapture =
webrtc::ViECapture::GetInterface(ptrViE);
numberOfErrors += ViETest::TestError(ptrViECapture != NULL, numberOfErrors += ViETest::TestError(ptrViECapture != NULL,
"ERROR: %s at line %d", __FUNCTION__, "ERROR: %s at line %d", __FUNCTION__,
__LINE__); __LINE__);
ViERender* ptrViERender = ViERender::GetInterface(ptrViE); webrtc::ViERender* ptrViERender = webrtc::ViERender::GetInterface(ptrViE);
numberOfErrors += ViETest::TestError(ptrViERender != NULL, numberOfErrors += ViETest::TestError(ptrViERender != NULL,
"ERROR: %s at line %d", __FUNCTION__, "ERROR: %s at line %d", __FUNCTION__,
__LINE__); __LINE__);
ViECodec* ptrViECodec = ViECodec::GetInterface(ptrViE); webrtc::ViECodec* ptrViECodec = webrtc::ViECodec::GetInterface(ptrViE);
numberOfErrors += ViETest::TestError(ptrViECodec != NULL, numberOfErrors += ViETest::TestError(ptrViECodec != NULL,
"ERROR: %s at line %d", __FUNCTION__, "ERROR: %s at line %d", __FUNCTION__,
__LINE__); __LINE__);
ViENetwork* ptrViENetwork = ViENetwork::GetInterface(ptrViE); webrtc::ViENetwork* ptrViENetwork =
webrtc::ViENetwork::GetInterface(ptrViE);
numberOfErrors += ViETest::TestError(ptrViENetwork != NULL, numberOfErrors += ViETest::TestError(ptrViENetwork != NULL,
"ERROR: %s at line %d", __FUNCTION__, "ERROR: %s at line %d", __FUNCTION__,
__LINE__); __LINE__);
@ -237,12 +240,12 @@ int ViEAutoTest::ViECustomCall()
"ERROR: %s at line %d", "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
error = ptrVEAPM->SetAgcStatus(true, kAgcDefault); error = ptrVEAPM->SetAgcStatus(true, webrtc::kAgcDefault);
numberOfErrors += ViETest::TestError(error == 0, numberOfErrors += ViETest::TestError(error == 0,
"ERROR: %s at line %d", "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
error = ptrVEAPM->SetNsStatus(true, kNsHighSuppression); error = ptrVEAPM->SetNsStatus(true, webrtc::kNsHighSuppression);
numberOfErrors += ViETest::TestError(error == 0, numberOfErrors += ViETest::TestError(error == 0,
"ERROR: %s at line %d", "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
@ -286,19 +289,20 @@ int ViEAutoTest::ViECustomCall()
"ERROR: %s at line %d", "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
ViERTP_RTCP* ptrViERtpRtcp = ViERTP_RTCP::GetInterface(ptrViE); webrtc::ViERTP_RTCP* ptrViERtpRtcp =
webrtc::ViERTP_RTCP::GetInterface(ptrViE);
numberOfErrors += ViETest::TestError(ptrViE != NULL, numberOfErrors += ViETest::TestError(ptrViE != NULL,
"ERROR: %s at line %d", "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
error = ptrViERtpRtcp->SetRTCPStatus(videoChannel, error = ptrViERtpRtcp->SetRTCPStatus(videoChannel,
kRtcpCompound_RFC4585); webrtc::kRtcpCompound_RFC4585);
numberOfErrors += ViETest::TestError(error == 0, numberOfErrors += ViETest::TestError(error == 0,
"ERROR: %s at line %d", "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
error = ptrViERtpRtcp->SetKeyFrameRequestMethod( error = ptrViERtpRtcp->SetKeyFrameRequestMethod(
videoChannel, kViEKeyFrameRequestPliRtcp); videoChannel, webrtc::kViEKeyFrameRequestPliRtcp);
numberOfErrors += ViETest::TestError(error == 0, numberOfErrors += ViETest::TestError(error == 0,
"ERROR: %s at line %d", "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
@ -578,7 +582,7 @@ int ViEAutoTest::ViECustomCall()
"ERROR: %s at line %d", "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
bool deleted = VideoEngine::Delete(ptrViE); bool deleted = webrtc::VideoEngine::Delete(ptrViE);
numberOfErrors += ViETest::TestError(deleted == true, numberOfErrors += ViETest::TestError(deleted == true,
"ERROR: %s at line %d", "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
@ -591,8 +595,8 @@ int ViEAutoTest::ViECustomCall()
return numberOfErrors; return numberOfErrors;
} }
bool ViEAutoTest::GetVideoDevice(ViEBase* ptrViEBase, bool ViEAutoTest::GetVideoDevice(webrtc::ViEBase* ptrViEBase,
ViECapture* ptrViECapture, webrtc::ViECapture* ptrViECapture,
char* captureDeviceName, char* captureDeviceName,
char* captureDeviceUniqueId) char* captureDeviceUniqueId)
{ {
@ -673,8 +677,8 @@ bool ViEAutoTest::GetVideoDevice(ViEBase* ptrViEBase,
} }
} }
bool ViEAutoTest::GetAudioDevices(VoEBase* ptrVEBase, bool ViEAutoTest::GetAudioDevices(webrtc::VoEBase* ptrVEBase,
VoEHardware* ptrVEHardware, webrtc::VoEHardware* ptrVEHardware,
char* recordingDeviceName, char* recordingDeviceName,
int& recordingDeviceIndex, int& recordingDeviceIndex,
char* playbackDeviceName, char* playbackDeviceName,
@ -926,7 +930,8 @@ bool ViEAutoTest::GetVideoPorts(int* txPort, int* rxPort)
assert(false); assert(false);
return false; return false;
} }
bool ViEAutoTest::GetVideoCodec(ViECodec* ptrViECodec,
bool ViEAutoTest::GetVideoCodec(webrtc::ViECodec* ptrViECodec,
webrtc::VideoCodec& videoCodec) webrtc::VideoCodec& videoCodec)
{ {
int error = 0; int error = 0;

View File

@ -21,7 +21,7 @@
#include "tb_interfaces.h" #include "tb_interfaces.h"
#include "tb_video_channel.h" #include "tb_video_channel.h"
class ViEAutotestEncryption: public Encryption class ViEAutotestEncryption: public webrtc::Encryption
{ {
public: public:
ViEAutotestEncryption() ViEAutotestEncryption()

View File

@ -21,10 +21,7 @@
#include "voe_codec.h" #include "voe_codec.h"
// TODO: remove using ... class ViEAutotestFileObserver: public webrtc::ViEFileObserver
using namespace std;
class ViEAutotestFileObserver: public ViEFileObserver
{ {
public: public:
ViEAutotestFileObserver() {}; ViEAutotestFileObserver() {};
@ -56,13 +53,13 @@ int ViEAutoTest::ViEFileStandardTest()
tbInterfaces interfaces = tbInterfaces("ViEFileStandardTest", tbInterfaces interfaces = tbInterfaces("ViEFileStandardTest",
numberOfErrors); numberOfErrors);
VideoEngine* ptrViE = interfaces.ptrViE; webrtc::VideoEngine* ptrViE = interfaces.ptrViE;
ViEBase* ptrViEBase = interfaces.ptrViEBase; webrtc::ViEBase* ptrViEBase = interfaces.ptrViEBase;
ViECapture* ptrViECapture = interfaces.ptrViECapture; webrtc::ViECapture* ptrViECapture = interfaces.ptrViECapture;
ViERender* ptrViERender = interfaces.ptrViERender; webrtc::ViERender* ptrViERender = interfaces.ptrViERender;
ViECodec* ptrViECodec = interfaces.ptrViECodec; webrtc::ViECodec* ptrViECodec = interfaces.ptrViECodec;
ViERTP_RTCP* ptrViERtpRtcp = interfaces.ptrViERtpRtcp; webrtc::ViERTP_RTCP* ptrViERtpRtcp = interfaces.ptrViERtpRtcp;
ViENetwork* ptrViENetwork = interfaces.ptrViENetwork; webrtc::ViENetwork* ptrViENetwork = interfaces.ptrViENetwork;
tbCaptureDevice captureDevice = tbCaptureDevice(interfaces, tbCaptureDevice captureDevice = tbCaptureDevice(interfaces,
numberOfErrors); numberOfErrors);
@ -82,14 +79,14 @@ int ViEAutoTest::ViEFileStandardTest()
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
error = ptrViERtpRtcp->SetRTCPStatus(videoChannel, error = ptrViERtpRtcp->SetRTCPStatus(videoChannel,
kRtcpCompound_RFC4585); webrtc::kRtcpCompound_RFC4585);
numberOfErrors += ViETest::TestError(error == 0, numberOfErrors += ViETest::TestError(error == 0,
"ERROR:%d %s at line %d", "ERROR:%d %s at line %d",
ptrViEBase->LastError(), ptrViEBase->LastError(),
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
error = ptrViERtpRtcp->SetKeyFrameRequestMethod( error = ptrViERtpRtcp->SetKeyFrameRequestMethod(
videoChannel, kViEKeyFrameRequestPliRtcp); videoChannel, webrtc::kViEKeyFrameRequestPliRtcp);
numberOfErrors += ViETest::TestError(error == 0, numberOfErrors += ViETest::TestError(error == 0,
"ERROR:%d %s at line %d", "ERROR:%d %s at line %d",
ptrViEBase->LastError(), ptrViEBase->LastError(),
@ -204,14 +201,14 @@ int ViEAutoTest::ViEFileStandardTest()
ptrViEBase->LastError(), ptrViEBase->LastError(),
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
ViEFile* ptrViEFile = ViEFile::GetInterface(ptrViE); webrtc::ViEFile* ptrViEFile = webrtc::ViEFile::GetInterface(ptrViE);
numberOfErrors += ViETest::TestError(error == 0, numberOfErrors += ViETest::TestError(error == 0,
"ERROR:%d %s at line %d", "ERROR:%d %s at line %d",
ptrViEBase->LastError(), ptrViEBase->LastError(),
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
VoiceEngine* ptrVEEngine = VoiceEngine::Create(); webrtc::VoiceEngine* ptrVEEngine = webrtc::VoiceEngine::Create();
VoEBase* ptrVEBase = VoEBase::GetInterface(ptrVEEngine); webrtc::VoEBase* ptrVEBase = webrtc::VoEBase::GetInterface(ptrVEEngine);
ptrVEBase->Init(); ptrVEBase->Init();
int audioChannel = ptrVEBase->CreateChannel(); int audioChannel = ptrVEBase->CreateChannel();
@ -256,9 +253,9 @@ int ViEAutoTest::ViEFileStandardTest()
const char outgoingVideo[1024] = VIE_TEST_FILES_ROOT "outgoingVideo.avi"; const char outgoingVideo[1024] = VIE_TEST_FILES_ROOT "outgoingVideo.avi";
char snapshotRenderFileName[256] = VIE_TEST_FILES_ROOT "snapshotRenderer.jpg"; char snapshotRenderFileName[256] = VIE_TEST_FILES_ROOT "snapshotRenderer.jpg";
ViEPicture capturePicture; webrtc::ViEPicture capturePicture;
ViEPicture renderPicture; webrtc::ViEPicture renderPicture;
ViEPicture renderTimeoutPicture; // TODO: init with and image webrtc::ViEPicture renderTimeoutPicture; // TODO: init with and image
ViEAutotestFileObserver fileObserver; ViEAutotestFileObserver fileObserver;
int fileId; int fileId;
@ -272,7 +269,8 @@ int ViEAutoTest::ViEFileStandardTest()
error = ptrViEFile->StartRecordIncomingVideo(videoChannel, error = ptrViEFile->StartRecordIncomingVideo(videoChannel,
incomingVideo, incomingVideo,
NO_AUDIO, audioCodec2, webrtc::NO_AUDIO,
audioCodec2,
videoCodec); videoCodec);
numberOfErrors += ViETest::TestError(error == 0, numberOfErrors += ViETest::TestError(error == 0,
"ERROR:%d %s at line %d", "ERROR:%d %s at line %d",
@ -393,7 +391,8 @@ int ViEAutoTest::ViEFileStandardTest()
"seconds", VIDEO_LENGTH); "seconds", VIDEO_LENGTH);
error = ptrViEFile->StartRecordOutgoingVideo(videoChannel, error = ptrViEFile->StartRecordOutgoingVideo(videoChannel,
outgoingVideo, outgoingVideo,
NO_AUDIO, audioCodec2, webrtc::NO_AUDIO,
audioCodec2,
videoCodec); videoCodec);
numberOfErrors += ViETest::TestError(error == 0, numberOfErrors += ViETest::TestError(error == 0,
"ERROR:%d %s at line %d", "ERROR:%d %s at line %d",

View File

@ -21,7 +21,7 @@
#include "tb_video_channel.h" #include "tb_video_channel.h"
#include "tb_capture_device.h" #include "tb_capture_device.h"
class MyEffectFilter: public ViEEffectFilter class MyEffectFilter: public webrtc::ViEEffectFilter
{ {
public: public:
MyEffectFilter() {} MyEffectFilter() {}

View File

@ -47,8 +47,8 @@ int VideoEngineSampleCode(void* window1, void* window2)
// //
// Create a VideoEngine instance // Create a VideoEngine instance
// //
VideoEngine* ptrViE = NULL; webrtc::VideoEngine* ptrViE = NULL;
ptrViE = VideoEngine::Create(); ptrViE = webrtc::VideoEngine::Create();
if (ptrViE == NULL) if (ptrViE == NULL)
{ {
printf("ERROR in VideoEngine::Create\n"); printf("ERROR in VideoEngine::Create\n");
@ -89,7 +89,7 @@ int VideoEngineSampleCode(void* window1, void* window2)
// //
// Init VideoEngine and create a channel // Init VideoEngine and create a channel
// //
ViEBase* ptrViEBase = ViEBase::GetInterface(ptrViE); webrtc::ViEBase* ptrViEBase = webrtc::ViEBase::GetInterface(ptrViE);
if (ptrViEBase == NULL) if (ptrViEBase == NULL)
{ {
printf("ERROR in ViEBase::GetInterface\n"); printf("ERROR in ViEBase::GetInterface\n");
@ -114,7 +114,8 @@ int VideoEngineSampleCode(void* window1, void* window2)
// //
// List available capture devices, allocate and connect. // List available capture devices, allocate and connect.
// //
ViECapture* ptrViECapture = ViECapture::GetInterface(ptrViE); webrtc::ViECapture* ptrViECapture =
webrtc::ViECapture::GetInterface(ptrViE);
if (ptrViEBase == NULL) if (ptrViEBase == NULL)
{ {
printf("ERROR in ViECapture::GetInterface\n"); printf("ERROR in ViECapture::GetInterface\n");
@ -191,22 +192,24 @@ int VideoEngineSampleCode(void* window1, void* window2)
// //
// RTP/RTCP settings // RTP/RTCP settings
// //
ViERTP_RTCP* ptrViERtpRtcp = ViERTP_RTCP::GetInterface(ptrViE); webrtc::ViERTP_RTCP* ptrViERtpRtcp =
webrtc::ViERTP_RTCP::GetInterface(ptrViE);
if (ptrViERtpRtcp == NULL) if (ptrViERtpRtcp == NULL)
{ {
printf("ERROR in ViERTP_RTCP::GetInterface\n"); printf("ERROR in ViERTP_RTCP::GetInterface\n");
return -1; return -1;
} }
error = ptrViERtpRtcp->SetRTCPStatus(videoChannel, kRtcpCompound_RFC4585); error = ptrViERtpRtcp->SetRTCPStatus(videoChannel,
webrtc::kRtcpCompound_RFC4585);
if (error == -1) if (error == -1)
{ {
printf("ERROR in ViERTP_RTCP::SetRTCPStatus\n"); printf("ERROR in ViERTP_RTCP::SetRTCPStatus\n");
return -1; return -1;
} }
error = ptrViERtpRtcp->SetKeyFrameRequestMethod(videoChannel, error = ptrViERtpRtcp->SetKeyFrameRequestMethod(
kViEKeyFrameRequestPliRtcp); videoChannel, webrtc::kViEKeyFrameRequestPliRtcp);
if (error == -1) if (error == -1)
{ {
printf("ERROR in ViERTP_RTCP::SetKeyFrameRequestMethod\n"); printf("ERROR in ViERTP_RTCP::SetKeyFrameRequestMethod\n");
@ -223,7 +226,7 @@ int VideoEngineSampleCode(void* window1, void* window2)
// //
// Set up rendering // Set up rendering
// //
ViERender* ptrViERender = ViERender::GetInterface(ptrViE); webrtc::ViERender* ptrViERender = webrtc::ViERender::GetInterface(ptrViE);
if (ptrViERender == NULL) if (ptrViERender == NULL)
{ {
printf("ERROR in ViERender::GetInterface\n"); printf("ERROR in ViERender::GetInterface\n");
@ -263,7 +266,7 @@ int VideoEngineSampleCode(void* window1, void* window2)
// //
// Setup codecs // Setup codecs
// //
ViECodec* ptrViECodec = ViECodec::GetInterface(ptrViE); webrtc::ViECodec* ptrViECodec = webrtc::ViECodec::GetInterface(ptrViE);
if (ptrViECodec == NULL) if (ptrViECodec == NULL)
{ {
printf("ERROR in ViECodec::GetInterface\n"); printf("ERROR in ViECodec::GetInterface\n");
@ -425,7 +428,8 @@ int VideoEngineSampleCode(void* window1, void* window2)
// //
// Address settings // Address settings
// //
ViENetwork* ptrViENetwork = ViENetwork::GetInterface(ptrViE); webrtc::ViENetwork* ptrViENetwork =
webrtc::ViENetwork::GetInterface(ptrViE);
if (ptrViENetwork == NULL) if (ptrViENetwork == NULL)
{ {
printf("ERROR in ViENetwork::GetInterface\n"); printf("ERROR in ViENetwork::GetInterface\n");
@ -600,7 +604,7 @@ int VideoEngineSampleCode(void* window1, void* window2)
return -1; return -1;
} }
bool deleted = VideoEngine::Delete(ptrViE); bool deleted = webrtc::VideoEngine::Delete(ptrViE);
if (deleted == false) if (deleted == false)
{ {
printf("ERROR in VideoEngine::Delete\n"); printf("ERROR in VideoEngine::Delete\n");

View File

@ -351,7 +351,7 @@ int ViEAutoTestMain::GetClassTestSelection()
return -1; return -1;
} }
bool ViEAutoTestMain::GetAnswer(int index, string& answer) bool ViEAutoTestMain::GetAnswer(int index, std::string& answer)
{ {
if (!_useAnswerFile || index > _answersCount) if (!_useAnswerFile || index > _answersCount)
{ {

View File

@ -27,7 +27,7 @@
#endif #endif
class ViEAutoTestNetworkObserver: public ViENetworkObserver class ViEAutoTestNetworkObserver: public webrtc::ViENetworkObserver
{ {
public: public:
ViEAutoTestNetworkObserver() ViEAutoTestNetworkObserver()
@ -40,7 +40,7 @@ public:
{ {
} }
virtual void PacketTimeout(const int videoChannel, 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, numberOfErrors += ViETest::TestError(error == 0,
"ERROR: %s at line %d", "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
error= ViE.ptrViERtpRtcp->SetKeyFrameRequestMethod(tbChannel.videoChannel, error= ViE.ptrViERtpRtcp->SetKeyFrameRequestMethod(
kViEKeyFrameRequestPliRtcp); tbChannel.videoChannel, webrtc::kViEKeyFrameRequestPliRtcp);
numberOfErrors += ViETest::TestError(error == 0, numberOfErrors += ViETest::TestError(error == 0,
"ERROR: %s at line %d", "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);

View File

@ -39,7 +39,7 @@
#elif defined(WEBRTC_MAC) #elif defined(WEBRTC_MAC)
#endif #endif
class ViEAutoTestExternalRenderer: public ExternalRenderer class ViEAutoTestExternalRenderer: public webrtc::ExternalRenderer
{ {
public: public:
ViEAutoTestExternalRenderer() : ViEAutoTestExternalRenderer() :
@ -169,9 +169,10 @@ int ViEAutoTest::ViERenderStandardTest()
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
// Destroy render module and create new in full screen mode // Destroy render module and create new in full screen mode
VideoRender::DestroyVideoRender(_vrm1); webrtc::VideoRender::DestroyVideoRender(_vrm1);
_vrm1 = NULL; _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", numberOfErrors += ViETest::TestError(_vrm1, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
@ -207,9 +208,10 @@ int ViEAutoTest::ViERenderStandardTest()
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
// Destroy full screen render module and create new in normal mode // Destroy full screen render module and create new in normal mode
VideoRender::DestroyVideoRender(_vrm1); webrtc::VideoRender::DestroyVideoRender(_vrm1);
_vrm1 = NULL; _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", numberOfErrors += ViETest::TestError(_vrm1, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
#endif #endif
@ -366,9 +368,10 @@ int ViEAutoTest::ViERenderExtendedTest()
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
// Destroy render module and create new in full screen mode // Destroy render module and create new in full screen mode
VideoRender::DestroyVideoRender(_vrm1); webrtc::VideoRender::DestroyVideoRender(_vrm1);
_vrm1 = NULL; _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", numberOfErrors += ViETest::TestError(_vrm1, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
@ -407,9 +410,10 @@ int ViEAutoTest::ViERenderExtendedTest()
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
// Destroy full screen render module and create new for external rendering // Destroy full screen render module and create new for external rendering
VideoRender::DestroyVideoRender(_vrm1); webrtc::VideoRender::DestroyVideoRender(_vrm1);
_vrm1 = NULL; _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", numberOfErrors += ViETest::TestError(_vrm1, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
@ -442,9 +446,10 @@ int ViEAutoTest::ViERenderExtendedTest()
// Destroy render module for external rendering and create new in normal // Destroy render module for external rendering and create new in normal
// mode // mode
VideoRender::DestroyVideoRender(_vrm1); webrtc::VideoRender::DestroyVideoRender(_vrm1);
_vrm1 = NULL; _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", numberOfErrors += ViETest::TestError(_vrm1, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);

View File

@ -22,7 +22,7 @@
#include "tb_interfaces.h" #include "tb_interfaces.h"
#include "tb_video_channel.h" #include "tb_video_channel.h"
class ViERtpObserver: public ViERTPObserver class ViERtpObserver: public webrtc::ViERTPObserver
{ {
public: public:
ViERtpObserver() ViERtpObserver()
@ -42,7 +42,7 @@ public:
} }
}; };
class ViERtcpObserver: public ViERTCPObserver class ViERtcpObserver: public webrtc::ViERTCPObserver
{ {
public: public:
int _channel; int _channel;
@ -161,10 +161,10 @@ int ViEAutoTest::ViERtpRtcpStandardTest()
numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
char returnCName[ViERTP_RTCP::KMaxRTCPCNameLength]; char returnCName[webrtc::ViERTP_RTCP::KMaxRTCPCNameLength];
memset(returnCName, 0, ViERTP_RTCP::KMaxRTCPCNameLength); memset(returnCName, 0, webrtc::ViERTP_RTCP::KMaxRTCPCNameLength);
error error = ViE.ptrViERtpRtcp->GetRTCPCName(tbChannel.videoChannel,
= ViE.ptrViERtpRtcp->GetRTCPCName(tbChannel.videoChannel, returnCName); returnCName);
numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
numberOfErrors += ViETest::TestError((strcmp(sendCName, returnCName) == 0), numberOfErrors += ViETest::TestError((strcmp(sendCName, returnCName) == 0),
@ -177,8 +177,8 @@ int ViEAutoTest::ViERtpRtcpStandardTest()
AutoTestSleep(1000); AutoTestSleep(1000);
char remoteCName[ViERTP_RTCP::KMaxRTCPCNameLength]; char remoteCName[webrtc::ViERTP_RTCP::KMaxRTCPCNameLength];
memset(remoteCName, 0, ViERTP_RTCP::KMaxRTCPCNameLength); memset(remoteCName, 0, webrtc::ViERTP_RTCP::KMaxRTCPCNameLength);
error = ViE.ptrViERtpRtcp->GetRemoteRTCPCName(tbChannel.videoChannel, error = ViE.ptrViERtpRtcp->GetRemoteRTCPCName(tbChannel.videoChannel,
remoteCName); remoteCName);
numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d",
@ -364,11 +364,11 @@ int ViEAutoTest::ViERtpRtcpStandardTest()
#endif #endif
error = ViE.ptrViERtpRtcp->StartRTPDump(tbChannel.videoChannel, inDumpName, error = ViE.ptrViERtpRtcp->StartRTPDump(tbChannel.videoChannel, inDumpName,
kRtpIncoming); webrtc::kRtpIncoming);
numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
error = ViE.ptrViERtpRtcp->StartRTPDump(tbChannel.videoChannel, error = ViE.ptrViERtpRtcp->StartRTPDump(tbChannel.videoChannel,
outDumpName, kRtpOutgoing); outDumpName, webrtc::kRtpOutgoing);
numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
@ -384,12 +384,12 @@ int ViEAutoTest::ViERtpRtcpStandardTest()
AutoTestSleep(1000); AutoTestSleep(1000);
error error = ViE.ptrViERtpRtcp->StopRTPDump(tbChannel.videoChannel,
= ViE.ptrViERtpRtcp->StopRTPDump(tbChannel.videoChannel, kRtpIncoming); webrtc::kRtpIncoming);
numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
error error = ViE.ptrViERtpRtcp->StopRTPDump(tbChannel.videoChannel,
= ViE.ptrViERtpRtcp->StopRTPDump(tbChannel.videoChannel, kRtpOutgoing); webrtc::kRtpOutgoing);
numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
@ -578,44 +578,45 @@ int ViEAutoTest::ViERtpRtcpAPITest()
// //
// Check different RTCP modes // Check different RTCP modes
// //
ViERTCPMode rtcpMode = kRtcpNone; webrtc::ViERTCPMode rtcpMode = webrtc::kRtcpNone;
error = ViE.ptrViERtpRtcp->GetRTCPStatus(tbChannel.videoChannel, rtcpMode); error = ViE.ptrViERtpRtcp->GetRTCPStatus(tbChannel.videoChannel, rtcpMode);
numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __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__, "ERROR: %s at line %d", __FUNCTION__,
__LINE__); __LINE__);
error = ViE.ptrViERtpRtcp->SetRTCPStatus(tbChannel.videoChannel, error = ViE.ptrViERtpRtcp->SetRTCPStatus(tbChannel.videoChannel,
kRtcpCompound_RFC4585); 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 == 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);
numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
@ -718,7 +719,7 @@ int ViEAutoTest::ViERtpRtcpAPITest()
"ERROR: %s at line %d", "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
error = ViE.ptrViERtpRtcp->SetRTCPStatus(tbChannel.videoChannel, error = ViE.ptrViERtpRtcp->SetRTCPStatus(tbChannel.videoChannel,
kRtcpCompound_RFC4585); webrtc::kRtcpCompound_RFC4585);
numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
tbChannel.StopSend(); tbChannel.StopSend();
@ -813,38 +814,39 @@ int ViEAutoTest::ViERtpRtcpAPITest()
const char* dumpName = "DumpFileName.rtp"; const char* dumpName = "DumpFileName.rtp";
#endif #endif
error = ViE.ptrViERtpRtcp->StartRTPDump(tbChannel.videoChannel, error = ViE.ptrViERtpRtcp->StartRTPDump(tbChannel.videoChannel,
dumpName, kRtpIncoming); dumpName, webrtc::kRtpIncoming);
numberOfErrors += ViETest::TestError(error == 0, numberOfErrors += ViETest::TestError(error == 0,
"ERROR: %s at line %d", "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
error = ViE.ptrViERtpRtcp->StopRTPDump(tbChannel.videoChannel, error = ViE.ptrViERtpRtcp->StopRTPDump(tbChannel.videoChannel,
kRtpIncoming); webrtc::kRtpIncoming);
numberOfErrors += ViETest::TestError(error == 0, numberOfErrors += ViETest::TestError(error == 0,
"ERROR: %s at line %d", "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
error = ViE.ptrViERtpRtcp->StopRTPDump(tbChannel.videoChannel, error = ViE.ptrViERtpRtcp->StopRTPDump(tbChannel.videoChannel,
kRtpIncoming); webrtc::kRtpIncoming);
numberOfErrors += ViETest::TestError(error == -1, numberOfErrors += ViETest::TestError(error == -1,
"ERROR: %s at line %d", "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
error = ViE.ptrViERtpRtcp->StartRTPDump(tbChannel.videoChannel, error = ViE.ptrViERtpRtcp->StartRTPDump(tbChannel.videoChannel,
dumpName, kRtpOutgoing); dumpName, webrtc::kRtpOutgoing);
numberOfErrors += ViETest::TestError(error == 0, numberOfErrors += ViETest::TestError(error == 0,
"ERROR: %s at line %d", "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
error = ViE.ptrViERtpRtcp->StopRTPDump(tbChannel.videoChannel, error = ViE.ptrViERtpRtcp->StopRTPDump(tbChannel.videoChannel,
kRtpOutgoing); webrtc::kRtpOutgoing);
numberOfErrors += ViETest::TestError(error == 0, numberOfErrors += ViETest::TestError(error == 0,
"ERROR: %s at line %d", "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
error = ViE.ptrViERtpRtcp->StopRTPDump(tbChannel.videoChannel, error = ViE.ptrViERtpRtcp->StopRTPDump(tbChannel.videoChannel,
kRtpOutgoing); webrtc::kRtpOutgoing);
numberOfErrors += ViETest::TestError(error == -1, numberOfErrors += ViETest::TestError(error == -1,
"ERROR: %s at line %d", "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
error = ViE.ptrViERtpRtcp->StartRTPDump(tbChannel.videoChannel, error = ViE.ptrViERtpRtcp->StartRTPDump(tbChannel.videoChannel,
dumpName, (RTPDirections) 3); dumpName,
(webrtc::RTPDirections) 3);
numberOfErrors += ViETest::TestError(error == -1, numberOfErrors += ViETest::TestError(error == -1,
"ERROR: %s at line %d", "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
@ -902,22 +904,22 @@ int ViEAutoTest::ViERtpRtcpAPITest()
// //
{ {
error = ViE.ptrViERtpRtcp->SetKeyFrameRequestMethod( error = ViE.ptrViERtpRtcp->SetKeyFrameRequestMethod(
tbChannel.videoChannel, kViEKeyFrameRequestPliRtcp); tbChannel.videoChannel, webrtc::kViEKeyFrameRequestPliRtcp);
numberOfErrors += ViETest::TestError(error == 0, numberOfErrors += ViETest::TestError(error == 0,
"ERROR: %s at line %d", "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
error = ViE.ptrViERtpRtcp->SetKeyFrameRequestMethod( error = ViE.ptrViERtpRtcp->SetKeyFrameRequestMethod(
tbChannel.videoChannel, kViEKeyFrameRequestPliRtcp); tbChannel.videoChannel, webrtc::kViEKeyFrameRequestPliRtcp);
numberOfErrors += ViETest::TestError(error == 0, numberOfErrors += ViETest::TestError(error == 0,
"ERROR: %s at line %d", "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
error = ViE.ptrViERtpRtcp->SetKeyFrameRequestMethod( error = ViE.ptrViERtpRtcp->SetKeyFrameRequestMethod(
tbChannel.videoChannel, kViEKeyFrameRequestNone); tbChannel.videoChannel, webrtc::kViEKeyFrameRequestNone);
numberOfErrors += ViETest::TestError(error == 0, numberOfErrors += ViETest::TestError(error == 0,
"ERROR: %s at line %d", "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);
error = ViE.ptrViERtpRtcp->SetKeyFrameRequestMethod( error = ViE.ptrViERtpRtcp->SetKeyFrameRequestMethod(
tbChannel.videoChannel, kViEKeyFrameRequestNone); tbChannel.videoChannel, webrtc::kViEKeyFrameRequestNone);
numberOfErrors += ViETest::TestError(error == 0, numberOfErrors += ViETest::TestError(error == 0,
"ERROR: %s at line %d", "ERROR: %s at line %d",
__FUNCTION__, __LINE__); __FUNCTION__, __LINE__);