diff --git a/src/video_engine/main/test/SimpleCocoaGUI/GUI_Defines.h b/src/video_engine/main/test/SimpleCocoaGUI/GUI_Defines.h
deleted file mode 100644
index 83828441b9..0000000000
--- a/src/video_engine/main/test/SimpleCocoaGUI/GUI_Defines.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-/*
- * GUI_Defines.h
- *
- */
-
-
-#ifndef WEBRTC_VIDEO_ENGINE_MAIN_TEST_SIMPLECOCOAGUI_GUI_DEFINES_H_
-#define WEBRTC_VIDEO_ENGINE_MAIN_TEST_SIMPLECOCOAGUI_GUI_DEFINES_H_
-
-#define ViE_TEST(x) if(-1 == x){ \
-int errNum = _ptrViEBase->LastError(); \
-NSLog(@"ERROR: %d at %s:%d", errNum, __FUNCTION__, __LINE__); \
-}
-
-
-// Video Engine Related
-#define V_CAPTURE_DEVICE_INDEX 0
-#define V_VIE_CAPTURE_ID 747
-#define V_DEVICE_NAME_LENGTH 256
-#define V_CODEC_INDEX 2
-#define V_IP_ADDRESS "127.0.0.1"
-#define V_RTP_PORT 8000
-
-
-
-#endif // WEBRTC_VIDEO_ENGINE_MAIN_TEST_SIMPLECOCOAGUI_GUI_DEFINES_H_
diff --git a/src/video_engine/main/test/SimpleCocoaGUI/SimpleCocoaGUI-Info.plist b/src/video_engine/main/test/SimpleCocoaGUI/SimpleCocoaGUI-Info.plist
deleted file mode 100644
index d0d3a18fe4..0000000000
--- a/src/video_engine/main/test/SimpleCocoaGUI/SimpleCocoaGUI-Info.plist
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
-
- CFBundleDevelopmentRegion
- English
- CFBundleExecutable
- ${EXECUTABLE_NAME}
- CFBundleIconFile
-
- CFBundleIdentifier
- com.yourcompany.${PRODUCT_NAME:rfc1034identifier}
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- ${PRODUCT_NAME}
- CFBundlePackageType
- APPL
- CFBundleShortVersionString
- 1.0
- CFBundleSignature
- ????
- CFBundleVersion
- 1
- LSMinimumSystemVersion
- ${MACOSX_DEPLOYMENT_TARGET}
- NSMainNibFile
- SimpleCocoaGUI
- NSPrincipalClass
- NSApplication
-
-
diff --git a/src/video_engine/main/test/SimpleCocoaGUI/SimpleCocoaGUIAppDelegate.h b/src/video_engine/main/test/SimpleCocoaGUI/SimpleCocoaGUIAppDelegate.h
deleted file mode 100644
index 10d52fc5ec..0000000000
--- a/src/video_engine/main/test/SimpleCocoaGUI/SimpleCocoaGUIAppDelegate.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-//
-// SimpleCocoaGUIAppDelegate.h
-//
-
-#import
-#include
-using namespace std;
-
-@class ViECocoaRenderView;
-
-#include "GUI_Defines.h"
-
-#include "common_types.h"
-#include "voe_base.h"
-
-#include "vie_base.h"
-#include "vie_capture.h"
-#include "vie_codec.h"
-#include "vie_file.h"
-#include "vie_network.h"
-#include "vie_render.h"
-#include "vie_rtp_rtcp.h"
-#include "vie_errors.h"
-
-
-
-@interface SimpleCocoaGUIAppDelegate : NSObject {
- NSWindow* _window;
- IBOutlet NSOpenGLView* _vieCocoaRenderView1;
- IBOutlet NSOpenGLView* _vieCocoaRenderView2;
- IBOutlet NSButton* _butRestartLoopback;
- VideoEngine* _ptrViE;
- ViEBase* _ptrViEBase;
- ViECapture* _ptrViECapture;
- ViERender* _ptrViERender;
- ViECodec* _ptrViECodec;
- ViENetwork* _ptrViENetwork;
-
- bool _fullScreen;
- int _videoChannel;
-
- int _captureId;
-
- VideoEngine* ptrViE;
- ViEBase* ptrViEBase;
- ViECapture* ptrViECapture;
- ViERTP_RTCP* ptrViERtpRtcp;
- ViERender* ptrViERender;
- ViECodec* ptrViECodec;
- ViENetwork* ptrViENetwork;
-}
-
-@property (assign) IBOutlet NSWindow* window;
--(void)createUI:(bool)fullScreen;
--(void)initViECocoaTest;
--(void)initializeVariables;
--(void)NSLogVideoCodecs;
--(void)startViECocoaTest;
--(int)initLoopback;
--(int)ioLooback;
--(int)startLoopback;
--(int)stopLooback;
-
--(IBAction)handleRestart:(id)sender;
-
-
-@end
diff --git a/src/video_engine/main/test/SimpleCocoaGUI/SimpleCocoaGUIAppDelegate.mm b/src/video_engine/main/test/SimpleCocoaGUI/SimpleCocoaGUIAppDelegate.mm
deleted file mode 100644
index d594cfe1f3..0000000000
--- a/src/video_engine/main/test/SimpleCocoaGUI/SimpleCocoaGUIAppDelegate.mm
+++ /dev/null
@@ -1,1075 +0,0 @@
-//
-// SimpleCocoaGUIAppDelegate.m
-//
-
-#import "SimpleCocoaGUIAppDelegate.h"
-
-@implementation SimpleCocoaGUIAppDelegate
-
-@synthesize window = _window;
-
-- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
-
-// [self initializeVariables];
- [self createUI];
-// [self initViECocoaTest];
-// [self NSLogVideoCodecs];
-// [self startViECocoaTest];
-
-// [self startLoopback];
-
- [self ioLooback];
-}
-
--(void)createUI{
-
- NSRect outWindow1Frame = NSMakeRect(200, 200, 200, 200);
- NSWindow* outWindow1 = [[NSWindow alloc] initWithContentRect:outWindow1Frame styleMask:NSTitledWindowMask backing:NSBackingStoreBuffered defer:NO];
- [outWindow1 orderOut:nil];
- NSRect vieAutotestCocoaRenderView1Frame = NSMakeRect(0, 0, 200, 200);
- _vieCocoaRenderView1 = [[ViECocoaRenderView alloc] initWithFrame:vieAutotestCocoaRenderView1Frame];
- [[outWindow1 contentView] addSubview:_vieCocoaRenderView1];
- [outWindow1 setTitle:[NSString stringWithFormat:@"window1"]];
- [outWindow1 makeKeyAndOrderFront:NSApp];
-
-
- NSRect outWindow2Frame = NSMakeRect(400, 200, 200, 200);
- NSWindow* outWindow2 = [[NSWindow alloc] initWithContentRect:outWindow2Frame styleMask:NSTitledWindowMask backing:NSBackingStoreBuffered defer:NO];
- [outWindow2 orderOut:nil];
- NSRect vieAutotestCocoaRenderView2Frame = NSMakeRect(0, 0, 200, 200);
- _vieCocoaRenderView2 = [[ViECocoaRenderView alloc] initWithFrame:vieAutotestCocoaRenderView2Frame];
- [[outWindow2 contentView] addSubview:_vieCocoaRenderView2];
- [outWindow2 setTitle:[NSString stringWithFormat:@"window2"]];
- [outWindow2 makeKeyAndOrderFront:NSApp];
-
-
-
-
-
-
-
-}
-
--(void)initViECocoaTest{
-
- int _error = 0;
- _ptrViE = VideoEngine::Create();
- _ptrViEBase = ViEBase::GetInterface(_ptrViE);
- _error = _ptrViEBase->Init();
-
- _ptrViECapture = ViECapture::GetInterface(_ptrViE);
- _ptrViERender = ViERender::GetInterface(_ptrViE);
- _ptrViECodec = ViECodec::GetInterface(_ptrViE);
- _ptrViENetwork = ViENetwork::GetInterface(_ptrViE);
-
-
- _error = _ptrViE->SetTraceFile("ViEBaseStandardTest.txt");
- _error = _ptrViE->SetEncryptedTraceFile("ViEBaseStandardTestEncrypted.txt");
-
-
-}
-
-
--(void)initializeVariables{
- _fullScreen = YES;
-}
-
--(void)NSLogVideoCodecs{
- NSLog(@"Searching for video codecs.....");
-
- VideoCodec videoCodec;
- memset(&videoCodec, 0, sizeof(VideoCodec));
- for(int index = 0; index < _ptrViECodec->NumberOfCodecs(); index++)
- {
- ViE_TEST(_ptrViECodec->GetCodec(index, videoCodec));
- NSLog(@"Video codec found: %s", videoCodec.plName);
- }
-
-}
--(void)startViECocoaTest{
-
-
-
-
- int error=0;
-
- char deviceName[128];
- char deviceUniqueName[512];
- int captureId = 0;
- int dummy = 0;
-
- //ViE_TEST(_ptrViEBase->CreateChannel(_videoChannel));
- //ViE_TEST(_ptrViECapture->GetCaptureDevice(0,deviceName,sizeof(deviceName),deviceUniqueName,sizeof(deviceUniqueName)));
- //ViE_TEST(_ptrViECapture->AllocateCaptureDevice(deviceUniqueName,sizeof(deviceUniqueName),captureId));
- //ViE_TEST(_ptrViECapture->AllocateCaptureDevice("dummydevicethatdoesnotexist",sizeof(deviceUniqueName),dummy));
-
- char captureDeviceName[V_DEVICE_NAME_LENGTH] = "";
- char captureDeviceUniqueId[V_DEVICE_NAME_LENGTH] = "";
- int captureDeviceId = 0;
-
-
-
- ViE_TEST(_ptrViE->SetTraceFilter(webrtc::TR_ALL));
- ViE_TEST(_ptrViE->SetTraceFile("ViECocoaTrace.txt"));
- ViE_TEST(_ptrViE->SetEncryptedTraceFile("ViECocoaEncryptedTrace.txt"));
-
-
-
-
- // base
- ViE_TEST(_ptrViEBase->CreateChannel(_videoChannel));
-
- // capture device
- ViE_TEST(_ptrViECapture->GetCaptureDevice(V_CAPTURE_DEVICE_INDEX, captureDeviceName, V_DEVICE_NAME_LENGTH, captureDeviceUniqueId, V_DEVICE_NAME_LENGTH));
- ViE_TEST(_ptrViECapture->AllocateCaptureDevice(captureDeviceUniqueId, V_DEVICE_NAME_LENGTH, captureDeviceId));
- ViE_TEST(_ptrViECapture->ConnectCaptureDevice(captureDeviceId, _videoChannel));
- ViE_TEST(_ptrViECapture->StartCapture(captureDeviceId));
-
- // renderer
- ViE_TEST(_ptrViERender->AddRenderer(captureDeviceId, (void*)_vieCocoaRenderView1, 0, 0.0, 0.0, 1.0, 1.0));
- ViE_TEST(_ptrViERender->StartRender(captureDeviceId));
-// usleep(3 * 1000);
-// ViE_TEST(_ptrViERender->RemoveRenderer(captureDeviceId));
- //exit(0);
-
-
-// // codec
-// [self NSLogVideoCodecs];
-// VideoCodec videoCodec;
-// memset(&videoCodec, 0, sizeof(VideoCodec));
-// ViE_TEST(_ptrViECodec->GetCodec(V_CODEC_INDEX, videoCodec));
-// ViE_TEST(_ptrViECodec->SetReceiveCodec(_videoChannel, videoCodec));
-// ViE_TEST(_ptrViECodec->SetSendCodec(_videoChannel, videoCodec));
-//
-// // network + base
-// ViE_TEST(_ptrViENetwork->SetLocalReceiver(_videoChannel, V_RTP_PORT));
-// ViE_TEST(_ptrViEBase->StartReceive(_videoChannel));
-// ViE_TEST(_ptrViENetwork->SetSendDestination(_videoChannel, V_IP_ADDRESS, V_RTP_PORT));
-// ViE_TEST(_ptrViEBase->StartSend(_videoChannel));
-// ViE_TEST(_ptrViERender->MirrorRenderStream(captureDeviceId, true, false, true));
-
-
-}
-
--(int)initLoopback
-{
-
-}
--(int)startLoopback
-{
- //********************************************************
- // Begin create/initialize Video Engine for testing
- //********************************************************
-
- int error = 0;
- bool succeeded = true;
- int numberOfErrors = 0;
- std::string str;
-
- //
- // Create a VideoEngine instance
- //
-// VideoEngine* ptrViE = NULL;
- ptrViE = VideoEngine::Create();
- if (ptrViE == NULL)
- {
- printf("ERROR in VideoEngine::Create\n");
- return -1;
- }
-
- error = ptrViE->SetTraceFilter(webrtc::TR_ALL);
- if (error == -1)
- {
- printf("ERROR in VideoEngine::SetTraceLevel\n");
- return -1;
- }
-
-
- error = ptrViE->SetTraceFile("ViETrace.txt");
- if (error == -1)
- {
- printf("ERROR in VideoEngine::SetTraceFile\n");
- return -1;
- }
-
- error = ptrViE->SetEncryptedTraceFile("ViEEncryptedTrace.txt");
- if (error == -1)
- {
- printf("ERROR in VideoEngine::SetEncryptedTraceFile\n");
- return -1;
- }
-
- //
- // Init VideoEngine and create a channel
- //
- ptrViEBase = ViEBase::GetInterface(ptrViE);
- if (ptrViEBase == NULL)
- {
- printf("ERROR in ViEBase::GetInterface\n");
- return -1;
- }
-
- error = ptrViEBase->Init();
- if (error == -1)
- {
- printf("ERROR in ViEBase::Init\n");
- return -1;
- }
-
- int videoChannel = -1;
- error = ptrViEBase->CreateChannel(_videoChannel);
- if (error == -1)
- {
- printf("ERROR in ViEBase::CreateChannel\n");
- return -1;
- }
-
- //
- // List available capture devices, allocate and connect.
- //
- ptrViECapture = ViECapture::GetInterface(ptrViE);
- if (ptrViEBase == NULL)
- {
- printf("ERROR in ViECapture::GetInterface\n");
- return -1;
- }
-
- const unsigned int KMaxDeviceNameLength = 128;
- const unsigned int KMaxUniqueIdLength = 256;
- char deviceName[KMaxDeviceNameLength];
- memset(deviceName, 0, KMaxDeviceNameLength);
- char uniqueId[KMaxUniqueIdLength];
- memset(uniqueId, 0, KMaxUniqueIdLength);
-
- std::cout << std::endl;
- std::cout << "Available capture devices:" << std::endl;
- unsigned int captureIdx = 0;
- for (captureIdx = 0;
- captureIdx < ptrViECapture->NumberOfCaptureDevices();
- captureIdx++)
- {
- memset(deviceName, 0, KMaxDeviceNameLength);
- memset(uniqueId, 0, KMaxUniqueIdLength);
-
- error = ptrViECapture->GetCaptureDevice(captureIdx,
- deviceName, KMaxDeviceNameLength, uniqueId, KMaxUniqueIdLength);
- if (error == -1)
- {
- printf("ERROR in ViECapture::GetCaptureDevice\n");
- return -1;
- }
- std::cout << " " << captureIdx+1 << ". " << deviceName
- << std::endl;
- }
- std::cout << std::endl;
- std::cout << "Choose capture devices: ";
-// std::getline(std::cin, str);
-// captureIdx = atoi(str.c_str()) - 1;
- captureIdx = 0;
- error = ptrViECapture->GetCaptureDevice(captureIdx, deviceName,
- KMaxDeviceNameLength, uniqueId, KMaxUniqueIdLength);
- if (error == -1)
- {
- printf("ERROR in ViECapture::GetCaptureDevice\n");
- return -1;
- }
-
- _captureId = 0;
- error = ptrViECapture->AllocateCaptureDevice(uniqueId,
- KMaxUniqueIdLength, _captureId);
- if (error == -1)
- {
- printf("ERROR in ViECapture::AllocateCaptureDevice\n");
- return -1;
- }
-
- error = ptrViECapture->ConnectCaptureDevice(_captureId,
- _videoChannel);
- if (error == -1)
- {
- printf("ERROR in ViECapture::ConnectCaptureDevice\n");
- return -1;
- }
-
- error = ptrViECapture->StartCapture(_captureId);
- if (error == -1)
- {
- printf("ERROR in ViECapture::StartCapture\n");
- return -1;
- }
-
- //
- // RTP/RTCP settings
- //
- ptrViERtpRtcp = ViERTP_RTCP::GetInterface(ptrViE);
- if (ptrViERtpRtcp == NULL)
- {
- printf("ERROR in ViERTP_RTCP::GetInterface\n");
- return -1;
- }
-
- error = ptrViERtpRtcp->SetRTCPStatus(_videoChannel,
- kRtcpCompound_RFC4585);
- if (error == -1)
- {
- printf("ERROR in ViERTP_RTCP::SetRTCPStatus\n");
- return -1;
- }
-
- error = ptrViERtpRtcp->SetKeyFrameRequestMethod(_videoChannel,
- kViEKeyFrameRequestPliRtcp);
- if (error == -1)
- {
- printf("ERROR in ViERTP_RTCP::SetKeyFrameRequestMethod\n");
- return -1;
- }
-
- error = ptrViERtpRtcp->SetTMMBRStatus(_videoChannel, true);
- if (error == -1)
- {
- printf("ERROR in ViERTP_RTCP::SetTMMBRStatus\n");
- return -1;
- }
-
- //
- // Set up rendering
- //
- ptrViERender = ViERender::GetInterface(ptrViE);
- if (ptrViERender == NULL)
- {
- printf("ERROR in ViERender::GetInterface\n");
- return -1;
- }
-
- error = ptrViERender->AddRenderer(_captureId, _vieCocoaRenderView1,
- 0, 0.0, 0.0, 1.0, 1.0);
- if (error == -1)
- {
- printf("ERROR in ViERender::AddRenderer\n");
- return -1;
- }
-
- error = ptrViERender->StartRender(_captureId);
- if (error == -1)
- {
- printf("ERROR in ViERender::StartRender\n");
- return -1;
- }
-
- error = ptrViERender->AddRenderer(_videoChannel, _vieCocoaRenderView2,
- 1, 0.0, 0.0, 1.0, 1.0);
- if (error == -1)
- {
- printf("ERROR in ViERender::AddRenderer\n");
- return -1;
- }
-
- error = ptrViERender->StartRender(_videoChannel);
- if (error == -1)
- {
- printf("ERROR in ViERender::StartRender\n");
- return -1;
- }
-
- //
- // Setup codecs
- //
- ptrViECodec = ViECodec::GetInterface(ptrViE);
- if (ptrViECodec == NULL)
- {
- printf("ERROR in ViECodec::GetInterface\n");
- return -1;
- }
-
- std::cout << std::endl;
- std::cout << "Available codecs:" << std::endl;
-
- // Check available codecs and prepare receive codecs
- VideoCodec videoCodec;
- memset(&videoCodec, 0, sizeof(VideoCodec));
- unsigned int codecIdx = 0;
- for (codecIdx = 0;
- codecIdx < ptrViECodec->NumberOfCodecs();
- codecIdx++)
- {
- error = ptrViECodec->GetCodec(codecIdx, videoCodec);
- if (error == -1)
- {
- printf("ERROR in ViECodec::GetCodec\n");
- return -1;
- }
-
- error = ptrViECodec->SetReceiveCodec(_videoChannel,
- videoCodec);
- if (error == -1)
- {
- printf("ERROR in ViECodec::SetReceiveCodec\n");
- return -1;
- }
- if (videoCodec.codecType != kVideoCodecRED &&
- videoCodec.codecType != kVideoCodecULPFEC)
- {
- std::cout << " " << codecIdx+1 << ". " << videoCodec.plName
- << std::endl;
- }
- }
-// std::cout << std::endl;
-// std::cout << "Choose codec: ";
-// std::getline(std::cin, str);
-// codecIdx = atoi(str.c_str()) - 1;
- codecIdx = 0;
-
- error = ptrViECodec->GetCodec(codecIdx, videoCodec);
- if (error == -1)
- {
- printf("ERROR in ViECodec::GetCodec\n");
- return -1;
- }
-
- error = ptrViECodec->SetSendCodec(_videoChannel, videoCodec);
- if (error == -1)
- {
- printf("ERROR in ViECodec::SetSendCodec\n");
- return -1;
- }
-
- //
- // Address settings
- //
- ptrViENetwork = ViENetwork::GetInterface(ptrViE);
- if (ptrViENetwork == NULL)
- {
- printf("ERROR in ViENetwork::GetInterface\n");
- return -1;
- }
-
- const char* ipAddress = "127.0.0.1";
- const unsigned short rtpPort = 6000;
- error = ptrViENetwork->SetLocalReceiver(_videoChannel, rtpPort);
- if (error == -1)
- {
- printf("ERROR in ViENetwork::SetLocalReceiver\n");
- return -1;
- }
-
- error = ptrViEBase->StartReceive(_videoChannel);
- if (error == -1)
- {
- printf("ERROR in ViENetwork::StartReceive\n");
- return -1;
- }
-
- error = ptrViENetwork->SetSendDestination(_videoChannel,
- ipAddress, rtpPort);
- if (error == -1)
- {
- printf("ERROR in ViENetwork::SetSendDestination\n");
- return -1;
- }
-
- error = ptrViEBase->StartSend(_videoChannel);
- if (error == -1)
- {
- printf("ERROR in ViENetwork::StartSend\n");
- return -1;
- }
-
-
- //********************************************************
- // Engine started
- //********************************************************
-
-
- // Call started
- std::cout << std::endl;
- std::cout << "Loopback call started" << std::endl;
-// std::cout << std::endl << std::endl;
-// std::cout << "Press enter to stop...";
-// std::getline(std::cin, str);
-}
-
--(int)stopLooback
-{
- int error = 0;
-
-
-
- //********************************************************
- // Testing finished. Tear down Video Engine
- //********************************************************
-
- error = ptrViEBase->StopReceive(_videoChannel);
- if (error == -1)
- {
- printf("ERROR in ViEBase::StopReceive\n");
- return -1;
- }
-
- error = ptrViEBase->StopSend(_videoChannel);
- if (error == -1)
- {
- printf("ERROR in ViEBase::StopSend\n");
- return -1;
- }
-
- error = ptrViERender->StopRender(_captureId);
- if (error == -1)
- {
- printf("ERROR in ViERender::StopRender\n");
- return -1;
- }
-
- error = ptrViERender->RemoveRenderer(_captureId);
- if (error == -1)
- {
- printf("ERROR in ViERender::RemoveRenderer\n");
- return -1;
- }
-
- error = ptrViERender->StopRender(_videoChannel);
- if (error == -1)
- {
- printf("ERROR in ViERender::StopRender\n");
- return -1;
- }
-
- error = ptrViERender->RemoveRenderer(_videoChannel);
- if (error == -1)
- {
- printf("ERROR in ViERender::RemoveRenderer\n");
- return -1;
- }
-
- error = ptrViECapture->StopCapture(_captureId);
- if (error == -1)
- {
- printf("ERROR in ViECapture::StopCapture\n");
- return -1;
- }
-
- error = ptrViECapture->DisconnectCaptureDevice(_videoChannel);
- if (error == -1)
- {
- printf("ERROR in ViECapture::DisconnectCaptureDevice\n");
- return -1;
- }
-
- error = ptrViECapture->ReleaseCaptureDevice(_captureId);
- if (error == -1)
- {
- printf("ERROR in ViECapture::ReleaseCaptureDevice\n");
- return -1;
- }
-
- error = ptrViEBase->DeleteChannel(_videoChannel);
- if (error == -1)
- {
- printf("ERROR in ViEBase::DeleteChannel\n");
- return -1;
- }
-
- int remainingInterfaces = 0;
- remainingInterfaces = ptrViECodec->Release();
- remainingInterfaces += ptrViECapture->Release();
- remainingInterfaces += ptrViERtpRtcp->Release();
- remainingInterfaces += ptrViERender->Release();
- remainingInterfaces += ptrViENetwork->Release();
- remainingInterfaces += ptrViEBase->Release();
- if (remainingInterfaces > 0)
- {
- printf("ERROR: Could not release all interfaces\n");
- return -1;
- }
-
- bool deleted = VideoEngine::Delete(ptrViE);
- if (deleted == false)
- {
- printf("ERROR in VideoEngine::Delete\n");
- return -1;
- }
-
- return 0;
-
- // ===================================================================
- //
- // END: VideoEngine 3.0 Sample Code
- //
- // ===================================================================
-
-
-}
-
--(int)ioLooback
-{
- //********************************************************
- // Begin create/initialize Video Engine for testing
- //********************************************************
-
- int error = 0;
- bool succeeded = true;
- int numberOfErrors = 0;
- std::string str;
-
- //
- // Create a VideoEngine instance
- //
- VideoEngine* ptrViE = NULL;
- ptrViE = VideoEngine::Create();
- if (ptrViE == NULL)
- {
- printf("ERROR in VideoEngine::Create\n");
- return -1;
- }
-
- error = ptrViE->SetTraceFilter(webrtc::TR_ALL);
- if (error == -1)
- {
- printf("ERROR in VideoEngine::SetTraceLevel\n");
- return -1;
- }
-
-
- error = ptrViE->SetTraceFile("ViETrace.txt");
- if (error == -1)
- {
- printf("ERROR in VideoEngine::SetTraceFile\n");
- return -1;
- }
-
- error = ptrViE->SetEncryptedTraceFile("ViEEncryptedTrace.txt");
- if (error == -1)
- {
- printf("ERROR in VideoEngine::SetEncryptedTraceFile\n");
- return -1;
- }
-
- //
- // Init VideoEngine and create a channel
- //
- ViEBase* ptrViEBase = ViEBase::GetInterface(ptrViE);
- if (ptrViEBase == NULL)
- {
- printf("ERROR in ViEBase::GetInterface\n");
- return -1;
- }
-
- error = ptrViEBase->Init();
- if (error == -1)
- {
- printf("ERROR in ViEBase::Init\n");
- return -1;
- }
-
- int videoChannel = -1;
- error = ptrViEBase->CreateChannel(videoChannel);
- if (error == -1)
- {
- printf("ERROR in ViEBase::CreateChannel\n");
- return -1;
- }
-
- //
- // List available capture devices, allocate and connect.
- //
- ViECapture* ptrViECapture =
- ViECapture::GetInterface(ptrViE);
- if (ptrViEBase == NULL)
- {
- printf("ERROR in ViECapture::GetInterface\n");
- return -1;
- }
-
- const unsigned int KMaxDeviceNameLength = 128;
- const unsigned int KMaxUniqueIdLength = 256;
- char deviceName[KMaxDeviceNameLength];
- memset(deviceName, 0, KMaxDeviceNameLength);
- char uniqueId[KMaxUniqueIdLength];
- memset(uniqueId, 0, KMaxUniqueIdLength);
-
- std::cout << std::endl;
- std::cout << "Available capture devices:" << std::endl;
- unsigned int captureIdx = 0;
- for (captureIdx = 0;
- captureIdx < ptrViECapture->NumberOfCaptureDevices();
- captureIdx++)
- {
- memset(deviceName, 0, KMaxDeviceNameLength);
- memset(uniqueId, 0, KMaxUniqueIdLength);
-
- error = ptrViECapture->GetCaptureDevice(captureIdx,
- deviceName, KMaxDeviceNameLength, uniqueId, KMaxUniqueIdLength);
- if (error == -1)
- {
- printf("ERROR in ViECapture::GetCaptureDevice\n");
- return -1;
- }
- std::cout << " " << captureIdx+1 << ". " << deviceName
- << std::endl;
- }
- std::cout << std::endl;
- std::cout << "Choose capture devices: ";
-// std::getline(std::cin, str);
-// captureIdx = atoi(str.c_str()) - 1;
- captureIdx = 0;
- error = ptrViECapture->GetCaptureDevice(captureIdx, deviceName,
- KMaxDeviceNameLength, uniqueId, KMaxUniqueIdLength);
- if (error == -1)
- {
- printf("ERROR in ViECapture::GetCaptureDevice\n");
- return -1;
- }
-
- int captureId = 0;
- error = ptrViECapture->AllocateCaptureDevice(uniqueId,
- KMaxUniqueIdLength, captureId);
- if (error == -1)
- {
- printf("ERROR in ViECapture::AllocateCaptureDevice\n");
- return -1;
- }
-
- error = ptrViECapture->ConnectCaptureDevice(captureId,
- videoChannel);
- if (error == -1)
- {
- printf("ERROR in ViECapture::ConnectCaptureDevice\n");
- return -1;
- }
-
- error = ptrViECapture->StartCapture(captureId);
- if (error == -1)
- {
- printf("ERROR in ViECapture::StartCapture\n");
- return -1;
- }
-
- //
- // RTP/RTCP settings
- //
- ViERTP_RTCP* ptrViERtpRtcp =
- ViERTP_RTCP::GetInterface(ptrViE);
- if (ptrViERtpRtcp == NULL)
- {
- printf("ERROR in ViERTP_RTCP::GetInterface\n");
- return -1;
- }
-
- error = ptrViERtpRtcp->SetRTCPStatus(videoChannel,
- kRtcpCompound_RFC4585);
- if (error == -1)
- {
- printf("ERROR in ViERTP_RTCP::SetRTCPStatus\n");
- return -1;
- }
-
- error = ptrViERtpRtcp->SetKeyFrameRequestMethod(videoChannel,
- kViEKeyFrameRequestPliRtcp);
- if (error == -1)
- {
- printf("ERROR in ViERTP_RTCP::SetKeyFrameRequestMethod\n");
- return -1;
- }
-
- error = ptrViERtpRtcp->SetTMMBRStatus(videoChannel, true);
- if (error == -1)
- {
- printf("ERROR in ViERTP_RTCP::SetTMMBRStatus\n");
- return -1;
- }
-
- //
- // Set up rendering
- //
- ViERender* ptrViERender =
- ViERender::GetInterface(ptrViE);
- if (ptrViERender == NULL)
- {
- printf("ERROR in ViERender::GetInterface\n");
- return -1;
- }
-
-// error = ptrViERender->EnableFullScreenRender(_vieCocoaRenderView1);
-// if (error == -1)
-// {
-// printf("ERROR in ViERender::AddRenderer\n");
-// return -1;
-// }
-
-
- error = ptrViERender->AddRenderer(captureId, _vieCocoaRenderView1,
- 0, 0.5, 0.5, 1.0, 1.0);
- if (error == -1)
- {
- printf("ERROR in ViERender::AddRenderer\n");
- return -1;
- }
-
- error = ptrViERender->StartRender(captureId);
- if (error == -1)
- {
- printf("ERROR in ViERender::StartRender\n");
- return -1;
- }
-
- error = ptrViERender->AddRenderer(videoChannel, _vieCocoaRenderView2,
- 1, 0.0, 0.0, 1.0, 1.0);
- if (error == -1)
- {
- printf("ERROR in ViERender::AddRenderer\n");
- return -1;
- }
-
- error = ptrViERender->StartRender(videoChannel);
- if (error == -1)
- {
- printf("ERROR in ViERender::StartRender\n");
- return -1;
- }
-
- //
- // Setup codecs
- //
- ViECodec* ptrViECodec = ViECodec::GetInterface(ptrViE);
- if (ptrViECodec == NULL)
- {
- printf("ERROR in ViECodec::GetInterface\n");
- return -1;
- }
-
- std::cout << std::endl;
- std::cout << "Available codecs:" << std::endl;
-
- // Check available codecs and prepare receive codecs
- VideoCodec videoCodec;
- memset(&videoCodec, 0, sizeof(VideoCodec));
- unsigned int codecIdx = 0;
- for (codecIdx = 0;
- codecIdx < ptrViECodec->NumberOfCodecs();
- codecIdx++)
- {
- error = ptrViECodec->GetCodec(codecIdx, videoCodec);
- if (error == -1)
- {
- printf("ERROR in ViECodec::GetCodec\n");
- return -1;
- }
-
- error = ptrViECodec->SetReceiveCodec(videoChannel,
- videoCodec);
- if (error == -1)
- {
- printf("ERROR in ViECodec::SetReceiveCodec\n");
- return -1;
- }
- if (videoCodec.codecType != kVideoCodecRED &&
- videoCodec.codecType != kVideoCodecULPFEC)
- {
- std::cout << " " << codecIdx+1 << ". " << videoCodec.plName
- << std::endl;
- }
- }
- std::cout << std::endl;
- std::cout << "Choose codec: ";
-// std::getline(std::cin, str);
-// codecIdx = atoi(str.c_str()) - 1;
-
-
- error = ptrViECapture->ShowCaptureSettingsDialogBox("unique",10, "mytitle");
- codecIdx = 0;
- error = ptrViECodec->GetCodec(codecIdx, videoCodec);
- if (error == -1)
- {
- printf("ERROR in ViECodec::GetCodec\n");
- return -1;
- }
-
- error = ptrViECodec->SetSendCodec(videoChannel, videoCodec);
- if (error == -1)
- {
- printf("ERROR in ViECodec::SetSendCodec\n");
- return -1;
- }
-
- //
- // Address settings
- //
- ViENetwork* ptrViENetwork =
- ViENetwork::GetInterface(ptrViE);
- if (ptrViENetwork == NULL)
- {
- printf("ERROR in ViENetwork::GetInterface\n");
- return -1;
- }
-
- const char* ipAddress = "127.0.0.1";
- const unsigned short rtpPort = 6000;
- error = ptrViENetwork->SetLocalReceiver(videoChannel, rtpPort);
- if (error == -1)
- {
- printf("ERROR in ViENetwork::SetLocalReceiver\n");
- return -1;
- }
-
- error = ptrViEBase->StartReceive(videoChannel);
- if (error == -1)
- {
- printf("ERROR in ViENetwork::StartReceive\n");
- return -1;
- }
-
- error = ptrViENetwork->SetSendDestination(videoChannel,
- ipAddress, rtpPort);
- if (error == -1)
- {
- printf("ERROR in ViENetwork::SetSendDestination\n");
- return -1;
- }
-
- error = ptrViEBase->StartSend(videoChannel);
- if (error == -1)
- {
- printf("ERROR in ViENetwork::StartSend\n");
- return -1;
- }
-
-
- //********************************************************
- // Engine started
- //********************************************************
-
-
- // Call started
- std::cout << std::endl;
- std::cout << "Loopback call started" << std::endl;
- std::cout << std::endl << std::endl;
- std::cout << "Press enter to stop...";
-// [[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:1]];
-// std::getline(std::cin, str);
- usleep(5 * 1000 * 1000);
-
- //int i = 0;
-// while(1)
-// {
-// NSLog(@"app iteration %d", i);
-// i++;
-// [[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:1]];
-// std::getline(std::cin, str);
-// if(i > 3)
-// {
-// break;
-// }
-// }
-
- //********************************************************
- // Testing finished. Tear down Video Engine
- //********************************************************
-
- error = ptrViEBase->StopReceive(videoChannel);
- if (error == -1)
- {
- printf("ERROR in ViEBase::StopReceive\n");
- return -1;
- }
-
- error = ptrViEBase->StopSend(videoChannel);
- if (error == -1)
- {
- printf("ERROR in ViEBase::StopSend\n");
- return -1;
- }
-
- error = ptrViERender->StopRender(captureId);
- if (error == -1)
- {
- printf("ERROR in ViERender::StopRender\n");
- return -1;
- }
-
- error = ptrViERender->RemoveRenderer(captureId);
- if (error == -1)
- {
- printf("ERROR in ViERender::RemoveRenderer\n");
- return -1;
- }
-
- error = ptrViERender->StopRender(videoChannel);
- if (error == -1)
- {
- printf("ERROR in ViERender::StopRender\n");
- return -1;
- }
-
- error = ptrViERender->RemoveRenderer(videoChannel);
- if (error == -1)
- {
- printf("ERROR in ViERender::RemoveRenderer\n");
- return -1;
- }
-
- error = ptrViECapture->StopCapture(captureId);
- if (error == -1)
- {
- printf("ERROR in ViECapture::StopCapture\n");
- return -1;
- }
-
- error = ptrViECapture->DisconnectCaptureDevice(videoChannel);
- if (error == -1)
- {
- printf("ERROR in ViECapture::DisconnectCaptureDevice\n");
- return -1;
- }
-
- error = ptrViECapture->ReleaseCaptureDevice(captureId);
- if (error == -1)
- {
- printf("ERROR in ViECapture::ReleaseCaptureDevice\n");
- return -1;
- }
-
- error = ptrViEBase->DeleteChannel(videoChannel);
- if (error == -1)
- {
- printf("ERROR in ViEBase::DeleteChannel\n");
- return -1;
- }
-
- int remainingInterfaces = 0;
- remainingInterfaces = ptrViECodec->Release();
- remainingInterfaces += ptrViECapture->Release();
- remainingInterfaces += ptrViERtpRtcp->Release();
- remainingInterfaces += ptrViERender->Release();
- remainingInterfaces += ptrViENetwork->Release();
- remainingInterfaces += ptrViEBase->Release();
- if (remainingInterfaces > 0)
- {
- printf("ERROR: Could not release all interfaces\n");
- return -1;
- }
-
- bool deleted = VideoEngine::Delete(ptrViE);
- if (deleted == false)
- {
- printf("ERROR in VideoEngine::Delete\n");
- return -1;
- }
-
- NSLog(@"Finished function");
- return 0;
-
- //
- // END: VideoEngine 3.0 Sample Code
- //
- // ===================================================================
-}
-
-
-
-
--(IBAction)handleRestart:(id)sender
-{
-// [self stopLooback];
-// [self startLoopback];
- [self ioLooback];
-}
-@end
diff --git a/src/video_engine/main/test/SimpleCocoaGUI/SimpleCocoaGUI_Prefix.pch b/src/video_engine/main/test/SimpleCocoaGUI/SimpleCocoaGUI_Prefix.pch
deleted file mode 100644
index 72b5870875..0000000000
--- a/src/video_engine/main/test/SimpleCocoaGUI/SimpleCocoaGUI_Prefix.pch
+++ /dev/null
@@ -1,7 +0,0 @@
-//
-// Prefix header for all source files of the 'SimpleCocoaGUI' target in the 'SimpleCocoaGUI' project
-//
-
-#ifdef __OBJC__
- #import
-#endif
diff --git a/src/video_engine/main/test/SimpleCocoaGUI/main.m b/src/video_engine/main/test/SimpleCocoaGUI/main.m
deleted file mode 100644
index 9d52a1c3ce..0000000000
--- a/src/video_engine/main/test/SimpleCocoaGUI/main.m
+++ /dev/null
@@ -1,12 +0,0 @@
-//
-// main.m
-// SimpleCocoaGUI
-//
-//
-
-#import
-
-int main(int argc, char *argv[])
-{
- return NSApplicationMain(argc, (const char **) argv);
-}
diff --git a/src/video_engine/main/test/WindowsTest/Capture.rc b/src/video_engine/main/test/WindowsTest/Capture.rc
deleted file mode 100644
index 962256c6d5..0000000000
--- a/src/video_engine/main/test/WindowsTest/Capture.rc
+++ /dev/null
@@ -1,255 +0,0 @@
-// Microsoft Visual C++ generated resource script.
-//
-#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include "afxres.h"
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// Korean resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_KOR)
-#ifdef _WIN32
-LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT
-#pragma code_page(949)
-#endif //_WIN32
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE
-BEGIN
- "resource.h\0"
-END
-
-2 TEXTINCLUDE
-BEGIN
- "#include ""afxres.h""\r\n"
- "\0"
-END
-
-3 TEXTINCLUDE
-BEGIN
- "#define _AFX_NO_SPLITTER_RESOURCES\r\n"
- "#define _AFX_NO_OLE_RESOURCES\r\n"
- "#define _AFX_NO_TRACKER_RESOURCES\r\n"
- "#define _AFX_NO_PROPERTY_RESOURCES\r\n"
- "\r\n"
- "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_KOR)\r\n"
- "#ifdef _WIN32\r\n"
- "LANGUAGE 18, 1\r\n"
- "#pragma code_page(949)\r\n"
- "#endif //_WIN32\r\n"
- "#include ""res\\Capture.rc2"" // non-Microsoft Visual C++ edited resources\r\n"
- "#include ""l.kor\\afxres.rc"" // Standard components\r\n"
- "#endif\r\n"
- "\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Version
-//
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,0,0,1
- PRODUCTVERSION 1,0,0,1
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x4L
- FILETYPE 0x1L
- FILESUBTYPE 0x0L
-BEGIN
-END
-
-#endif // Korean resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-/////////////////////////////////////////////////////////////////////////////
-// Swedish resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_SVE)
-#ifdef _WIN32
-LANGUAGE LANG_SWEDISH, SUBLANG_DEFAULT
-#pragma code_page(1252)
-#endif //_WIN32
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
-IDD_SLAVE_CHANNEL DIALOGEX 0, 0, 677, 358
-STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Slave channel"
-FONT 8, "MS Shell Dlg", 400, 0, 0x1
-BEGIN
- CONTROL "",IDC_IPADDRESS1,"SysIPAddress32",WS_TABSTOP,485,18,105,15
- EDITTEXT IDC_LOCAL_PORT1,631,18,36,16,ES_AUTOHSCROLL
- LTEXT "IP-address",IDC_STATIC,495,7,42,9
- LTEXT "Local Port",IDC_STATIC,633,7,37,9
- EDITTEXT IDC_REMOTE_PORT1,593,18,36,16,ES_AUTOHSCROLL
- LTEXT "Port",IDC_STATIC,595,7,17,9
- CONTROL "Ext",IDC_EXTTRANSPORT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,489,41,29,12
- LTEXT "delay",IDC_STATIC,589,41,21,9
- COMBOBOX IDC_PACKETLOSS,535,40,45,82,CBS_DROPDOWN | WS_DISABLED | WS_VSCROLL | WS_TABSTOP
- COMBOBOX IDC_DELAY,611,40,45,82,CBS_DROPDOWN | WS_DISABLED | WS_VSCROLL | WS_TABSTOP
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// DESIGNINFO
-//
-
-#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO
-BEGIN
- IDD_SLAVE_CHANNEL, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 670
- TOPMARGIN, 7
- BOTTOMMARGIN, 351
- END
-END
-#endif // APSTUDIO_INVOKED
-
-#endif // Swedish resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-/////////////////////////////////////////////////////////////////////////////
-// Neutral (Sys. Default) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEUSD)
-#ifdef _WIN32
-LANGUAGE LANG_NEUTRAL, SUBLANG_SYS_DEFAULT
-#pragma code_page(1252)
-#endif //_WIN32
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
-IDD_DXQUALITY_DIALOG DIALOGEX 0, 0, 699, 385
-STYLE DS_ABSALIGN | DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
-EXSTYLE WS_EX_WINDOWEDGE | WS_EX_STATICEDGE | WS_EX_APPWINDOW | WS_EX_NOINHERITLAYOUT
-CAPTION "webrtc ViE test program"
-FONT 9, "Arial", 400, 0, 0x0
-BEGIN
- PUSHBUTTON "Start Send",IDC_STARTSEND,589,270,50,19
- PUSHBUTTON "Stop Send",IDC_STOPSend,639,270,50,19
- PUSHBUTTON "Start Listen",IDC_STARTLISTEN,589,291,50,19
- PUSHBUTTON "StopListen",IDC_STOPLISTEN,639,291,50,19
- CONTROL "",IDC_LIVEVIDEO,"Static",SS_BITMAP | SS_CENTERIMAGE | SS_SUNKEN,450,179,139,101
- COMBOBOX IDC_DEVICE,487,14,185,30,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
- CTEXT "Select Capture Device",IDC_STATIC,485,7,78,8
- COMBOBOX IDC_CODEC_LIST,490,90,58,30,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
- LTEXT "Codec",IDC_STATIC,490,82,21,8
- COMBOBOX IDC_CODEC_SIZE,627,90,62,30,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
- LTEXT "Codec Size",IDC_STATIC,611,82,36,8
- CONTROL "",IDC_IPADDRESS1,"SysIPAddress32",WS_TABSTOP,490,46,90,13
- EDITTEXT IDC_LOCAL_PORT1,615,46,31,14,ES_AUTOHSCROLL
- LTEXT "IP-address",IDC_STATIC,498,37,36,8
- LTEXT "Local Port",IDC_STATIC,616,36,32,8
- LTEXT "Start Bitrate",IDC_STATIC,553,80,37,8
- COMBOBOX IDC_BITRATE,558,90,49,30,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
- EDITTEXT IDC_REMOTE_PORT1,582,46,31,14,ES_AUTOHSCROLL
- LTEXT "Port",IDC_STATIC,584,37,14,8
- GROUPBOX "Remote client 1",IDC_STATIC,487,27,203,50
- LTEXT "Max FrameRate",IDC_STATIC,488,106,50,8
- COMBOBOX IDC_MIN_FRAME_RATE,488,115,48,82,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
- CONTROL "",IDC_CAPTURE,"Static",SS_BITMAP | SS_CENTERIMAGE | SS_REALSIZEIMAGE,7,7,418,276
- CONTROL "TMMBR",IDC_TMMBR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,486,138,40,10
- GROUPBOX "Standard Protection",IDC_STATIC,607,138,72,55
- CONTROL "None",IDC_PROT_NONE,"Button",BS_AUTORADIOBUTTON | WS_GROUP,615,146,33,10
- CONTROL "NACK",IDC_PROT_NACK,"Button",BS_AUTORADIOBUTTON,615,165,35,10
- CONTROL "FEC",IDC_PROT_FEC,"Button",BS_AUTORADIOBUTTON,615,155,30,10
- CONTROL "NACK & FEC",IDC_PROT_NACKFEC,"Button",BS_AUTORADIOBUTTON,615,174,52,10
- COMBOBOX IDC_RTCPMODE,571,119,80,57,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
- LTEXT "RTCP Mode",IDC_STATIC,571,110,39,8
- LISTBOX IDC_INFORMATION,476,309,214,63,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
- COMBOBOX IDC_PACKETBURST,653,118,36,57,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
- LTEXT "Packet Burst",IDC_STATIC,649,109,40,8
- CONTROL "Stop Log",IDC_FREEZELOG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,465,292,44,10
- PUSHBUTTON "Version",IDC_VERSION,530,291,55,16
- CONTROL "Ext",IDC_EXTTRANSPORT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,493,66,25,10
- LTEXT "loss",IDC_STATIC,519,66,15,8
- LTEXT "delay",IDC_STATIC,578,66,18,8
- COMBOBOX IDC_PACKETLOSS,533,65,38,82,CBS_DROPDOWN | WS_DISABLED | WS_VSCROLL | WS_TABSTOP
- COMBOBOX IDC_DELAY,598,65,38,82,CBS_DROPDOWN | WS_DISABLED | WS_VSCROLL | WS_TABSTOP
- PUSHBUTTON "Record Incoming",IDC_BTN_RECORD_INCOMING,587,198,69,14
- PUSHBUTTON "Record outgoing",IDC_BTN_RECORD_OUTGOING,587,212,69,14
- PUSHBUTTON "Create Slave",IDC_BTN_CREATE_SLAVE,586,231,50,14
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// DESIGNINFO
-//
-
-#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO
-BEGIN
- IDD_DXQUALITY_DIALOG, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 690
- VERTGUIDE, 321
- VERTGUIDE, 372
- VERTGUIDE, 425
- VERTGUIDE, 465
- TOPMARGIN, 7
- BOTTOMMARGIN, 372
- END
-END
-#endif // APSTUDIO_INVOKED
-
-#endif // Neutral (Sys. Default) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-#define _AFX_NO_SPLITTER_RESOURCES
-#define _AFX_NO_OLE_RESOURCES
-#define _AFX_NO_TRACKER_RESOURCES
-#define _AFX_NO_PROPERTY_RESOURCES
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_KOR)
-#ifdef _WIN32
-LANGUAGE 18, 1
-#pragma code_page(949)
-#endif //_WIN32
-#include "res\Capture.rc2" // non-Microsoft Visual C++ edited resources
-#include "l.kor\afxres.rc" // Standard components
-#endif
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
-
diff --git a/src/video_engine/main/test/WindowsTest/CaptureDevicePool.cc b/src/video_engine/main/test/WindowsTest/CaptureDevicePool.cc
deleted file mode 100644
index d666aa7172..0000000000
--- a/src/video_engine/main/test/WindowsTest/CaptureDevicePool.cc
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#include "CaptureDevicePool.h"
-#include "map_wrapper.h"
-#include
-#include
-#include "critical_section_wrapper.h"
-#include "vie_file.h"
-
-CaptureDevicePool::CaptureDevicePool(VideoEngine* videoEngine):
-_critSect(*CriticalSectionWrapper::CreateCriticalSection()),
-_vieCapture(ViECapture::GetInterface(videoEngine)),
-_vieFile(ViEFile::GetInterface(videoEngine))
-{
-}
-
-CaptureDevicePool::~CaptureDevicePool(void)
-{
- assert(_deviceMap.Size()==0);
- _vieCapture->Release();
- _vieFile->Release();
- delete &_critSect;
-}
-
-WebRtc_Word32 CaptureDevicePool::GetCaptureDevice(int& captureId, const char* uniqeDeviceName)
-{
- CriticalSectionScoped cs(_critSect);
- DeviceItem* device=NULL;
-
- for(MapItem* item=_deviceMap.First();
- item!=NULL;
- item=_deviceMap.Next(item))
- {
- //Found the device?
- if(strcmp(uniqeDeviceName,(static_cast( item->GetItem()))->uniqeDeviceName)==0)
- {
- device=static_cast( item->GetItem());
- device->refCount++;
- captureId=device->captureId;
- return 0;
- }
- }
- device = new DeviceItem;
- strncpy(device->uniqeDeviceName,uniqeDeviceName,255);
-
-
- // Device does not exist. Create it.
- WebRtc_Word32 result=_vieCapture->AllocateCaptureDevice(device->uniqeDeviceName,strlen(device->uniqeDeviceName),device->captureId);
- if(result==0)
- {
- result=_vieFile->SetCaptureDeviceImage(device->captureId,
- "./main/test/WindowsTest/captureDeviceImage.jpg");
- }
- captureId=device->captureId;
- _deviceMap.Insert(captureId,device);
- device->refCount++;
-
- return result;
-
-
-}
-WebRtc_Word32 CaptureDevicePool::ReturnCaptureDevice(int captureId)
-{
- CriticalSectionScoped cs(_critSect);
-
- MapItem* mapItem=_deviceMap.Find(captureId);
- if(!mapItem)
- return -1;
-
- DeviceItem* item=static_cast (mapItem->GetItem());
- if(!item)
- return 0;
- item->refCount--;
- WebRtc_Word32 result=0;
-
- if(item->refCount==0)
- {
- result=_vieCapture->ReleaseCaptureDevice(captureId);
-
- _deviceMap.Erase(mapItem);
- delete item;
-
- }
- return result;
-}
diff --git a/src/video_engine/main/test/WindowsTest/CaptureDevicePool.h b/src/video_engine/main/test/WindowsTest/CaptureDevicePool.h
deleted file mode 100644
index 104b84f72b..0000000000
--- a/src/video_engine/main/test/WindowsTest/CaptureDevicePool.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#pragma once
-
-#include "common_types.h"
-
-#include "vie_base.h"
-#include "vie_capture.h"
-#include "vie_file.h"
-#include "map_wrapper.h"
-
-namespace webrtc {
-class CriticalSectionWrapper;
-}
-using namespace webrtc;
-class CaptureDevicePool
-{
-public:
- CaptureDevicePool(VideoEngine* videoEngine);
- ~CaptureDevicePool(void);
- WebRtc_Word32 GetCaptureDevice(int& captureId, const char uniqeDeviceName[256]);
- WebRtc_Word32 ReturnCaptureDevice(int captureId);
-
- private:
- struct DeviceItem
- {
- int captureId;
- WebRtc_Word32 refCount;
- char uniqeDeviceName[256];
- DeviceItem()
- {
- captureId=-1;
- refCount=0;
- }
- };
- CriticalSectionWrapper& _critSect;
- ViECapture* _vieCapture;
- ViEFile* _vieFile;
- MapWrapper _deviceMap;
-
-};
diff --git a/src/video_engine/main/test/WindowsTest/ChannelDlg.cc b/src/video_engine/main/test/WindowsTest/ChannelDlg.cc
deleted file mode 100644
index 50ae26f119..0000000000
--- a/src/video_engine/main/test/WindowsTest/ChannelDlg.cc
+++ /dev/null
@@ -1,1271 +0,0 @@
-/*
- * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#include "ChannelDlg.h"
-#include "VideoSize.h"
-#include "CaptureDevicePool.h"
-#include "ChannelPool.h"
-
-#include
-#include
-
-
-#include "assert.h"
-
-
-#include // threads.
-
-#if defined _WIN32
- #define SLEEP_10_SEC ::Sleep(10000)
- #define GET_TIME_IN_MS timeGetTime
-#endif
-
-// Hack to convert char to TCHAR, using two buffers to be able to
-// call twice in the same statement
-TCHAR convertTemp1[256] = {0};
-TCHAR convertTemp2[256] = {0};
-bool convertBufferSwitch(false);
-TCHAR* CharToTchar(const char* str, int len)
-{
-#ifdef _UNICODE
- TCHAR* temp = convertBufferSwitch ? convertTemp1 : convertTemp2;
- convertBufferSwitch = !convertBufferSwitch;
- memset(temp, 0, sizeof(convertTemp1));
- MultiByteToWideChar(CP_UTF8, 0, str, len, temp, 256);
- return temp;
-#else
- return str;
-#endif
-}
-
-// Hack to convert TCHAR to char
-char convertTemp3[256] = {0};
-char* TcharToChar(TCHAR* str, int len)
-{
-#ifdef _UNICODE
- memset(convertTemp3, 0, sizeof(convertTemp3));
- WideCharToMultiByte(CP_UTF8, 0, str, len, convertTemp3, 256, 0, 0);
- return convertTemp3;
-#else
- return str;
-#endif
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// CDXChannelDlg dialog
-
-CDXChannelDlg::CDXChannelDlg(VideoEngine* videoEngine,
- CaptureDevicePool& captureDevicePool,
- ChannelPool& channelPool,
- void* voiceEngine
- ,CWnd* pParent,CDXChannelDlgObserver* observer,
- int parentChannel/*=-1*/)
- : CDialog(CDXChannelDlg::IDD, pParent),
- _canAddLog(true),
- _dialogObserver(observer),
- _videoEngine(videoEngine),
- _captureDevicePool(captureDevicePool),
- _channelPool(channelPool),
- _parentChannel(parentChannel),
-#ifndef NO_VOICE_ENGINE
- _voiceEngine((VoiceEngine*) voiceEngine),
-#endif
- _callbackEvent(::CreateEvent( NULL, FALSE, FALSE, NULL)),
- _externalTransport(NULL)
-{
- strcpy(_logMsg,"");
- _channelId = -1;
- _audioChannel=-1;
- _captureId=-1;
-
- //{{AFX_DATA_INIT(CDXChannelDlg)
- //}}AFX_DATA_INIT
- // Note that LoadIcon does not require a subsequent DestroyIcon in Win32
-
- InitializeCriticalSection(&_critCallback);
- unsigned int threadID;
- _callbackThread=(HANDLE)_beginthreadex(NULL,1024*1024,CallbackThread,(void*)this,0, &threadID);
-}
-
-void CDXChannelDlg::DoDataExchange(CDataExchange* pDX)
-{
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CDXChannelDlg)
- DDX_Control(pDX, IDC_DEVICE, m_ctrlDevice);
- DDX_Control(pDX, IDC_CODEC_LIST, m_ctrlCodec);
- DDX_Control(pDX, IDC_CAPTURE, m_ctrlLiveRemoteVideo);
- DDX_Control(pDX, IDC_LIVEVIDEO, m_ctrlLiveVideo);
- DDX_Control(pDX, IDC_LOCAL_PORT1, m_localPort1);
- DDX_Control(pDX, IDC_REMOTE_PORT1, m_remotePort1);
- DDX_Control(pDX, IDC_IPADDRESS1, m_remoteIp1);
- DDX_Control(pDX, IDC_CODEC_SIZE, m_ctrlCodecSize);
- DDX_Control(pDX, IDC_RTCPMODE, m_ctrlRtcpMode);
- DDX_Control(pDX, IDC_PACKETBURST, m_ctrlPacketBurst);
- DDX_Control(pDX, IDC_BITRATE, m_ctrlBitrate);
- DDX_Control(pDX, IDC_MIN_FRAME_RATE, m_ctrlMinFrameRate);
- DDX_Control(pDX, IDC_TMMBR,m_cbTmmbr);
- DDX_Control(pDX, IDC_EXTTRANSPORT,m_cbExternalTransport);
- DDX_Control(pDX, IDC_PACKETLOSS,m_ctrlPacketLoss);
- DDX_Control(pDX, IDC_DELAY,m_ctrlDelay);
- DDX_Control(pDX, IDC_FREEZELOG,m_cbFreezeLog);
- DDX_Control(pDX,IDC_INFORMATION,m_ctrlInfo);
- //}}AFX_DATA_MAP
-}
-
-// ON_WM_SYSKEYDOWN ALT+key
-
-BEGIN_MESSAGE_MAP(CDXChannelDlg, CDialog)
- //{{AFX_MSG_MAP(CDXChannelDlg)
- ON_WM_SYSCOMMAND()
- ON_WM_RBUTTONUP()
- //ON_WM_DEVICECHANGE()
- ON_WM_PAINT()
- ON_WM_QUERYDRAGICON()
- ON_BN_CLICKED(IDC_STARTSEND, OnStartSend)
- ON_BN_CLICKED(IDC_STOPSend, OnStopSend)
- //ON_WM_TIMER()
- ON_WM_DESTROY()
- //}}AFX_MSG_MAP
- ON_CBN_SELCHANGE(IDC_CODEC_LIST, OnCbnSelchangeCodecList)
- ON_CBN_SELCHANGE(IDC_DEVICE, OnCbnSelchangeDevice)
- ON_CBN_SELCHANGE(IDC_CODEC_SIZE, OnCbnSelchangeSize)
- ON_CBN_SELCHANGE(IDC_BITRATE, OnCbnSelchangeBitrate)
- //ON_MESSAGE(WM_DISPLAYCHANGE, OnDisplayChange)
- ON_CBN_SELCHANGE(IDC_MIN_FRAME_RATE, OnCbnSelchangeMinFrameRate)
- ON_BN_CLICKED(IDC_STARTLISTEN, OnBnClickedStartlisten)
- ON_BN_CLICKED(IDC_STOPLISTEN, OnBnClickedStoplisten)
- ON_BN_CLICKED(IDC_TMMBR, &CDXChannelDlg::OnBnClickedTmmbr)
- ON_CBN_SELCHANGE(IDC_RTCPMODE, &CDXChannelDlg::OnCbnSelchangeRtcpmode)
- ON_BN_CLICKED(IDC_PROT_NACK, &CDXChannelDlg::OnBnClickedProtNack)
- ON_BN_CLICKED(IDC_PROT_NONE, &CDXChannelDlg::OnBnClickedProtNone)
- ON_BN_CLICKED(IDC_PROT_FEC, &CDXChannelDlg::OnBnClickedProtFec)
- ON_BN_CLICKED(IDC_FREEZELOG, &CDXChannelDlg::OnBnClickedFreezelog)
- ON_BN_CLICKED(IDC_VERSION, &CDXChannelDlg::OnBnClickedVersion)
- ON_BN_CLICKED(IDC_EXTTRANSPORT, &CDXChannelDlg::OnBnClickedExttransport)
- ON_CBN_SELCHANGE(IDC_PACKETLOSS, &CDXChannelDlg::OnCbnSelchangePacketloss)
- ON_CBN_SELCHANGE(IDC_DELAY, &CDXChannelDlg::OnCbnSelchangeDelay)
- ON_BN_CLICKED(IDC_BTN_RECORD_INCOMING, &CDXChannelDlg::OnBnClickedBtnRecordIncoming)
- ON_BN_CLICKED(IDC_BTN_RECORD_OUTGOING, &CDXChannelDlg::OnBnClickedBtnRecordOutgoing)
- ON_BN_CLICKED(IDC_BTN_CREATE_SLAVE, &CDXChannelDlg::OnBnClickedBtnCreateSlave)
- ON_BN_CLICKED(IDC_PROT_NACKFEC, &CDXChannelDlg::OnBnClickedProtNackFec)
-END_MESSAGE_MAP()
-
-/////////////////////////////////////////////////////////////////////////////
-// CDXChannelDlg message handlers
-
-
-BOOL CDXChannelDlg::OnInitDialog()
-{
- CDialog::OnInitDialog();
-
- // Set the icon for this dialog. The framework does this automatically
- // when the application's main window is not a dialog
- SetIcon(m_hIcon, TRUE); // Set big icon
- SetIcon(m_hIcon, FALSE); // Set small icon
-
-
- ::SendMessage(m_ctrlMinFrameRate.m_hWnd, CB_ADDSTRING, 0,(LPARAM)_T("5"));
- ::SendMessage(m_ctrlMinFrameRate.m_hWnd, CB_ADDSTRING, 0,(LPARAM)_T("6"));
- ::SendMessage(m_ctrlMinFrameRate.m_hWnd, CB_ADDSTRING, 0,(LPARAM)_T("7"));
- ::SendMessage(m_ctrlMinFrameRate.m_hWnd, CB_ADDSTRING, 0,(LPARAM)_T("8"));
- ::SendMessage(m_ctrlMinFrameRate.m_hWnd, CB_ADDSTRING, 0,(LPARAM)_T("9"));
- ::SendMessage(m_ctrlMinFrameRate.m_hWnd, CB_ADDSTRING, 0,(LPARAM)_T("10"));
- ::SendMessage(m_ctrlMinFrameRate.m_hWnd, CB_ADDSTRING, 0,(LPARAM)_T("11"));
- ::SendMessage(m_ctrlMinFrameRate.m_hWnd, CB_ADDSTRING, 0,(LPARAM)_T("12"));
- ::SendMessage(m_ctrlMinFrameRate.m_hWnd, CB_ADDSTRING, 0,(LPARAM)_T("13"));
- ::SendMessage(m_ctrlMinFrameRate.m_hWnd, CB_ADDSTRING, 0,(LPARAM)_T("14"));
- ::SendMessage(m_ctrlMinFrameRate.m_hWnd, CB_ADDSTRING, 0,(LPARAM)_T("15"));
- ::SendMessage(m_ctrlMinFrameRate.m_hWnd, CB_ADDSTRING, 0,(LPARAM)_T("16"));
- ::SendMessage(m_ctrlMinFrameRate.m_hWnd, CB_ADDSTRING, 0,(LPARAM)_T("17"));
- ::SendMessage(m_ctrlMinFrameRate.m_hWnd, CB_ADDSTRING, 0,(LPARAM)_T("18"));
- ::SendMessage(m_ctrlMinFrameRate.m_hWnd, CB_ADDSTRING, 0,(LPARAM)_T("19"));
- ::SendMessage(m_ctrlMinFrameRate.m_hWnd, CB_ADDSTRING, 0,(LPARAM)_T("20"));
- ::SendMessage(m_ctrlMinFrameRate.m_hWnd, CB_ADDSTRING, 0,(LPARAM)_T("21"));
- ::SendMessage(m_ctrlMinFrameRate.m_hWnd, CB_ADDSTRING, 0,(LPARAM)_T("22"));
- ::SendMessage(m_ctrlMinFrameRate.m_hWnd, CB_ADDSTRING, 0,(LPARAM)_T("23"));
- ::SendMessage(m_ctrlMinFrameRate.m_hWnd, CB_ADDSTRING, 0,(LPARAM)_T("24"));
- ::SendMessage(m_ctrlMinFrameRate.m_hWnd, CB_ADDSTRING, 0,(LPARAM)_T("25"));
- ::SendMessage(m_ctrlMinFrameRate.m_hWnd, CB_ADDSTRING, 0,(LPARAM)_T("26"));
- ::SendMessage(m_ctrlMinFrameRate.m_hWnd, CB_ADDSTRING, 0,(LPARAM)_T("27"));
- ::SendMessage(m_ctrlMinFrameRate.m_hWnd, CB_ADDSTRING, 0,(LPARAM)_T("28"));
- ::SendMessage(m_ctrlMinFrameRate.m_hWnd, CB_ADDSTRING, 0,(LPARAM)_T("29"));
- ::SendMessage(m_ctrlMinFrameRate.m_hWnd, CB_ADDSTRING, 0,(LPARAM)_T("30"));
- m_ctrlMinFrameRate.SetCurSel(25);
-
- // Codec sizes
- for(VideoSize i=UNDEFINED;iSetVoiceEngine(_voiceEngine),-5);
-#endif
-
- char str[64];
- bool found = false;
-
- int captureIdx = 0;
- while (-1 !=_vieCapture->GetCaptureDevice(captureIdx,str,sizeof(str),NULL,0))
- {
- char* tmp = strstr(str,"(VFW)");
- if (!tmp)
- {
- ::SendMessage(m_ctrlDevice.m_hWnd, CB_ADDSTRING, 0,(LPARAM)CharToTchar(str,-1));
- found = true;
- }
- captureIdx++;
- memset(str, 0, 64);
- }
- WIN32_FIND_DATA FindFileData;
- HANDLE hFind;
- //char fileSearch[256];
- //strcpy(fileSearch,_T("*.avi"));
- hFind = FindFirstFile(_T("*.avi"), &FindFileData);
- if (hFind != INVALID_HANDLE_VALUE)
- {
- ::SendMessage(m_ctrlDevice.m_hWnd, CB_ADDSTRING, 0,(LPARAM)(FindFileData.cFileName));
- while(FindNextFile(hFind,&FindFileData))
- {
- ::SendMessage(m_ctrlDevice.m_hWnd, CB_ADDSTRING, 0,(LPARAM)(FindFileData.cFileName));
- }
- FindClose(hFind);
- }
-
- ::SendMessage(m_ctrlDevice.m_hWnd, CB_ADDSTRING, 0,(LPARAM)_T("Conference"));
- ::SendMessage(m_ctrlDevice.m_hWnd, CB_ADDSTRING, 0,(LPARAM)_T("None"));
-
- if (!found)
- {
- strncpy(str,"N/A",64);
- ::SendMessage(m_ctrlDevice.m_hWnd, CB_ADDSTRING, 0,(LPARAM)CharToTchar(str,-1));
- }
- m_ctrlDevice.SetCurSel(0);
-
- //Codecs
- int numOfCodecs = _vieCodec->NumberOfCodecs();
- for(int i=0; iGetCodec(i,codec))
- {
- ::SendMessage(m_ctrlCodec.m_hWnd, CB_ADDSTRING, 0,(LPARAM)CharToTchar(codec.plName,-1));
- }
- }
- m_ctrlCodec.SetCurSel(0);
-
-#ifndef NO_VOICE_ENGINE
- CodecInst voiceCodec;
- int numOfVeCodecs = _veCodec->NumOfCodecs();
- for(int i=0; iGetCodec(i,voiceCodec)!=-1)
- {
- if(strncmp(voiceCodec.plname,"ISAC",4)==0)
- break;
- }
- }
-
- _audioChannel = _veBase->CreateChannel();
-
- TEST_MUSTPASS(_veRTCP->SetRTCPStatus(_audioChannel, true),-5);
- TEST_MUSTPASS(_veCodec->SetSendCodec(_audioChannel, voiceCodec),-5);
- TEST_MUSTPASS(_veBase->StartPlayout(_audioChannel),-5);
-#endif //NO_VOICE_ENGINE
-
- if(_parentChannel==-1)
- {
- TEST_MUSTPASS(_vieBase->CreateChannel(_channelId),-5);
- }
- else // This is a slave channel
- {
- TEST_MUSTPASS(_vieBase->CreateChannel(_channelId,_parentChannel),-5);
- }
-#ifndef NO_VOICE_ENGINE
- TEST_MUSTPASS(_vieBase->ConnectAudioChannel(_channelId,_audioChannel),-5);
-#endif
-
- _channelPool.AddChannel(_channelId);
-
- //Set Receive codec
- {
- VideoCodec codec;
- int numOfCodecs = _vieCodec->NumberOfCodecs();;
- for(int i=0; iGetCodec(i,codec))
- {
- if(codec.codecType == webrtc::kVideoCodecVP8)
- {
- codec.codecSpecific.VP8.feedbackModeOn = true;
- codec.codecSpecific.VP8.pictureLossIndicationOn = true;
- }
- TEST_MUSTPASS(_vieCodec->SetReceiveCodec(_channelId,codec),-5);
- }
- }
- }
-
- //TMMBR
- m_cbTmmbr.SetCheck(BST_CHECKED);
- OnBnClickedTmmbr();
-
- //Packet Burst
- m_ctrlPacketBurst.SetCurSel(0);
-
-
- //Protection method none
- CButton *opProtection = (CButton *) GetDlgItem(IDC_PROT_NONE);
- opProtection->SetCheck(BST_CHECKED);
- OnBnClickedProtNone();
-
-
- // Configure the renderer
- ConfigureRender();
-
- TEST_MUSTPASS(_vieCodec->RegisterEncoderObserver(_channelId,*this),kViECodecObserverAlreadyRegistered);
- TEST_MUSTPASS(_vieCodec->RegisterDecoderObserver(_channelId,*this),-5);
-
- TEST_MUSTPASS(_vieBase->RegisterObserver(*this),kViEBaseObserverAlreadyRegistered);
-
-
-
-
- //Set captions based on channel id
- m_remoteIp1.SetAddress(127,0,0,1);
- CString port;
- port.AppendFormat(_T("%d"),11111+_channelId*4);
- m_remotePort1.SetWindowText(port);
- m_localPort1.SetWindowText(port);
-
- CString title;
- this->GetWindowText(title);
- if(_parentChannel==-1)
- {
- title.AppendFormat(_T("%s - channel %d"),title,_channelId);
- }
- else
- {
- title.AppendFormat(_T("%s - slave channel %d - parent %d"),title,_channelId,_parentChannel);
- }
- this->SetWindowText(title);
-
- if(_parentChannel!=-1)
- m_ctrlDevice.EnableWindow(FALSE); //Prevent from changing capture device
-
- return TRUE; // return TRUE unless you set the focus to a control
-}
-
-
-
-void CDXChannelDlg::OnTimer(UINT nIDEvent)
-{
- CDialog::OnTimer(nIDEvent);
-}
-
-void CDXChannelDlg::SetSendCodec()
-{
- // Get the codec stucture
- int codecSel= m_ctrlCodec.GetCurSel();
- VideoCodec codec;
- TEST_MUSTPASS(_vieCodec->GetCodec(codecSel,codec),-5);
-
-
- // Set Codec Size
- VideoSize sizeSel=VideoSize(m_ctrlCodecSize.GetCurSel());
- int width, height;
- GetWidthHeight(sizeSel, width, height);
- codec.width=width;
- codec.height=height;
-
- //Set the codec bitrate
- CString bitrateStr;
- m_ctrlBitrate.GetLBText(m_ctrlBitrate.GetCurSel(), bitrateStr);
- int bitrate = _ttoi(bitrateStr.GetBuffer(0));
- if(codec.codecType!=kVideoCodecI420)
- {
- codec.startBitrate=bitrate;
- codec.maxBitrate=bitrate*4;
- }
-
-
- //Set the codec frame rate
- codec.maxFramerate = m_ctrlMinFrameRate.GetCurSel() +5;
-
- if(strncmp(codec.plName, "VP8", 5) == 0)
- {
- codec.codecSpecific.VP8.feedbackModeOn = true;
- codec.codecSpecific.VP8.pictureLossIndicationOn = true;
- TEST_MUSTPASS(_vieRTPRTCP->SetKeyFrameRequestMethod(_channelId, kViEKeyFrameRequestPliRtcp),-5);
- }else
- {
- TEST_MUSTPASS(_vieRTPRTCP->SetKeyFrameRequestMethod(_channelId, kViEKeyFrameRequestPliRtcp),-5);
- }
- TEST_MUSTPASS(_vieCodec->SetSendCodec(_channelId, codec),-5);
-
- if (codec.codecType == webrtc::kVideoCodecI420)
- { // Need to set the receive codec size
- _vieCodec->SetReceiveCodec(_channelId, codec);
- }
-}
-
-void CDXChannelDlg::SetSendDestination()
-{
- if(_externalTransport)
- return;
-
- BYTE part1, part2, part3, part4;
- char sendIP1[16];
- m_remoteIp1.GetAddress(part1, part2, part3, part4);
- sprintf(sendIP1,"%d.%d.%d.%d",part1,part2,part3,part4);
-
- CString strPort;
- m_remotePort1.GetWindowText(strPort);
- int remotePort1 = _ttoi(strPort.GetString());
-
- TEST_MUSTPASS(_vieNetwork->SetSendDestination(_channelId,sendIP1,remotePort1),kViENetworkAlreadySending);
-
-#ifndef NO_VOICE_ENGINE
- m_localPort1.GetWindowText(strPort);
- int localPort1 = _ttoi(strPort.GetString());
- _veBase->SetLocalReceiver(_audioChannel,localPort1+2);
- TEST_MUSTPASS(_veBase->SetSendDestination(_audioChannel, remotePort1+2, sendIP1),-5)
-#endif
-}
-
-void CDXChannelDlg::SetLocalReceiver()
-{
- if(_externalTransport)
- return;
-
- CString strPort;
- m_localPort1.GetWindowText(strPort);
- int localPort1 = _ttoi(strPort.GetString());
-
-
-
- // May fail because we are sending
- TEST_MUSTPASS(_vieNetwork->SetLocalReceiver(_channelId, localPort1),-5);
-
-#ifndef NO_VOICE_ENGINE
- _veBase->SetLocalReceiver(_audioChannel,localPort1+2);
-#endif
-}
-
-void CDXChannelDlg::SetCaptureDevice()
-{
- if(_parentChannel!=-1) // don't accept changing input on slave channels.
- return;
-
- int camSel=-1;
- camSel=m_ctrlDevice.GetCurSel();
-
- CString captureStr;
- //captureStr.Compare
- m_ctrlDevice.GetLBText(camSel, captureStr);
- if(captureStr!=_T("N/A") != 0)
- {
-
- TEST_MUSTPASS(_vieFile->StopPlayFile(_captureId),kViEFileNotPlaying);
- TEST_MUSTPASS(_vieCapture->DisconnectCaptureDevice(_channelId),kViECaptureDeviceNotConnected);
- TEST_MUSTPASS(_vieRender->RemoveRenderer(_captureId),kViERenderInvalidRenderId);
-
- if(_captureId>=0x1001 && _captureId<0x10FF)// ID is a capture device
- {
- TEST_MUSTPASS(_captureDevicePool.ReturnCaptureDevice(_captureId),-5);
- }
-
- if(captureStr!=_T("None")==0)
- {
- _captureId=-1;
- }
- else if(_tcsstr(captureStr,_T(".avi"))!=NULL ) // Selected an AVI file
- {
- TEST_MUSTPASS(_vieFile->StartPlayFile(TcharToChar(captureStr.GetBuffer(),-1),_captureId,false,webrtc::kFileFormatAviFile),-5);
- TEST_MUSTPASS(_vieRender->AddRenderer(_captureId,m_ctrlLiveVideo.m_hWnd, 0, 0.0f, 0.0f,1.0f,1.0f),-5);
- TEST_MUSTPASS(_vieRender->StartRender(_captureId),-5);
- TEST_MUSTPASS(_vieFile->SendFileOnChannel(_captureId,_channelId),-5);
- TEST_MUSTPASS(_vieFile->StartPlayFileAsMicrophone(_captureId,_channelId,true),-5);
- //TEST_MUSTPASS(_vieFile->StartPlayAudioLocally(_captureId,_channelId),-5);
- }
- else
- {
-
- char captureName[256];
- char uniqueCaptureName[256];
-
- TEST_MUSTPASS(_vieCapture->GetCaptureDevice(camSel,captureName,256,uniqueCaptureName,256),-5);
-
- TEST_MUSTPASS(_captureDevicePool.GetCaptureDevice(_captureId,uniqueCaptureName),-5);
- TEST_MUSTPASS(_vieCapture->StartCapture(_captureId),kViECaptureDeviceAlreadyStarted);
- TEST_MUSTPASS(_vieCapture->RegisterObserver(_captureId,*this),kViECaptureObserverAlreadyRegistered);
-
- TEST_MUSTPASS(_vieRender->AddRenderer(_captureId,m_ctrlLiveVideo.m_hWnd, 0, 0.0f, 0.0f,1.0f,1.0f),-5);
- TEST_MUSTPASS(_vieCapture->ConnectCaptureDevice(_captureId,_channelId),-5);
- TEST_MUSTPASS(_vieRender->StartRender(_captureId),-5);
- }
- }
-
-}
-
-
-
-void CDXChannelDlg::OnBnClickedStartlisten()
-{
-
-
- // Configure the local ports
- SetLocalReceiver();
-
- //Configure the remote destination- needed in order to be able to respond to RTCP messages
- SetSendDestination();
-
-
- #ifndef NO_VOICE_ENGINE
- TEST_MUSTPASS(_veBase->StartReceive(_audioChannel),-5);
- #endif
- TEST_MUSTPASS(_vieBase->StartReceive(_channelId),-5);
-
-
-}
-
-void CDXChannelDlg::OnStartSend()
-{
-
- // Set the send destination
- SetSendDestination();
-
- // Configure the local ports (Needed to be able to receive RTCP
- //SetLocalReceiver();
-
-
- // Set the send codec
- SetSendCodec();
-
- if(_captureId==-1) // If no capture device has been set.
- SetCaptureDevice(); //Set the capture device
-
-
-
- //TEST_MUSTPASS(_vieRTPRTCP->SetStartSequenceNumber(_channelId,1),-5);
-
- // Start sending
- TEST_MUSTPASS(_vieBase->StartSend(_channelId),-5);
-
-
- #ifndef NO_VOICE_ENGINE
- TEST_MUSTPASS(_veBase->StartSend(_audioChannel),-5);
- #endif
-
-
-}
-
-void CDXChannelDlg::ConfigureRender()
-{
- TEST_MUSTPASS(_vieRender->AddRenderer(_channelId,m_ctrlLiveRemoteVideo.m_hWnd, 0, 0.0f, 0.0f,1.0f,1.0f),-5);
-
- TEST_MUSTPASS(_vieFile->SetRenderStartImage(_channelId,
- "./main/test/WindowsTest/renderStartImage.jpg"),-5);
- TEST_MUSTPASS(_vieRender->StartRender(_channelId),-5);
- TEST_MUSTPASS(_vieFile->SetRenderTimeoutImage(_channelId,
- "./main/test/WindowsTest/renderTimeoutImage.jpg"),-5);
-
-
-}
-
-
-void CDXChannelDlg::OnStopSend()
-{
-
- #ifndef NO_VOICE_ENGINE
- TEST_MUSTPASS(_veBase->StopSend(_audioChannel),-5);
- #endif
-
-
- TEST_MUSTPASS(_vieBase->StopSend(_channelId),kViEBaseNotSending); // Accept error Not sending
-
-
-}
-void CDXChannelDlg::OnBnClickedStoplisten()
-{
-
-
- #ifndef NO_VOICE_ENGINE
- TEST_MUSTPASS(_veBase->StopReceive(_audioChannel),-5);
- #endif
- TEST_MUSTPASS(_vieBase->StopReceive(_channelId),-5);
-}
-
-
-void CDXChannelDlg::OnDestroy()
-{
-
- OnStopSend();
- OnBnClickedStoplisten();
-
- if(_vieCapture && _parentChannel==-1)
- {
- _vieCapture->DisconnectCaptureDevice(_channelId);
- _captureDevicePool.ReturnCaptureDevice(_captureId);
- }
- if(_vieFile && _parentChannel!=-1)
- {
- TEST_MUSTPASS(_vieFile->StopPlayFile(_captureId),kViEFileNotPlaying);
- }
-
-
-
-
- if(_videoEngine)
- {
- if(_parentChannel==-1)
- {
- _vieCodec->DeregisterEncoderObserver(_channelId);
- }
- _vieBase->DeleteChannel(_channelId);
- _channelPool.RemoveChannel(_channelId);
- }
-
- _videoEngine = NULL;
-#ifndef NO_VOICE_ENGINE
-
- if (_voiceEngine)
- {
- _veBase->DeleteChannel(_audioChannel);
- _veBase->Release();
- _veNetwork->Release();
- _veCodec->Release();
- _veRTCP->Release();
- }
-#endif
-
-
- strcpy(_logMsg,"");
- SetEvent(_callbackEvent);
- MSG msg; // Wait until the callback thread exits. Need to handle messages since the callback thread can call SendMessage when updating UI
- while(WaitForSingleObject(_callbackThread,10)==WAIT_TIMEOUT)
- {
- DWORD ret = PeekMessage( &msg, NULL, 0, 0,PM_REMOVE );
- if (ret >0)
- {
- TranslateMessage(&msg);
- DispatchMessage(&msg);
- }
- }
-
- CloseHandle(_callbackThread);
- CloseHandle(_callbackEvent);
- DeleteCriticalSection(&_critCallback);
-
- TEST_MUSTPASS(_vieCapture->Release()<0,-5);
- TEST_MUSTPASS(_vieRTPRTCP->Release()<0,-5);
- TEST_MUSTPASS(_vieRender->Release()<0,-5);
- TEST_MUSTPASS(_vieCodec->Release()<0,-5);
- TEST_MUSTPASS(_vieNetwork->Release()<0,-5);
- TEST_MUSTPASS(_vieFile->Release()<0,-5);
- TEST_MUSTPASS(_vieBase->Release()<0,-5);
-
-
-
-#ifdef TEST_EXTERNAL_TRANSPORT
- if(_transport)
- delete _transport;
- _transport = NULL;
-#endif
-
- delete _externalTransport;
-
- CDialog::OnDestroy();
- if(_dialogObserver)
- {
- _dialogObserver->ChannelDialogEnded(this);
- }
-}
-
-void CDXChannelDlg::OnCancel()
-{
- DestroyWindow();
-}
-// If you add a minimize button to your dialog, you will need the code below
-// to draw the icon. For MFC applications using the document/view model,
-// this is automatically done for you by the framework.
-
-void CDXChannelDlg::OnPaint()
-{
- if (IsIconic())
- {
- CPaintDC dc(this); // device context for painting
-
- SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
-
- // Center icon in client rectangle
- int cxIcon = GetSystemMetrics(SM_CXICON);
- int cyIcon = GetSystemMetrics(SM_CYICON);
- CRect rect;
- GetClientRect(&rect);
- int x = (rect.Width() - cxIcon + 1) / 2;
- int y = (rect.Height() - cyIcon + 1) / 2;
-
- // Draw the icon
- dc.DrawIcon(x, y, m_hIcon);
- }
- else
- {
- CDialog::OnPaint();
- }
-}
-
-BOOL CDXChannelDlg::OnDeviceChange( UINT nID, DWORD lParam)
-{
- if(nID == DBT_DEVNODES_CHANGED)
- {
- // SetCaptureDevice();
- }
- return CDialog::OnDeviceChange(nID, lParam);
-}
-
-
-void CDXChannelDlg::OnSysCommand(UINT nID, LPARAM lParam)
-{
- if(SC_MAXIMIZE == nID)
- {}
- CDialog::OnSysCommand(nID, lParam);
-}
-
-
-static bool fullScreen = false;
-void CDXChannelDlg::OnRButtonUp( UINT nFlags, CPoint point)
-{
- CDialog::OnRButtonUp( nFlags, point);
-}
-
-// The system calls this to obtain the cursor to display while the user drags
-// the minimized window.
-HCURSOR CDXChannelDlg::OnQueryDragIcon()
-{
- return (HCURSOR) m_hIcon;
-}
-
-void CDXChannelDlg::OnCbnSelchangeCodecList()
-{
- SetSendCodec();
-}
-
-
-void CDXChannelDlg::OnCbnSelchangeSize()
-{
- SetSendCodec();
-}
-
-void CDXChannelDlg::OnCbnSelchangeDevice()
-{
-
-
- SetCaptureDevice();
-
-}
-
-
-void CDXChannelDlg::OnCbnSelchangeBitrate()
-{
-
- SetSendCodec();
-
-}
-
-void CDXChannelDlg::OnCbnSelchangeMinFrameRate()
-{
-
- SetSendCodec();
-
-}
-
-
-void CDXChannelDlg::OnBnClickedTmmbr()
-{
-
- TEST_MUSTPASS(_vieRTPRTCP->SetTMMBRStatus(_channelId,m_cbTmmbr.GetCheck()==BST_CHECKED),-5);
-
-}
-
-void CDXChannelDlg::OnCbnSelchangeRtcpmode()
-{
-
- /*
- kRtcpNone = 0,
- kRtcpCompound_RFC4585 = 1,
- kRtcpNonCompound_RFC5506 = 2 */
- ViERTCPMode mode=ViERTCPMode(m_ctrlRtcpMode.GetCurSel());
- TEST_MUSTPASS(_vieRTPRTCP->SetRTCPStatus(_channelId,mode),-5);
-
-}
-
-void CDXChannelDlg::OnBnClickedFreezelog()
-{
- _canAddLog=m_cbFreezeLog.GetCheck()!=BST_CHECKED;
-}
-
-void CDXChannelDlg::OnBnClickedProtNack()
-{
-
- TEST_MUSTPASS(_vieRTPRTCP->SetNACKStatus(_channelId,true),-5);
-
-}
-
-void CDXChannelDlg::OnBnClickedProtNone()
-{
-
- TEST_MUSTPASS(_vieRTPRTCP->SetNACKStatus(_channelId,false),-5);
- TEST_MUSTPASS(_vieRTPRTCP->SetFECStatus(_channelId,false,0,0),-5);
- TEST_MUSTPASS(_vieRTPRTCP->SetHybridNACKFECStatus(_channelId,false,0,0),-5);
-}
-
-void CDXChannelDlg::OnBnClickedProtFec()
-{
- int noCodec=_vieCodec->NumberOfCodecs();
- int redPayloadType=0;
- int fecPayloadType=0;
- for(unsigned char i=0;iGetCodec(i,codec);
- if(codec.codecType==webrtc::kVideoCodecRED)
- {
- redPayloadType=codec.plType;
- }
- if(codec.codecType==webrtc::kVideoCodecULPFEC)
- {
- fecPayloadType=codec.plType;
- }
- }
- TEST_MUSTPASS(_vieRTPRTCP->SetFECStatus(_channelId,true,redPayloadType,fecPayloadType),-5);
-}
-
-void CDXChannelDlg::OnBnClickedProtNackFec()
-{
- int noCodec=_vieCodec->NumberOfCodecs();
- int redPayloadType=0;
- int fecPayloadType=0;
- for(unsigned char i=0;iGetCodec(i,codec);
- if(codec.codecType==webrtc::kVideoCodecRED)
- {
- redPayloadType=codec.plType;
- }
- if(codec.codecType==webrtc::kVideoCodecULPFEC)
- {
- fecPayloadType=codec.plType;
- }
- }
- TEST_MUSTPASS(_vieRTPRTCP->SetHybridNACKFECStatus(_channelId,true,
- redPayloadType,
- fecPayloadType),-5);
-
-}
-
-void CDXChannelDlg::OnBnClickedVersion()
-{
- char version[1024];
- _vieBase->GetVersion(version);
- MessageBox(CharToTchar(version,-1));
-#ifndef NO_VOICE_ENGINE
- _veBase->GetVersion(version);
- MessageBox(CharToTchar(version,-1));
-#endif
-}
-
-unsigned int WINAPI CDXChannelDlg::CallbackThread(LPVOID lpParameter)
-{
- static_cast(lpParameter)->CallbackThreadProcess();
- return 0;
-}
-
-void CDXChannelDlg::CallbackThreadProcess()
-{
- while(1)
- {
- if(WAIT_OBJECT_0==WaitForSingleObject(_callbackEvent,INFINITE))
- {
- char smsg[512];
- EnterCriticalSection(&_critCallback);
- strncpy(smsg,_logMsg,strlen(_logMsg)+1);
- strcpy(_logMsg,"");
-
-
- LeaveCriticalSection(&_critCallback);
- if(strstr(smsg,"Send")!=NULL)
- {
- unsigned short fractionLost=0;
- unsigned int cumulativeLost=0;
- unsigned int extendedMax=0;
- unsigned int jitter=0;
- int rttMs=0;
-
-
-
- _vieRTPRTCP->GetReceivedRTCPStatistics(_channelId,
- fractionLost,
- cumulativeLost,
- extendedMax,
- jitter,
- rttMs);
-
- //int bw=0;
- //if(_vieCodec->GetAvailableBandwidth(_channelId,bw)==0)
- //{
- // sprintf(smsg,"%s, rtt %d, loss %d,bw %d", smsg,rttMs,fractionLost,bw);
- //}
- //else
- //{
- // _vieBase->LastError(); // Reset last error.
- //}
-
-
-
- }
- if(strlen(smsg))
- {
- m_ctrlInfo.InsertString(0,(LPCTSTR) CharToTchar(smsg,-1));
- while(m_ctrlInfo.GetCount()==151)
- m_ctrlInfo.DeleteString(150);
- }
- else
- {
- break; // End the callback thread
- }
- }
- }
-
-}
-void CDXChannelDlg::AddToInfo(const char* msg)
-{
- if(!_canAddLog)
- return;
- EnterCriticalSection(&_critCallback);
-
- SYSTEMTIME systemTime;
- GetSystemTime(&systemTime);
-
- if(strlen(_logMsg)==0)
- {
- SetEvent(_callbackEvent); // Notify of new
- }
-
- sprintf (_logMsg, "(%2u:%2u:%2u:%3u) %s", systemTime.wHour,
- systemTime.wMinute,
- systemTime.wSecond,
- systemTime.wMilliseconds,
- msg
- );
-
-
-
- LeaveCriticalSection(&_critCallback);
-
-
-}
-
-void CDXChannelDlg::IncomingRate(const int videoChannel,
- unsigned int framerate,
- unsigned int bitrate)
-{
- char str[64];
- sprintf(str,"Incoming Fr:%d br %d\n", framerate, bitrate);
- AddToInfo(str);
-}
-
-void CDXChannelDlg::RequestNewKeyFrame(int channel)
-{
- assert(false && "(RequestNewKeyFrame why is it called");
-}
-void CDXChannelDlg::PerformanceAlarm(unsigned int cpuLoad)
-{
- char str[64];
- sprintf(str,"Performance alarm %d",cpuLoad);
- AddToInfo(str);
-}
-void CDXChannelDlg::OutgoingRate(const int videoChannel,
- unsigned int framerate,
- unsigned int bitrate)
- {
- char str[64];
- sprintf(str,"Send Fr:%d br %d", framerate, bitrate);
- AddToInfo(str);
- }
-void CDXChannelDlg::IncomingCodecChanged(const int videoChannel,
- const VideoCodec& videoCodec)
- {
- char str[128];
- sprintf(str,"Incoming codec channel:%d pltype:%d width:%d height:%d\n", videoChannel, videoCodec.plType, videoCodec.width,videoCodec.height);
- AddToInfo(str);
- }
-void CDXChannelDlg::BrightnessAlarm(const int captureId,
- const Brightness brightness)
-{
-
- switch(brightness)
- {
- case Normal:
- AddToInfo("BrightnessAlarm - image ok.\n");
- break;
- case Bright:
- AddToInfo("BrightnessAlarm - light image.\n");
- break;
- case Dark:
- AddToInfo("BrightnessAlarm - dark image.\n");
- break;
- }
-}
-
-void CDXChannelDlg::CapturedFrameRate(const int captureId,
- const unsigned char frameRate)
-{
- char str[64];
- sprintf(str,"Local Camera Frame rate:%d \n", frameRate);
- AddToInfo(str);
-}
-
-void CDXChannelDlg::NoPictureAlarm(const int captureId,
- const CaptureAlarm alarm)
-{
- char str[64];
- sprintf(str,"No Picture alarm\n");
- AddToInfo(str);
-
-}
-
-
-void CDXChannelDlg::OnBnClickedExttransport()
-{
- if(m_cbExternalTransport.GetCheck()==BST_CHECKED)
- {
- m_localPort1.EnableWindow(FALSE);
- m_remotePort1.EnableWindow(FALSE);
- m_remoteIp1.EnableWindow(FALSE);
- m_ctrlPacketLoss.EnableWindow(TRUE);
- m_ctrlDelay.EnableWindow(TRUE);
- _externalTransport= new TbExternalTransport(*_vieNetwork);
- _vieNetwork->RegisterSendTransport(_channelId,*_externalTransport);
- }
- else
- {
- _vieNetwork->DeregisterSendTransport(_channelId);
-
- delete _externalTransport;
- _externalTransport=NULL;
- m_localPort1.EnableWindow(TRUE);
- m_remotePort1.EnableWindow(TRUE);
- m_remoteIp1.EnableWindow(TRUE);
- m_ctrlPacketLoss.EnableWindow(FALSE);
- m_ctrlDelay.EnableWindow(FALSE);
- }
-}
-
-
-void CDXChannelDlg::OnCbnSelchangePacketloss()
-{
- if(_externalTransport)
- {
- _externalTransport->SetPacketLoss(m_ctrlPacketLoss.GetCurSel()*2);
- }
-}
-
-
-void CDXChannelDlg::OnCbnSelchangeDelay()
-{
- if(_externalTransport)
- {
- _externalTransport->SetNetworkDelay(m_ctrlDelay.GetCurSel()*30);
- }
-
-}
-
-void CDXChannelDlg::OnBnClickedBtnRecordIncoming()
-{
-
- CButton *recordBtn = (CButton *) GetDlgItem(IDC_BTN_RECORD_INCOMING);
-
- CString text;
- recordBtn->GetWindowText(text);
- if(text!=_T("Stop Rec Inc")!=0)
- {
- recordBtn->SetWindowText(_T("Stop Rec Inc"));
- SYSTEMTIME time;
- GetSystemTime(&time);
- sprintf(_fileName,"IncomingChannel%d_%4d%2d%2d%2d%2d.avi",_channelId,time.wYear,time.wMonth,time.wDay,time.wHour,time.wMinute);
-
- AudioSource audioSource=PLAYOUT;
- webrtc::CodecInst audioCodec;
- strcpy(audioCodec.plname,"L16");
- audioCodec.rate = 256000;
- audioCodec.plfreq = 16000;
- audioCodec.pacsize = 160;
-
- webrtc::VideoCodec videoCodec;
- memset(&videoCodec,0,sizeof(videoCodec));
-
- strcpy(videoCodec.plName,"VP8");
- videoCodec.maxBitrate=1000;
- videoCodec.startBitrate=1000;
- videoCodec.width=352;
- videoCodec.height=288;
- videoCodec.codecType=webrtc::kVideoCodecVP8;
- videoCodec.maxFramerate=30;
- TEST_MUSTPASS(_vieFile->StartRecordIncomingVideo(_channelId,_fileName,audioSource,audioCodec, videoCodec),-5);
- }
- else
- {
- recordBtn->SetWindowText(_T("Record Incoming"));
- TEST_MUSTPASS(_vieFile->StopRecordIncomingVideo(_channelId),-5);
- CString msg;
- msg.AppendFormat(_T("Recorded file %s"),_fileName);
- MessageBox(msg);
- }
-}
-
-void CDXChannelDlg::OnBnClickedBtnRecordOutgoing()
-{
-
- CButton *recordBtn = (CButton *) GetDlgItem(IDC_BTN_RECORD_OUTGOING);
- CString text;
- recordBtn->GetWindowText(text);
- if(text!=_T("Stop Rec Out"))
- {
- recordBtn->SetWindowText(_T("Stop Rec Out"));
- SYSTEMTIME time;
- GetSystemTime(&time);
- sprintf(_fileName,"OutgoingChannel%d_%4d%2d%2d%2d%2d.avi",_channelId,time.wYear,time.wMonth,time.wDay,time.wHour,time.wMinute);
-
- AudioSource audioSource=MICROPHONE;
- webrtc::CodecInst audioCodec;
- strcpy(audioCodec.plname,"L16");
- audioCodec.rate = 256000;
- audioCodec.plfreq = 16000;
- audioCodec.pacsize = 160;
-
- webrtc::VideoCodec videoCodec;
- memset(&videoCodec,0,sizeof(videoCodec));
-
- strcpy(videoCodec.plName,"VP8");
- videoCodec.maxBitrate=1000;
- videoCodec.startBitrate=1000;
- videoCodec.width=352;
- videoCodec.height=288;
- videoCodec.codecType=webrtc::kVideoCodecVP8;
- videoCodec.maxFramerate=30;
- TEST_MUSTPASS(_vieFile->StartRecordOutgoingVideo(_channelId,_fileName,audioSource,audioCodec,videoCodec),-5);
- }
- else
- {
- recordBtn->SetWindowText(_T("Record Outgoing"));
- TEST_MUSTPASS(_vieFile->StopRecordOutgoingVideo(_channelId),-5);
- CString msg;
- msg.AppendFormat(_T("Recorded file %s"),_fileName);
- MessageBox(msg);
- }
-}
-
-void CDXChannelDlg::OnBnClickedBtnCreateSlave()
-{
- CDXChannelDlg* newSlave =new CDXChannelDlg(_videoEngine,_captureDevicePool,_channelPool,_voiceEngine,NULL,_dialogObserver,_channelId);
- newSlave->Create(CDXChannelDlg::IDD,NULL);
-}
diff --git a/src/video_engine/main/test/WindowsTest/ChannelDlg.h b/src/video_engine/main/test/WindowsTest/ChannelDlg.h
deleted file mode 100644
index 43aeb092f5..0000000000
--- a/src/video_engine/main/test/WindowsTest/ChannelDlg.h
+++ /dev/null
@@ -1,273 +0,0 @@
-/*
- * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#ifndef WEBRTC_VIDEO_ENGINE_MAIN_TEST_WINDOWSTEST_CHANNELDLG_H_
-#define WEBRTC_VIDEO_ENGINE_MAIN_TEST_WINDOWSTEST_CHANNELDLG_H_
-
-#include "StdAfx.h"
-//#define NO_VOICE_ENGINE
-
-/////////////////////////////////////////////////////////////////////////////
-// CDXChannelDlg dialog
-// Include ViE headers
-
-#include "common_types.h"
-
-#include "vie_base.h"
-#include "vie_capture.h"
-#include "vie_codec.h"
-#include "vie_network.h"
-#include "vie_render.h"
-#include "vie_rtp_rtcp.h"
-#include "vie_errors.h"
-#include "vie_file.h"
-#include "tbExternalTransport.h"
-
-#include "resource.h" // main symbols
-
-
-#ifndef NO_VOICE_ENGINE
-
-#include "voe_base.h"
-#include "voe_errors.h"
-#include "voe_base.h"
-#include "voe_network.h"
-#include "voe_codec.h"
-#include "voe_rtp_rtcp.h"
-#endif
-
-using namespace webrtc;
-class CDXChannelDlg;
-class CaptureDevicePool;
-class ChannelPool;
-
-#define TEST_MUSTPASS(expr,oklasterror) \
- { \
- if ((expr)) \
- { \
- CString r_msg; \
- int r_lastError=_vieBase->LastError(); \
- CString exp; \
- exp=#expr;\
- r_msg.Format(_T("\nError at line:%i, %s \nError code: %i\n"),__LINE__, exp,r_lastError); \
- if(r_lastError!=oklasterror) \
- ::MessageBox (NULL, (LPCTSTR)r_msg, TEXT("Error Message"), MB_OK | MB_ICONINFORMATION); \
- } \
- }
-
-class CDXChannelDlgObserver
-{
-public:
- virtual void ChannelDialogEnded(CDXChannelDlg* context)=0;
-
-protected:
- virtual ~CDXChannelDlgObserver(){};
-
-};
-
-class CDXChannelDlg : public CDialog , public ViEEncoderObserver, public ViEDecoderObserver, public ViEBaseObserver, public ViECaptureObserver
-{
-// Construction
-public:
- CDXChannelDlg(VideoEngine* videoEngine,
- CaptureDevicePool& captureDevicePool,
- ChannelPool& channelPool,
- void* voiceEngine=NULL
- ,CWnd* pParent = NULL,CDXChannelDlgObserver* observer=NULL,int parentChannel=-1); // standard constructor
-
-// Dialog Data
- //{{AFX_DATA(CDXChannelDlg)
- enum { IDD = IDD_DXQUALITY_DIALOG };
- CComboBox m_ctrlDevice;
- CComboBox m_ctrlCodec;
- CComboBox m_ctrlBitrate;
- CComboBox m_ctrlCodecSize;
- CComboBox m_ctrlRtcpMode;
- CComboBox m_ctrlPacketBurst;
- CComboBox m_ctrlMinFrameRate;
-
- CListBox m_ctrlInfo;
-
- CStatic m_ctrlLiveRemoteVideo;
- CStatic m_ctrlLiveVideo;
- CEdit m_localPort1;
- CEdit m_remotePort1;
- CIPAddressCtrl m_remoteIp1;
- CButton m_cbTmmbr;
- CButton m_cbExternalTransport;
- CButton m_cbFreezeLog;
- CButton m_cbDefaultSendChannel;
- CComboBox m_ctrlPacketLoss;
- CComboBox m_ctrlDelay;
-
-
- //}}AFX_DATA
-
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CDXChannelDlg)
- protected:
- virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
- //}}AFX_VIRTUAL
-
-
-
-public :
- // Callback
-
- //Capture observer
- virtual void BrightnessAlarm(const int captureId,
- const Brightness brightness);
-
- virtual void CapturedFrameRate(const int captureId,
- const unsigned char frameRate);
-
- virtual void NoPictureAlarm(const int captureId,
- const CaptureAlarm alarm);
-
-
- // same callback method is being used to raise also to clear.
- // true - raise, false - clear
- // virtual void NoPictureAlarm(bool active = true);
-
- // Encoder observer
- virtual void OutgoingRate(const int videoChannel,
- const unsigned int framerate,
- const unsigned int bitrate) ;
-
- //Decoder observer
- virtual void IncomingCodecChanged(const int videoChannel,
- const VideoCodec& videoCodec);
-
- virtual void IncomingRate(const int videoChannel,
- const unsigned int framerate,
- const unsigned int bitrate);
-
- virtual void RequestNewKeyFrame(const int videoChannel);
-
- // Base observer
- virtual void PerformanceAlarm(const unsigned int cpuLoad);
-
-
- //virtual void IncomingCSRCChanged(int channel, unsigned int csrc, bool added);
-
-
-
-// Implementation
-protected:
- HICON m_hIcon;
- int _channelId;
- int _parentChannel;
- int _audioChannel;
- bool _canAddLog;
-
- // Thread and function for callbacks
- CRITICAL_SECTION _critCallback;
- HANDLE _callbackThread;
- HANDLE _callbackEvent;
- char _logMsg[512];
- static unsigned int WINAPI CallbackThread(LPVOID lpParameter);
- void CallbackThreadProcess();
-
-
-
- //void GetSize(int sizeSel, int &width, int &height);
- virtual void ConfigureRender();
-
- virtual void SetCaptureDevice();
- virtual void SetLocalReceiver();
- virtual void SetSendDestination();
- virtual void SetSendCodec();
-
-
- void AddToInfo(const char* msg);
-
- // afx_msg void Command(UINT nID, LPARAM lParam);
-
- // Generated message map functions
- //{{AFX_MSG(CDXChannelDlg)
- virtual BOOL OnInitDialog();
- afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
- afx_msg void OnRButtonUp( UINT nFlags, CPoint point);
- afx_msg BOOL OnDeviceChange( UINT, DWORD );
- afx_msg void OnPaint();
- //afx_msg LRESULT OnDisplayChange(WPARAM, LPARAM);
- afx_msg HCURSOR OnQueryDragIcon();
- virtual afx_msg void OnStartSend();
- virtual afx_msg void OnDestroy();
- virtual afx_msg void OnStopSend();
- virtual afx_msg void OnCancel();
- afx_msg void OnTimer(UINT nIDEvent);
-
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
-
-private:
- CDXChannelDlgObserver* _dialogObserver;
-
- VideoEngine* _videoEngine;
- ViEBase* _vieBase;
- ViECapture* _vieCapture;
- ViERTP_RTCP* _vieRTPRTCP;
- ViERender* _vieRender;
- ViECodec* _vieCodec;
- ViENetwork* _vieNetwork;
- ViEFile* _vieFile;
- TbExternalTransport* _externalTransport;
- char _fileName[256];
-
-
-#ifndef NO_VOICE_ENGINE
- VoiceEngine* _voiceEngine;
- VoEBase* _veBase;
- VoENetwork* _veNetwork;
- VoECodec* _veCodec;
- VoERTP_RTCP* _veRTCP;
-#else
- void* _voiceEngine;
-
-#endif
-
- VideoCodec _sendCodec;
- int _captureId;
- CaptureDevicePool& _captureDevicePool;
- ChannelPool& _channelPool;
-
-
- afx_msg void OnCbnSelchangeCodecList();
- afx_msg void OnCbnSelchangeDevice();
- afx_msg void OnCbnSelchangeSize();
- afx_msg void OnCbnSelchangeBitrate();
- afx_msg void OnCbnSelchangeWindowSize();
- afx_msg void OnBnClickedversion();
- afx_msg void OnCbnSelchangeMinFrameRate();
- afx_msg void OnBnClickedStartlisten();
- afx_msg void OnBnClickedStoplisten();
- afx_msg void OnBnClickedStopsend();
- afx_msg void OnBnClickedTmmbr();
- afx_msg void OnCbnSelchangeRtcpmode();
- afx_msg void OnBnClickedProtNack();
- afx_msg void OnBnClickedProtNone();
- afx_msg void OnBnClickedProtFec();
- afx_msg void OnBnClickedProtNackFec();
- afx_msg void OnBnClickedFreezelog();
-public:
- afx_msg void OnBnClickedExttransport();
- afx_msg void OnCbnSelchangePacketloss();
- afx_msg void OnCbnSelchangeDelay();
- afx_msg void OnBnClickedBtnRecordIncoming();
- afx_msg void OnBnClickedBtnRecordOutgoing();
- afx_msg void OnBnClickedBtnCreateSlave();
- afx_msg void OnBnClickedVersion();
-};
-
-//{{AFX_INSERT_LOCATION}}
-// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
-
-#endif // WEBRTC_VIDEO_ENGINE_MAIN_TEST_WINDOWSTEST_CHANNELDLG_H_
diff --git a/src/video_engine/main/test/WindowsTest/ChannelPool.cc b/src/video_engine/main/test/WindowsTest/ChannelPool.cc
deleted file mode 100644
index dbd1644fae..0000000000
--- a/src/video_engine/main/test/WindowsTest/ChannelPool.cc
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#include "ChannelPool.h"
-#include "map_wrapper.h"
-#include
-#include
-#include "critical_section_wrapper.h"
-
-ChannelPool::ChannelPool():
-_critSect(*webrtc::CriticalSectionWrapper::CreateCriticalSection())
-{
-}
-
-ChannelPool::~ChannelPool(void)
-{
- assert(_channelMap.Size()==0);
- delete &_critSect;
-}
-
-WebRtc_Word32 ChannelPool::AddChannel(int channel)
-{
- return _channelMap.Insert(channel,(void*) channel);
-}
-WebRtc_Word32 ChannelPool::RemoveChannel(int channel)
-{
- return _channelMap.Erase(channel);
-}
-
-webrtc::MapWrapper& ChannelPool::ChannelMap()
-{
- return _channelMap;
-}
diff --git a/src/video_engine/main/test/WindowsTest/ChannelPool.h b/src/video_engine/main/test/WindowsTest/ChannelPool.h
deleted file mode 100644
index 374c676a31..0000000000
--- a/src/video_engine/main/test/WindowsTest/ChannelPool.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#pragma once
-#include "StdAfx.h"
-#include "common_types.h"
-
-#include "vie_base.h"
-#include "map_wrapper.h"
-
-namespace webrtc {
-class CriticalSectionWrapper;
-}
-
-class ChannelPool
-{
-public:
- ChannelPool();
- ~ChannelPool(void);
- WebRtc_Word32 AddChannel(int channel);
- WebRtc_Word32 RemoveChannel(int channel);
-
- webrtc::MapWrapper& ChannelMap();
-
- private:
- webrtc::CriticalSectionWrapper& _critSect;
- webrtc::MapWrapper _channelMap;
-
-};
diff --git a/src/video_engine/main/test/WindowsTest/StdAfx.h b/src/video_engine/main/test/WindowsTest/StdAfx.h
deleted file mode 100644
index 78b1fbddfd..0000000000
--- a/src/video_engine/main/test/WindowsTest/StdAfx.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-// stdafx.h : include file for standard system include files,
-// or project specific include files that are used frequently, but
-// are changed infrequently
-//
-
-#ifndef WEBRTC_VIDEO_ENGINE_MAIN_TEST_WINDOWSTEST_STDAFX_H_
-#define WEBRTC_VIDEO_ENGINE_MAIN_TEST_WINDOWSTEST_STDAFX_H_
-
-#if _MSC_VER > 1000
-#pragma once
-#endif // _MSC_VER > 1000
-
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
-
-#include // MFC core and standard components
-#include // MFC extensions
-#include // MFC Automation classes
-#include // MFC support for Internet Explorer 4 Common Controls
-#ifndef _AFX_NO_AFXCMN_SUPPORT
-#include // MFC support for Windows Common Controls
-#endif // _AFX_NO_AFXCMN_SUPPORT
-
-
-//{{AFX_INSERT_LOCATION}}
-// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
-
-#endif // WEBRTC_VIDEO_ENGINE_MAIN_TEST_WINDOWSTEST_STDAFX_H_
diff --git a/src/video_engine/main/test/WindowsTest/VideoSize.h b/src/video_engine/main/test/WindowsTest/VideoSize.h
deleted file mode 100644
index 60e2bdd070..0000000000
--- a/src/video_engine/main/test/WindowsTest/VideoSize.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#ifndef WEBRTC_VIDEO_ENGINE_MAIN_TEST_WINDOWSTEST_VIDEOSIZE_H_
-#define WEBRTC_VIDEO_ENGINE_MAIN_TEST_WINDOWSTEST_VIDEOSIZE_H_
-#include "StdAfx.h"
-enum VideoSize
- {
- UNDEFINED,
- SQCIF, // 128*96 = 12 288
- QQVGA, // 160*120 = 19 200
- QCIF, // 176*144 = 25 344
- CGA, // 320*200 = 64 000
- QVGA, // 320*240 = 76 800
- SIF, // 352*240 = 84 480
- WQVGA, // 400*240 = 96 000
- CIF, // 352*288 = 101 376
- W288P, // 512*288 = 147 456 (WCIF)
- W368P, // 640*368 = 235 520
- S_448P, // 576*448 = 281 088
- VGA, // 640*480 = 307 200
- S_432P, // 720*432 = 311 040
- W432P, // 768*432 = 331 776 (a.k.a WVGA 16:9)
- S_4SIF, // 704*480 = 337 920
- W448P, // 768*448 = 344 064
- NTSC, // 720*480 = 345 600
- FW448P, // 800*448 = 358 400
- S_768x480P, // 768*480 = 368 640 (a.k.a WVGA 16:10)
- WVGA, // 800*480 = 384 000
- S_4CIF, // 704576 = 405 504
- SVGA, // 800*600 = 480 000
- W544P, // 960*544 = 522 240
- W576P, // 1024*576 = 589 824 (W4CIF)
- HD, // 960*720 = 691 200
- XGA, // 1024*768 = 786 432
- WHD, // 1280*720 = 921 600
- FULL_HD, // 1440*1080 = 1 555 200
- UXGA, // 1600*1200 = 1 920 000
- WFULL_HD, // 1920*1080 = 2 073 600
- NUMBER_OF_VIDEO_SIZE
- };
-
-int GetWidthHeight(VideoSize size, int& width, int& height);
-
-
-#endif // WEBRTC_VIDEO_ENGINE_MAIN_TEST_WINDOWSTEST_VIDEOSIZE_H_
diff --git a/src/video_engine/main/test/WindowsTest/WindowsTest.cc b/src/video_engine/main/test/WindowsTest/WindowsTest.cc
deleted file mode 100644
index ff8159cf58..0000000000
--- a/src/video_engine/main/test/WindowsTest/WindowsTest.cc
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#include "WindowsTest.h"
-#include "ChannelDlg.h"
-#include "WindowsTestMainDlg.h"
-#include "engine_configurations.h"
-
-#ifdef _DEBUG
-#define new DEBUG_NEW
-#undef THIS_FILE
-static char THIS_FILE[] = __FILE__;
-#endif
-
-// Check memory leaks id running debug
-#if (defined(_DEBUG) && defined(_WIN32))
-// #include "vld.h"
-#endif
-/////////////////////////////////////////////////////////////////////////////
-// CDXWindowsTestApp
-
-BEGIN_MESSAGE_MAP(CDXWindowsTestApp, CWinApp)
- //{{AFX_MSG_MAP(CDXWindowsTestApp)
- // NOTE - the ClassWizard will add and remove mapping macros here.
- // DO NOT EDIT what you see in these blocks of generated code!
- //}}AFX_MSG
- ON_COMMAND(ID_HELP, CWinApp::OnHelp)
-END_MESSAGE_MAP()
-
-/////////////////////////////////////////////////////////////////////////////
-// CDXWindowsTestApp construction
-
-CDXWindowsTestApp::CDXWindowsTestApp()
-{
-
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// The one and only object
-
-CDXWindowsTestApp theApp;
-
-/////////////////////////////////////////////////////////////////////////////
-// CDXWindowsTestApp initialization
-
-BOOL CDXWindowsTestApp::InitInstance()
-{
- int result=0;
- #ifndef NO_VOICE_ENGINE
- _voiceEngine = VoiceEngine::Create();
- _veBase = VoEBase::GetInterface(_voiceEngine);
- result+=_veBase->Init();
- #else
- _voiceEngine=NULL;
- #endif
-
- _videoEngine = VideoEngine::Create();
-
- _videoEngine->SetTraceFilter(webrtc::kTraceDefault);//webrtc::kTraceDebug | webrtc::kTraceError | webrtc::kTraceApiCall | webrtc::kTraceWarning | webrtc::kTraceCritical | webrtc::kTraceStateInfo | webrtc::kTraceInfo | webrtc::kTraceStream);
- _videoEngine->SetTraceFile("trace.txt");
-
- ViEBase* vieBase=ViEBase::GetInterface(_videoEngine);
- result+=vieBase->Init();
- if(result!=0)
- {
- ::MessageBox (NULL, (LPCTSTR)("failed to init VideoEngine"), TEXT("Error Message"), MB_OK | MB_ICONINFORMATION);
- }
-
- {
- WindowsTestMainDlg dlg(_videoEngine,_voiceEngine);
-
- m_pMainWnd = &dlg;
- dlg.DoModal();
- }
-
- vieBase->Release();
-
- if(!VideoEngine::Delete(_videoEngine))
- {
- char errorMsg[255];
- sprintf(errorMsg,"All VideoEngine interfaces are not released properly!");
- ::MessageBox (NULL, (LPCTSTR)errorMsg, TEXT("Error Message"), MB_OK | MB_ICONINFORMATION);
- }
-
- #ifndef NO_VOICE_ENGINE
-
- _veBase->Terminate();
- if(_veBase->Release()!=0)
- {
- // ensure that no interface is still referenced
- char errorMsg[256];
- sprintf(errorMsg,"All VoiceEngine interfaces are not released properly!");
- ::MessageBox (NULL, (LPCTSTR)errorMsg, TEXT("Error Message"), MB_OK | MB_ICONINFORMATION);
- }
-
- if (false == VoiceEngine::Delete(_voiceEngine))
- {
- char errorMsg[256];
- sprintf(errorMsg,"VoiceEngine::Delete() failed!");
- ::MessageBox (NULL, (LPCTSTR)errorMsg, TEXT("Error Message"), MB_OK | MB_ICONINFORMATION);
- }
- #endif
-
- // Since the dialog has been closed, return FALSE so that we exit the
- // application, rather than start the application's message pump.
- return FALSE;
-}
diff --git a/src/video_engine/main/test/WindowsTest/WindowsTest.h b/src/video_engine/main/test/WindowsTest/WindowsTest.h
deleted file mode 100644
index dc3ee9d26b..0000000000
--- a/src/video_engine/main/test/WindowsTest/WindowsTest.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#ifndef WEBRTC_VIDEO_ENGINE_MAIN_TEST_WINDOWSTEST_WINDOWSTEST_H_
-#define WEBRTC_VIDEO_ENGINE_MAIN_TEST_WINDOWSTEST_WINDOWSTEST_H_
-
-
-#include "StdAfx.h"
-#include "resource.h" // main symbols
-
-
-
-/////////////////////////////////////////////////////////////////////////////
-
-//Forward declarations
-namespace webrtc {
- class VoiceEngine;
- class VoEBase;
- class VideoEngine;
-}
-using namespace webrtc;
-
-class CDXWindowsTestApp : public CWinApp
-{
-public:
- CDXWindowsTestApp();
-
-// Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CDXWindowsTestApp)
- public:
- virtual BOOL InitInstance();
- //}}AFX_VIRTUAL
-
-// Implementation
-
- //{{AFX_MSG(CDXWindowsTestApp)
- // NOTE - the ClassWizard will add and remove member functions here.
- // DO NOT EDIT what you see in these blocks of generated code !
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
-
- VideoEngine* _videoEngine;
- VoiceEngine* _voiceEngine;
- VoEBase* _veBase;
-};
-
-
-/////////////////////////////////////////////////////////////////////////////
-
-//{{AFX_INSERT_LOCATION}}
-// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
-
-#endif // WEBRTC_VIDEO_ENGINE_MAIN_TEST_WINDOWSTEST_WINDOWSTEST_H_
diff --git a/src/video_engine/main/test/WindowsTest/WindowsTestMainDlg.cc b/src/video_engine/main/test/WindowsTest/WindowsTestMainDlg.cc
deleted file mode 100644
index fcc490d93b..0000000000
--- a/src/video_engine/main/test/WindowsTest/WindowsTestMainDlg.cc
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-// WindowsTestMainDlg.cpp : implementation file
-//
-#include "WindowsTestMainDlg.h"
-#include "WindowsTest.h"
-#include "ChannelDlg.h"
-
-#include "voe_base.h"
-
-// WindowsTestMainDlg dialog
-
-IMPLEMENT_DYNAMIC(WindowsTestMainDlg, CDialog)
-
-WindowsTestMainDlg::WindowsTestMainDlg(VideoEngine* videoEngine,void* voiceEngine,CWnd* pParent /*=NULL*/)
- : CDialog(WindowsTestMainDlg::IDD, pParent),
- _videoEngine(videoEngine),
- _voiceEngine((VoiceEngine*) voiceEngine),
- _testDlg1(NULL),
- _testDlg2(NULL),
- _testDlg3(NULL),
- _testDlg4(NULL),
- _externalInWidth(0),
- _externalInHeight(0),
- _externalInVideoType(0),
- _captureDevicePool(videoEngine)
-{
-
-}
-
-WindowsTestMainDlg::~WindowsTestMainDlg()
-{
-}
-
-void WindowsTestMainDlg::DoDataExchange(CDataExchange* pDX)
-{
- CDialog::DoDataExchange(pDX);
-}
-
-
-BEGIN_MESSAGE_MAP(WindowsTestMainDlg, CDialog)
- ON_BN_CLICKED(IDC_CHANNEL1, &WindowsTestMainDlg::OnBnClickedChannel1)
- ON_BN_CLICKED(IDC_CHANNEL2, &WindowsTestMainDlg::OnBnClickedChannel2)
- ON_BN_CLICKED(IDC_CHANNEL3, &WindowsTestMainDlg::OnBnClickedChannel3)
- ON_BN_CLICKED(IDC_CHANNEL4, &WindowsTestMainDlg::OnBnClickedChannel4)
-END_MESSAGE_MAP()
-
-
-
-void WindowsTestMainDlg::OnBnClickedChannel1()
-{
- if(!_testDlg1)
- {
- _testDlg1=new CDXChannelDlg(_videoEngine,_captureDevicePool,_channelPool,_voiceEngine,NULL,this);
- _testDlg1->Create(CDXChannelDlg::IDD,this);
- }
- else
- {
- _testDlg1->SetActiveWindow();
- }
-}
-
-void WindowsTestMainDlg::OnBnClickedChannel2()
-{
- if(!_testDlg2)
- {
- _testDlg2=new CDXChannelDlg(_videoEngine,_captureDevicePool,_channelPool,_voiceEngine,NULL,this);
- _testDlg2->Create(CDXChannelDlg::IDD,this);
-
- }
- else
- {
- _testDlg2->SetActiveWindow();
- }
-}
-
-void WindowsTestMainDlg::ChannelDialogEnded(CDXChannelDlg* context)
-{
- if(context==_testDlg4)
- {
- delete _testDlg4;
- _testDlg4=NULL;
- }
- else if(context==_testDlg3)
- {
- delete _testDlg3;
- _testDlg3=NULL;
- }
- else if(context==_testDlg2)
- {
- delete _testDlg2;
- _testDlg2=NULL;
- }
- else if(context==_testDlg1)
- {
- delete _testDlg1;
- _testDlg1=NULL;
- }
- else // Slave channel
- {
- delete context;
- }
-
-}
-
-
-
-void WindowsTestMainDlg::OnBnClickedChannel3()
-{
- if(!_testDlg3)
- {
- _testDlg3=new CDXChannelDlg(_videoEngine,_captureDevicePool,_channelPool,_voiceEngine,NULL,this);
- _testDlg3->Create(CDXChannelDlg::IDD,this);
-
- }
- else
- {
- _testDlg3->SetActiveWindow();
- }
-}
-
-void WindowsTestMainDlg::OnBnClickedChannel4()
-{
- if(!_testDlg4)
- {
- _testDlg4=new CDXChannelDlg(_videoEngine,_captureDevicePool,_channelPool,_voiceEngine,NULL,this);
- _testDlg4->Create(CDXChannelDlg::IDD,this);
-
- }
- else
- {
- _testDlg4->SetActiveWindow();
- }
-}
diff --git a/src/video_engine/main/test/WindowsTest/WindowsTestMainDlg.h b/src/video_engine/main/test/WindowsTest/WindowsTestMainDlg.h
deleted file mode 100644
index 8aae99a9e1..0000000000
--- a/src/video_engine/main/test/WindowsTest/WindowsTestMainDlg.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#pragma once
-#include "StdAfx.h"
-#include "WindowsTestResource.h"
-
-#include "ChannelDlg.h"
-#include "CaptureDevicePool.h"
-#include "ChannelPool.h"
-
-//Forward declarations
-namespace webrtc {
- class VideoEngine;
- class VoiceEngine;
-}
-using namespace webrtc;
-class CDXCaptureDlg;
-
-
-class WindowsTestMainDlg : public CDialog, private CDXChannelDlgObserver
-{
- DECLARE_DYNAMIC(WindowsTestMainDlg)
-
-public:
- WindowsTestMainDlg(VideoEngine* videoEngine,void* voiceEngine=NULL,CWnd* pParent = NULL); // standard constructor
- virtual ~WindowsTestMainDlg();
-
-// Dialog Data
- enum { IDD = IDD_WINDOWSTEST_MAIN };
-
-protected:
- virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
-
- DECLARE_MESSAGE_MAP()
-public:
- afx_msg void OnBnClickedChannel1();
- afx_msg void OnBnClickedChannel2();
- afx_msg void OnBnClickedChannel3();
- afx_msg void OnBnClickedChannel4();
-
-
- VideoEngine* _videoEngine;
- VoiceEngine* _voiceEngine;
- VoEBase* _veBase;
-
- CDXChannelDlg* _testDlg1;
- CDXChannelDlg* _testDlg2;
- CDXChannelDlg* _testDlg3;
- CDXChannelDlg* _testDlg4;
-
- int _externalInWidth;
- int _externalInHeight;
- int _externalInVideoType;
-
- CaptureDevicePool _captureDevicePool;
- ChannelPool _channelPool;
-
-
-private:
- virtual void ChannelDialogEnded(CDXChannelDlg* context);
-
-public:
-
-};
diff --git a/src/video_engine/main/test/WindowsTest/WindowsTestResouce.rc b/src/video_engine/main/test/WindowsTest/WindowsTestResouce.rc
deleted file mode 100644
index 5e866ad614..0000000000
--- a/src/video_engine/main/test/WindowsTest/WindowsTestResouce.rc
+++ /dev/null
@@ -1,101 +0,0 @@
-// Microsoft Visual C++ generated resource script.
-//
-#include "WindowsTestResource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include "afxres.h"
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// Swedish resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_SVE)
-#ifdef _WIN32
-LANGUAGE LANG_SWEDISH, SUBLANG_DEFAULT
-#pragma code_page(1252)
-#endif //_WIN32
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE
-BEGIN
- "WindowsTestResource.h\0"
-END
-
-2 TEXTINCLUDE
-BEGIN
- "#include ""afxres.h""\r\n"
- "\0"
-END
-
-3 TEXTINCLUDE
-BEGIN
- "\r\n"
- "\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
-IDD_WINDOWSTEST_MAIN DIALOGEX 0, 0, 186, 156
-STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Windows ViE Test"
-FONT 8, "MS Shell Dlg", 400, 0, 0x1
-BEGIN
- DEFPUSHBUTTON "OK",IDOK,129,7,50,14
- PUSHBUTTON "Cancel",IDCANCEL,129,24,50,14
- PUSHBUTTON "Channel 1",IDC_CHANNEL1,129,45,50,14
- PUSHBUTTON "Channel 2",IDC_CHANNEL2,129,62,50,14
- PUSHBUTTON "Channel 3",IDC_CHANNEL3,129,79,50,14
- PUSHBUTTON "Channel 4",IDC_CHANNEL4,129,96,50,14
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// DESIGNINFO
-//
-
-#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO
-BEGIN
- IDD_WINDOWSTEST_MAIN, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 179
- TOPMARGIN, 7
- BOTTOMMARGIN, 149
- END
-END
-#endif // APSTUDIO_INVOKED
-
-#endif // Swedish resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
-
diff --git a/src/video_engine/main/test/WindowsTest/WindowsTestResource.h b/src/video_engine/main/test/WindowsTest/WindowsTestResource.h
deleted file mode 100644
index 2d49c28a6f..0000000000
--- a/src/video_engine/main/test/WindowsTest/WindowsTestResource.h
+++ /dev/null
@@ -1,28 +0,0 @@
-//{{NO_DEPENDENCIES}}
-// Microsoft Visual C++ generated include file.
-// Used by WindowsTestResouce.rc
-//
-#define IDD_WINDOWSTEST_MAIN 101
-#define IDC_CHANNEL1 1001
-#define IDC_CHANNEL2 1002
-#define IDC_CHANNEL3 1004
-#define IDC_CHANNEL4 1005
-#define IDC_POSITION 1009
-#define IDC_INFORMATION 1050
-#define IDC_CHECK_CHANNEL1 1070
-#define IDC_CHECK_CHANNEL2 1071
-#define IDC_CHECK_CHANNEL3 1072
-#define IDC_CHECK_CHANNEL4 1073
-#define IDC_COMBO1 1074
-#define IDC_BTN_CREATE2 1076
-
-// Next default values for new objects
-//
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 106
-#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1076
-#define _APS_NEXT_SYMED_VALUE 107
-#endif
-#endif
diff --git a/src/video_engine/main/test/WindowsTest/captureDeviceImage.jpg b/src/video_engine/main/test/WindowsTest/captureDeviceImage.jpg
deleted file mode 100644
index 3bb3ba48bb..0000000000
Binary files a/src/video_engine/main/test/WindowsTest/captureDeviceImage.jpg and /dev/null differ
diff --git a/src/video_engine/main/test/WindowsTest/renderStartImage.jpg b/src/video_engine/main/test/WindowsTest/renderStartImage.jpg
deleted file mode 100644
index b10a84259c..0000000000
Binary files a/src/video_engine/main/test/WindowsTest/renderStartImage.jpg and /dev/null differ
diff --git a/src/video_engine/main/test/WindowsTest/renderTimeoutImage.jpg b/src/video_engine/main/test/WindowsTest/renderTimeoutImage.jpg
deleted file mode 100644
index cb34d67664..0000000000
Binary files a/src/video_engine/main/test/WindowsTest/renderTimeoutImage.jpg and /dev/null differ
diff --git a/src/video_engine/main/test/WindowsTest/res/Capture.rc2 b/src/video_engine/main/test/WindowsTest/res/Capture.rc2
deleted file mode 100644
index d9acfd2f5f..0000000000
--- a/src/video_engine/main/test/WindowsTest/res/Capture.rc2
+++ /dev/null
@@ -1,13 +0,0 @@
-//
-// DXCAPTURE.RC2 - resources Microsoft Visual C++ does not edit directly
-//
-
-#ifdef APSTUDIO_INVOKED
- #error this file is not editable by Microsoft Visual C++
-#endif //APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-// Add manually edited resources here...
-
-/////////////////////////////////////////////////////////////////////////////
diff --git a/src/video_engine/main/test/WindowsTest/resource.h b/src/video_engine/main/test/WindowsTest/resource.h
deleted file mode 100644
index 34e90eb4f2..0000000000
--- a/src/video_engine/main/test/WindowsTest/resource.h
+++ /dev/null
@@ -1,58 +0,0 @@
-//{{NO_DEPENDENCIES}}
-// Microsoft Visual C++ generated include file.
-// Used by Capture.rc
-//
-#define IDM_ABOUTBOX 0x0010
-#define IDD_DXQUALITY_DIALOG 102
-#define IDI_ICON1 130
-#define IDD_SLAVE_CHANNEL 132
-#define IDC_LIVEVIDEO 1000
-#define IDC_CAPTURE 1001
-#define IDC_DEVICE 1003
-#define IDC_STARTSEND 1004
-#define IDC_STARTLISTEN 1006
-#define IDC_STOPLISTEN 1007
-#define IDC_STOPSend 1008
-#define IDC_CODEC_LIST 1010
-#define IDC_CODEC_SIZE 1011
-#define IDC_IPADDRESS1 1012
-#define IDC_LOCAL_PORT1 1013
-#define IDC_CHANGE_SIZE 1017
-#define IDC_QUALITY 1018
-#define IDC_BITRATE 1019
-#define IDC_WINDOW_SIZE 1022
-#define IDC_REMOTE_PORT1 1025
-#define IDC_START_REC 1030
-#define IDC_STOP_REC 1031
-#define IDC_CAM_PROPERTY 1033
-#define IDC_ONMODE 1034
-#define IDC_CAPTURECAP 1038
-#define IDC_RADIO1 1039
-#define IDC_MIN_FRAME_RATE 1040
-#define IDC_RTCPMODE 1042
-#define IDC_TMMBR 1043
-#define IDC_PACKETBURST 1044
-#define IDC_PROT_NONE 1045
-#define IDC_PROT_NACK 1046
-#define IDC_PROT_FEC 1047
-#define IDC_PROT_NACKFEC 1048
-#define IDC_INFORMATION 1050
-#define IDC_PACKETLOSS 1051
-#define IDC_FREEZELOG 1052
-#define IDC_VERSION 1053
-#define IDC_EXTTRANSPORT 1054
-#define IDC_DELAY 1055
-#define IDC_BTN_RECORD_INCOMING 1056
-#define IDC_BTN_RECORD_OUTGOING 1057
-#define IDC_BTN_CREATE_SLAVE 1058
-
-// Next default values for new objects
-//
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 133
-#define _APS_NEXT_COMMAND_VALUE 32771
-#define _APS_NEXT_CONTROL_VALUE 1059
-#define _APS_NEXT_SYMED_VALUE 101
-#endif
-#endif
diff --git a/src/video_engine/main/test/WindowsTest/tbExternalTransport.cc b/src/video_engine/main/test/WindowsTest/tbExternalTransport.cc
deleted file mode 100644
index df490fa18e..0000000000
--- a/src/video_engine/main/test/WindowsTest/tbExternalTransport.cc
+++ /dev/null
@@ -1,313 +0,0 @@
-/*
- * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-//
-// tbExternalTransport.cpp
-//
-
-#include "tbExternalTransport.h"
-
-#include "critical_section_wrapper.h"
-#include "event_wrapper.h"
-#include "thread_wrapper.h"
-#include "tick_util.h"
-#include "vie_network.h"
-#include "tick_util.h"
-
-using namespace webrtc;
-
-TbExternalTransport::TbExternalTransport(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),
- _dropCount(0),
- _rtcpCount(0),
- _rtpPackets(),
- _rtcpPackets(),
- _checkSSRC(false),
- _lastSSRC(0),
- _checkSequenceNumber(0),
- _firstSequenceNumber(0),
- _lastSeq(0)
-{
- srand((int)TickTime::MicrosecondTimestamp());
- unsigned int tId = 0;
- _thread.Start(tId);
-}
-
-
-TbExternalTransport::~TbExternalTransport()
-{
- // TODO: stop thread
- _thread.SetNotAlive();
- _event.Set();
- if (_thread.Stop())
- {
- delete &_thread;
- delete &_event;
- }
- delete &_crit;
- delete &_statCrit;
-}
-
-
-
-
-
-int TbExternalTransport::SendPacket(int channel, const void *data, int len)
-{
- _statCrit.Enter();
- _rtpCount++;
- _statCrit.Leave();
-
-
- unsigned short sequenceNumber = (((unsigned char*) data)[2]) << 8;
- sequenceNumber += (((unsigned char*) data)[3]);
-
-
- // Packet loss
- int dropThis = rand() % 100;
- bool nacked=false;
- if(sequenceNumber<_lastSeq)
- {
- nacked=true;
- }
- else
- {
- _lastSeq=sequenceNumber;
- }
-
- if (dropThis < _lossRate)
- {
- _statCrit.Enter();
- _dropCount++;
- _statCrit.Leave();
-
-
- /* char str[256];
- sprintf(str,"Dropping seq %d length %d m %d, ts %u\n", sequenceNumber,len,marker,timestamp) ;
- OutputDebugString(str);*/
-
- return len;
- }
- else
- {
- if(nacked)
- {
- /*char str[256];
- sprintf(str,"Resending seq %d length %d m %d, ts %u\n", sequenceNumber,len,marker,timestamp) ;
- OutputDebugString(str);*/
- }
- else
- {
- /*char str[256];
- sprintf(str,"Sending seq %d length %d m %d, ts %u\n", sequenceNumber,len,marker,timestamp) ;
- OutputDebugString(str);*/
-
- }
- }
-
-
- VideoPacket* newPacket = new VideoPacket();
- memcpy(newPacket->packetBuffer, data, len);
- newPacket->length = len;
- newPacket->channel = channel;
-
- _crit.Enter();
- newPacket->receiveTime = NowMs() + _networkDelayMs;
- _rtpPackets.push(newPacket);
- _event.Set();
- _crit.Leave();
- return len;
-}
-
-int TbExternalTransport::SendRTCPPacket(int channel, const void *data, int len)
-{
- _statCrit.Enter();
- _rtcpCount++;
- _statCrit.Leave();
-
- VideoPacket* newPacket = new VideoPacket();
- memcpy(newPacket->packetBuffer, data, len);
- newPacket->length = len;
- newPacket->channel = channel;
-
- _crit.Enter();
- newPacket->receiveTime = NowMs() + _networkDelayMs;
- _rtcpPackets.push(newPacket);
- _event.Set();
- _crit.Leave();
- return len;
-}
-
-WebRtc_Word32 TbExternalTransport::SetPacketLoss(WebRtc_Word32 lossRate)
-{
- CriticalSectionScoped cs(_statCrit);
- _lossRate = lossRate;
- return 0;
-}
-
-void TbExternalTransport::SetNetworkDelay(WebRtc_Word64 delayMs)
-{
- CriticalSectionScoped cs(_crit);
- _networkDelayMs = delayMs;
- return;
-}
-
-void TbExternalTransport::ClearStats()
-{
- CriticalSectionScoped cs(_statCrit);
- _rtpCount = 0;
- _dropCount = 0;
- _rtcpCount = 0;
- return;
-}
-
-void TbExternalTransport::GetStats(WebRtc_Word32& numRtpPackets, WebRtc_Word32& numDroppedPackets, WebRtc_Word32& numRtcpPackets)
-{
- CriticalSectionScoped cs(_statCrit);
- numRtpPackets = _rtpCount;
- numDroppedPackets = _dropCount;
- numRtcpPackets = _rtcpCount;
- return;
-}
-
-void TbExternalTransport::EnableSSRCCheck()
-{
- CriticalSectionScoped cs(_statCrit);
- _checkSSRC = true;
-}
-unsigned int TbExternalTransport::ReceivedSSRC()
-{
- CriticalSectionScoped cs(_statCrit);
- return _lastSSRC;
-}
-
-void TbExternalTransport::EnableSequenceNumberCheck()
-{
- CriticalSectionScoped cs(_statCrit);
- _checkSequenceNumber = true;
-}
-
-unsigned short TbExternalTransport::GetFirstSequenceNumber()
-{
- CriticalSectionScoped cs(_statCrit);
- return _firstSequenceNumber;
-}
-
-
-bool TbExternalTransport::ViEExternalTransportRun(void* object)
-{
- return static_cast(object)->ViEExternalTransportProcess();
-}
-bool TbExternalTransport::ViEExternalTransportProcess()
-{
- unsigned int waitTime = KMaxWaitTimeMs;
-
- VideoPacket* packet = NULL;
-
- while (!_rtpPackets.empty())
- {
- // Take first packet in queue
- _crit.Enter();
- packet = _rtpPackets.front();
- WebRtc_Word64 timeToReceive = packet->receiveTime - NowMs();
- if (timeToReceive > 0)
- {
- // No packets to receive yet
- if (timeToReceive < waitTime &&
- timeToReceive > 0)
- {
- waitTime = (unsigned int) timeToReceive;
- }
- _crit.Leave();
- break;
- }
- _rtpPackets.pop();
- _crit.Leave();
-
- // Send to ViE
- if (packet)
- {
- {
- CriticalSectionScoped cs(_statCrit);
- if (_checkSSRC)
- {
- _lastSSRC = ((packet->packetBuffer[8]) << 24);
- _lastSSRC += (packet->packetBuffer[9] << 16);
- _lastSSRC += (packet->packetBuffer[10] << 8);
- _lastSSRC += packet->packetBuffer[11];
- _checkSSRC = false;
- }
- if (_checkSequenceNumber)
- {
- _firstSequenceNumber = (unsigned char)packet->packetBuffer[2] << 8;
- _firstSequenceNumber += (unsigned char)packet->packetBuffer[3];
- _checkSequenceNumber = false;
- }
- }
- /*
- unsigned short sequenceNumber = (unsigned char)packet->packetBuffer[2] << 8;
- sequenceNumber += (unsigned char)packet->packetBuffer[3];
-
- int marker=packet->packetBuffer[1] & 0x80;
- unsigned int timestamp=((((unsigned char*)packet->packetBuffer)[4]) << 24) + ((((unsigned char*)packet->packetBuffer)[5])<<16) +((((unsigned char*)packet->packetBuffer)[6])<<8)+(((unsigned char*)packet->packetBuffer)[7]);
- char str[256];
- sprintf(str,"Receiving seq %u length %d m %d, ts %u\n", sequenceNumber,packet->length,marker,timestamp) ;
- OutputDebugString(str);*/
-
- _vieNetwork.ReceivedRTPPacket(packet->channel, packet->packetBuffer, packet->length);
- delete packet;
- packet = NULL;
- }
- }
- while (!_rtcpPackets.empty())
- {
- // Take first packet in queue
- _crit.Enter();
- packet = _rtcpPackets.front();
- WebRtc_Word64 timeToReceive = packet->receiveTime - NowMs();
- if (timeToReceive > 0)
- {
- // No packets to receive yet
- if (timeToReceive < waitTime &&
- timeToReceive > 0)
- {
- waitTime = (unsigned int) timeToReceive;
- }
- _crit.Leave();
- break;
- }
- packet = _rtcpPackets.front();
- _rtcpPackets.pop();
- _crit.Leave();
-
- // Send to ViE
- if (packet)
- {
- _vieNetwork.ReceivedRTCPPacket(packet->channel, packet->packetBuffer, packet->length);
- delete packet;
- packet = NULL;
- }
- }
- _event.Wait(waitTime + 1); // Add 1 ms to not call to early...
- return true;
-}
-
-WebRtc_Word64 TbExternalTransport::NowMs()
-{
- return TickTime::MillisecondTimestamp();
-}
diff --git a/src/video_engine/main/test/WindowsTest/tbExternalTransport.h b/src/video_engine/main/test/WindowsTest/tbExternalTransport.h
deleted file mode 100644
index 53226c6699..0000000000
--- a/src/video_engine/main/test/WindowsTest/tbExternalTransport.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-//
-// tbExternalTransport.h
-//
-
-#ifndef WEBRTC_VIDEO_ENGINE_MAIN_TEST_WINDOWSTEST_TBEXTERNALTRANSPORT_H_
-#define WEBRTC_VIDEO_ENGINE_MAIN_TEST_WINDOWSTEST_TBEXTERNALTRANSPORT_H_
-
-#include "common_types.h"
-#include
-
-namespace webrtc
-{
-class CriticalSectionWrapper;
-class EventWrapper;
-class ThreadWrapper;
-class ViENetwork;
-}
-
-class TbExternalTransport : public webrtc::Transport
-{
-public:
- TbExternalTransport(webrtc::ViENetwork& vieNetwork);
- ~TbExternalTransport(void);
-
- virtual int SendPacket(int channel, const void *data, int len);
- virtual int SendRTCPPacket(int channel, const void *data, int len);
-
- WebRtc_Word32 SetPacketLoss(WebRtc_Word32 lossRate); // Rate in %
- void SetNetworkDelay(WebRtc_Word64 delayMs);
-
- void ClearStats();
- void GetStats(WebRtc_Word32& numRtpPackets, WebRtc_Word32& numDroppedPackets, WebRtc_Word32& numRtcpPackets);
-
- void EnableSSRCCheck();
- unsigned int ReceivedSSRC();
-
- void EnableSequenceNumberCheck();
- unsigned short GetFirstSequenceNumber();
-
-
-protected:
- static bool ViEExternalTransportRun(void* object);
- bool ViEExternalTransportProcess();
-private:
- WebRtc_Word64 NowMs();
-
- enum { KMaxPacketSize = 1650};
- enum { KMaxWaitTimeMs = 100};
- typedef struct
- {
- WebRtc_Word8 packetBuffer[KMaxPacketSize];
- WebRtc_Word32 length;
- WebRtc_Word32 channel;
- WebRtc_Word64 receiveTime;
- } VideoPacket;
-
- typedef std::queue VideoPacketQueue;
-
-
- webrtc::ViENetwork& _vieNetwork;
- webrtc::ThreadWrapper& _thread;
- webrtc::EventWrapper& _event;
- webrtc::CriticalSectionWrapper& _crit;
- webrtc::CriticalSectionWrapper& _statCrit;
-
- WebRtc_Word32 _lossRate;
- WebRtc_Word64 _networkDelayMs;
- WebRtc_Word32 _rtpCount;
- WebRtc_Word32 _rtcpCount;
- WebRtc_Word32 _dropCount;
-
- VideoPacketQueue _rtpPackets;
- VideoPacketQueue _rtcpPackets;
-
- bool _checkSSRC;
- WebRtc_UWord32 _lastSSRC;
- bool _checkSequenceNumber;
- WebRtc_UWord16 _firstSequenceNumber;
- WebRtc_Word32 _lastSeq;
-
- //int& numberOfErrors;
-
- //int _bits;
- //int _lastTicks;
- //int _dropCnt;
- //int _sentCount;
- //int _frameCount;
- //int _packetLoss;
-
- //VideoEngine* _video;
-
- //ReceiveBufferQueue _videoBufferQueue;
- //ReceiveBufferQueue _rtcpBufferQueue;
-};
-
-#endif // WEBRTC_VIDEO_ENGINE_MAIN_TEST_WINDOWSTEST_TBEXTERNALTRANSPORT_H_
diff --git a/src/video_engine/main/test/WindowsTest/videosize.cc b/src/video_engine/main/test/WindowsTest/videosize.cc
deleted file mode 100644
index a675ec5ff7..0000000000
--- a/src/video_engine/main/test/WindowsTest/videosize.cc
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#include "VideoSize.h"
-int GetWidthHeight( VideoSize size, int& width, int& height)
-{
- switch(size)
- {
- case SQCIF:
- width = 128;
- height = 96;
- return 0;
- case QQVGA:
- width = 160;
- height = 120;
- return 0;
- case QCIF:
- width = 176;
- height = 144;
- return 0;
- case CGA:
- width = 320;
- height = 200;
- return 0;
- case QVGA:
- width = 320;
- height = 240;
- return 0;
- case SIF:
- width = 352;
- height = 240;
- return 0;
- case WQVGA:
- width = 400;
- height = 240;
- return 0;
- case CIF:
- width = 352;
- height = 288;
- return 0;
- case W288P:
- width = 512;
- height = 288;
- return 0;
- case W368P:
- width = 640;
- height = 368;
- return 0;
- case S_448P:
- width = 576;
- height = 448;
- return 0;
- case VGA:
- width = 640;
- height = 480;
- return 0;
- case S_432P:
- width = 720;
- height = 432;
- return 0;
- case W432P:
- width = 768;
- height = 432;
- return 0;
- case S_4SIF:
- width = 704;
- height = 480;
- return 0;
- case W448P:
- width = 768;
- height = 448;
- return 0;
- case NTSC:
- width = 720;
- height = 480;
- return 0;
- case FW448P:
- width = 800;
- height = 448;
- return 0;
- case S_768x480P:
- width = 768;
- height = 480;
- return 0;
- case WVGA:
- width = 800;
- height = 480;
- return 0;
- case S_4CIF:
- width = 704;
- height = 576;
- return 0;
- case SVGA:
- width = 800;
- height = 600;
- return 0;
- case W544P:
- width = 960;
- height = 544;
- return 0;
- case W576P:
- width = 1024;
- height = 576;
- return 0;
- case HD:
- width = 960;
- height = 720;
- return 0;
- case XGA:
- width = 1024;
- height = 768;
- return 0;
- case FULL_HD:
- width = 1440;
- height = 1080;
- return 0;
- case WHD:
- width = 1280;
- height = 720;
- return 0;
- case UXGA:
- width = 1600;
- height = 1200;
- return 0;
- case WFULL_HD:
- width = 1920;
- height = 1080;
- return 0;
- default:
- return -1;
- }
- return -1;
-}
\ No newline at end of file
diff --git a/src/video_engine/main/test/WindowsTest/windowstest.gypi b/src/video_engine/main/test/WindowsTest/windowstest.gypi
deleted file mode 100644
index 83d0515744..0000000000
--- a/src/video_engine/main/test/WindowsTest/windowstest.gypi
+++ /dev/null
@@ -1,86 +0,0 @@
-# Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-{
- 'conditions': [
- # TODO(kjellander): Support UseoFMFC on VS2010.
- # http://code.google.com/p/webrtc/issues/detail?id=709
- ['OS=="win" and MSVS_VERSION < "2010"', {
- 'targets': [
- # WinTest - GUI test for Windows
- {
- 'target_name': 'vie_win_test',
- 'type': 'executable',
- 'dependencies': [
- '<(webrtc_root)/modules/modules.gyp:video_render_module',
- '<(webrtc_root)/modules/modules.gyp:video_capture_module',
- '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
- ## VoiceEngine
- '<(webrtc_root)/voice_engine/voice_engine.gyp:voice_engine_core',
- ## VideoEngine
- 'video_engine_core',
- ],
- 'include_dirs': [
- './interface',
- '../../../../', # common_types.h and typedefs.h
- '../commonTestClasses/'
- ],
- 'sources': [
- 'Capture.rc',
- 'captureDeviceImage.jpg',
- 'ChannelDlg.cc',
- 'ChannelDlg.h',
- 'ChannelPool.cc',
- 'ChannelPool.h',
- 'renderStartImage.jpg',
- 'renderTimeoutImage.jpg',
- 'res\Capture.rc2',
- 'resource.h',
- 'StdAfx.h',
- 'videosize.cc',
- 'VideoSize.h',
- 'WindowsTest.cc',
- 'WindowsTest.h',
- 'WindowsTestMainDlg.cc',
- 'WindowsTestMainDlg.h',
- 'WindowsTestResouce.rc',
- 'WindowsTestResource.h',
- 'tbExternalTransport.cc',
- 'CaptureDevicePool.cc',
- 'tbExternalTransport.h',
- 'CaptureDevicePool.h',
-
- ],
- 'configurations': {
- 'Common_Base': {
- 'msvs_configuration_attributes': {
- 'conditions': [
- ['component=="shared_library"', {
- 'UseOfMFC': '2', # Shared DLL
- },{
- 'UseOfMFC': '1', # Static
- }],
- ],
- },
- },
- },
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'SubSystem': '2', # Windows
- },
- },
- },
- ],
- }],
- ],
-}
-# Local Variables:
-# tab-width:2
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=2 shiftwidth=2:
diff --git a/src/video_engine/video_engine.gyp b/src/video_engine/video_engine.gyp
index c02deae6de..6e72dd551b 100644
--- a/src/video_engine/video_engine.gyp
+++ b/src/video_engine/video_engine.gyp
@@ -17,7 +17,6 @@
'includes': [
'test/libvietest/libvietest.gypi',
'test/auto_test/vie_auto_test.gypi',
- 'main/test/WindowsTest/windowstest.gypi',
],
}],
],