vie_auto_test will now obey the Mac .mm rules for files including objective-c code.
Fixed the Windows build. Fixed whitespace. Split the platform-specific code for creating a window manager into separate source files since the mac one must be suffixed .mm and not .cc when we happen to use objective-c code. Tested on Linux. BUG= TEST= Review URL: http://webrtc-codereview.appspot.com/214009 git-svn-id: http://webrtc.googlecode.com/svn/trunk@771 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
4c636764b7
commit
b5475d0076
@ -25,7 +25,6 @@
|
|||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
class ViEStandardIntegrationTest: public ViEIntegrationTest {
|
class ViEStandardIntegrationTest: public ViEIntegrationTest {
|
||||||
public:
|
|
||||||
};
|
};
|
||||||
|
|
||||||
TEST_F(ViEStandardIntegrationTest, RunsBaseTestWithoutErrors) {
|
TEST_F(ViEStandardIntegrationTest, RunsBaseTestWithoutErrors) {
|
||||||
|
@ -13,25 +13,16 @@
|
|||||||
#include "vie_autotest_main.h"
|
#include "vie_autotest_main.h"
|
||||||
#include "vie_codec.h"
|
#include "vie_codec.h"
|
||||||
#include "voe_codec.h"
|
#include "voe_codec.h"
|
||||||
#include "engine_configurations.h"
|
#include "vie_window_manager_factory.h"
|
||||||
|
#include "vie_autotest_window_manager_interface.h"
|
||||||
|
|
||||||
#if defined(WIN32)
|
#if defined(WIN32)
|
||||||
#include "vie_autotest_windows.h"
|
|
||||||
#include <tchar.h>
|
#include <tchar.h>
|
||||||
#include <ShellAPI.h> //ShellExecute
|
|
||||||
#elif defined(WEBRTC_MAC_INTEL)
|
|
||||||
#if defined(COCOA_RENDERING)
|
|
||||||
#include "vie_autotest_mac_cocoa.h"
|
|
||||||
#elif defined(CARBON_RENDERING)
|
|
||||||
#include "vie_autotest_mac_carbon.h"
|
|
||||||
#endif
|
|
||||||
#elif defined(WEBRTC_LINUX)
|
|
||||||
#include "vie_autotest_linux.h"
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ViEWindowCreator::ViEWindowCreator() {
|
ViEWindowCreator::ViEWindowCreator() {
|
||||||
// Create platform dependent render windows.
|
window_manager_ =
|
||||||
window_manager_ = new ViEAutoTestWindowManager();
|
ViEWindowManagerFactory::CreateWindowManagerForCurrentPlatform();
|
||||||
}
|
}
|
||||||
|
|
||||||
ViEWindowCreator::~ViEWindowCreator() {
|
ViEWindowCreator::~ViEWindowCreator() {
|
||||||
@ -40,7 +31,7 @@ ViEWindowCreator::~ViEWindowCreator() {
|
|||||||
|
|
||||||
ViEAutoTestWindowManagerInterface*
|
ViEAutoTestWindowManagerInterface*
|
||||||
ViEWindowCreator::CreateTwoWindows() {
|
ViEWindowCreator::CreateTwoWindows() {
|
||||||
#if (defined(_WIN32))
|
#if defined(WIN32)
|
||||||
TCHAR window1Title[1024] = _T("ViE Autotest Window 1");
|
TCHAR window1Title[1024] = _T("ViE Autotest Window 1");
|
||||||
TCHAR window2Title[1024] = _T("ViE Autotest Window 2");
|
TCHAR window2Title[1024] = _T("ViE Autotest Window 2");
|
||||||
#else
|
#else
|
||||||
|
@ -0,0 +1,25 @@
|
|||||||
|
/*
|
||||||
|
* 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 SRC_VIDEO_ENGINE_MAIN_TEST_AUTOTEST_INTERFACE_VIE_WINDOW_MANAGER_FACTORY_H_
|
||||||
|
#define SRC_VIDEO_ENGINE_MAIN_TEST_AUTOTEST_INTERFACE_VIE_WINDOW_MANAGER_FACTORY_H_
|
||||||
|
|
||||||
|
class ViEAutoTestWindowManagerInterface;
|
||||||
|
|
||||||
|
class ViEWindowManagerFactory {
|
||||||
|
public:
|
||||||
|
// This method is implemented in different files depending on platform.
|
||||||
|
// The caller is responsible for freeing the resulting object using
|
||||||
|
// the delete operator.
|
||||||
|
static ViEAutoTestWindowManagerInterface*
|
||||||
|
CreateWindowManagerForCurrentPlatform();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // SRC_VIDEO_ENGINE_MAIN_TEST_AUTOTEST_INTERFACE_VIE_WINDOW_MANAGER_FACTORY_H_
|
@ -8,11 +8,6 @@
|
|||||||
* be found in the AUTHORS file in the root of the source tree.
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
|
||||||
* vie_autotest_main.cc
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "vie_autotest_main.h"
|
#include "vie_autotest_main.h"
|
||||||
|
|
||||||
#include "vie_autotest_window_manager_interface.h"
|
#include "vie_autotest_window_manager_interface.h"
|
||||||
|
@ -0,0 +1,18 @@
|
|||||||
|
/*
|
||||||
|
* 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 "vie_window_manager_factory.h"
|
||||||
|
|
||||||
|
#include "vie_autotest_linux.h"
|
||||||
|
|
||||||
|
ViEAutoTestWindowManagerInterface*
|
||||||
|
ViEWindowManagerFactory::CreateWindowManagerForCurrentPlatform() {
|
||||||
|
return new ViEAutoTestWindowManager();
|
||||||
|
}
|
@ -0,0 +1,23 @@
|
|||||||
|
/*
|
||||||
|
* 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 "vie_window_manager_factory.h"
|
||||||
|
|
||||||
|
#include "engine_configurations.h"
|
||||||
|
#if defined(COCOA_RENDERING)
|
||||||
|
#include "vie_autotest_mac_cocoa.h"
|
||||||
|
#elif defined(CARBON_RENDERING)
|
||||||
|
#include "vie_autotest_mac_carbon.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
ViEAutoTestWindowManagerInterface*
|
||||||
|
ViEWindowManagerFactory::CreateWindowManagerForCurrentPlatform() {
|
||||||
|
return new ViEAutoTestWindowManager();
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
/*
|
||||||
|
* 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 "vie_window_manager_factory.h"
|
||||||
|
|
||||||
|
#include "vie_autotest_windows.h"
|
||||||
|
|
||||||
|
ViEAutoTestWindowManagerInterface*
|
||||||
|
ViEWindowManagerFactory::CreateWindowManagerForCurrentPlatform() {
|
||||||
|
return new ViEAutoTestWindowManager();
|
||||||
|
}
|
@ -75,11 +75,14 @@
|
|||||||
# Platform dependent
|
# Platform dependent
|
||||||
# Linux
|
# Linux
|
||||||
'source/vie_autotest_linux.cc',
|
'source/vie_autotest_linux.cc',
|
||||||
|
'source/vie_window_manager_factory_linux.cc',
|
||||||
# Mac
|
# Mac
|
||||||
'source/vie_autotest_mac_cocoa.mm',
|
'source/vie_autotest_mac_cocoa.mm',
|
||||||
'source/vie_autotest_mac_carbon.cc',
|
'source/vie_autotest_mac_carbon.cc',
|
||||||
|
'source/vie_window_manager_factory_mac.mm',
|
||||||
# Windows
|
# Windows
|
||||||
'source/vie_autotest_windows.cc',
|
'source/vie_autotest_windows.cc',
|
||||||
|
'source/vie_window_manager_factory_win.cc',
|
||||||
],
|
],
|
||||||
'copies': [{
|
'copies': [{
|
||||||
'destination': '/tmp',
|
'destination': '/tmp',
|
||||||
@ -99,6 +102,7 @@
|
|||||||
'sources!': [
|
'sources!': [
|
||||||
'source/vie_autotest_mac_cocoa.cc',
|
'source/vie_autotest_mac_cocoa.cc',
|
||||||
'source/vie_autotest_mac_carbon.cc',
|
'source/vie_autotest_mac_carbon.cc',
|
||||||
|
'source/vie_window_manager_factory_mac.mm',
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
['OS!="win"', {
|
['OS!="win"', {
|
||||||
@ -106,6 +110,11 @@
|
|||||||
'source/vie_autotest_windows.cc',
|
'source/vie_autotest_windows.cc',
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
|
['OS!="linux"', {
|
||||||
|
'sources!': [
|
||||||
|
'source/vie_window_manager_factory_linux.cc',
|
||||||
|
],
|
||||||
|
}],
|
||||||
|
|
||||||
# TODO(andrew): this likely isn't an actual dependency. It should be
|
# TODO(andrew): this likely isn't an actual dependency. It should be
|
||||||
# included in webrtc.gyp or video_engine.gyp instead.
|
# included in webrtc.gyp or video_engine.gyp instead.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user