Fix compilation error

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@630 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
leozwang@google.com 2011-09-20 16:41:20 +00:00
parent ec5e87614e
commit 657f483c26
3 changed files with 180 additions and 182 deletions

View File

@ -39,18 +39,21 @@ LOCAL_SRC_FILES := \
LOCAL_CFLAGS := \ LOCAL_CFLAGS := \
'-DWEBRTC_TARGET_PC' \ '-DWEBRTC_TARGET_PC' \
'-DWEBRTC_ANDROID' '-DWEBRTC_ANDROID' \
'-DWEBRTC_ANDROID_OPENSLES'
LOCAL_C_INCLUDES := \ LOCAL_C_INCLUDES := \
external/gtest/include \ external/gtest/include \
$(LOCAL_PATH)/../interface \ $(LOCAL_PATH)/../interface \
$(LOCAL_PATH)/../../interface \ $(LOCAL_PATH)/../../interface \
$(LOCAL_PATH)/../../../../../.. \
$(LOCAL_PATH)/../../../../interface \ $(LOCAL_PATH)/../../../../interface \
$(LOCAL_PATH)/../../../../source \ $(LOCAL_PATH)/../../../../source \
$(LOCAL_PATH)/../../../../../.. \
$(LOCAL_PATH)/../../../../../../common_video/interface \ $(LOCAL_PATH)/../../../../../../common_video/interface \
$(LOCAL_PATH)/../../../../../../common_video/vplib/main/interface \
$(LOCAL_PATH)/../../../../../../modules/interface \ $(LOCAL_PATH)/../../../../../../modules/interface \
$(LOCAL_PATH)/../../../../../../modules/video_capture/main/interface \ $(LOCAL_PATH)/../../../../../../modules/video_capture/main/interface \
$(LOCAL_PATH)/../../../../../../modules/video_capture/main/source \
$(LOCAL_PATH)/../../../../../../modules/video_coding/codecs/interface \ $(LOCAL_PATH)/../../../../../../modules/video_coding/codecs/interface \
$(LOCAL_PATH)/../../../../../../modules/video_render/main/interface \ $(LOCAL_PATH)/../../../../../../modules/video_render/main/interface \
$(LOCAL_PATH)/../../../../../../voice_engine/main/interface \ $(LOCAL_PATH)/../../../../../../voice_engine/main/interface \

View File

@ -33,7 +33,8 @@ LOCAL_SRC_FILES:= \
# Flags passed to both C and C++ files. # Flags passed to both C and C++ files.
LOCAL_CFLAGS := \ LOCAL_CFLAGS := \
'-DWEBRTC_TARGET_PC' \ '-DWEBRTC_TARGET_PC' \
'-DWEBRTC_ANDROID' '-DWEBRTC_ANDROID' \
'-DWEBRTC_ANDROID_OPENSLES'
LOCAL_C_INCLUDES := \ LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../interface \ $(LOCAL_PATH)/../interface \

View File

@ -17,29 +17,27 @@
#include "vie_autotest_defines.h" #include "vie_autotest_defines.h"
int ViEAutoTestAndroid::RunAutotest(int testSelection, int subTestSelection, int ViEAutoTestAndroid::RunAutotest(int testSelection, int subTestSelection,
void* window1, void* window2, void* javaVM, void* window1, void* window2,
void* env, void* context) void* javaVM, void* env, void* context) {
{
ViEAutoTest vieAutoTest(window1, window2); ViEAutoTest vieAutoTest(window1, window2);
ViETest::Log("RunAutoTest(%d, %d)", testSelection, subTestSelection); ViETest::Log("RunAutoTest(%d, %d)", testSelection, subTestSelection);
VideoEngine::SetAndroidObjects(javaVM, context); webrtc::VideoEngine::SetAndroidObjects(javaVM, context);
VoiceEngine::SetAndroidObjects(javaVM, env, context); #ifndef WEBRTC_ANDROID_OPENSLES
// voice engine calls into ADM directly
webrtc::VoiceEngine::SetAndroidAudioDeviceObjects(javaVM, env, context);
#endif
int testErrors = 0; int testErrors = 0;
if (subTestSelection == 0) if (subTestSelection == 0) {
{
// Run all selected test // Run all selected test
switch (testSelection) switch (testSelection) {
{
case 0: case 0:
testErrors += vieAutoTest.ViEStandardTest(); testErrors += vieAutoTest.ViEStandardTest();
if (testErrors == 0) if (testErrors == 0) {
{
// No errors found in delivery test, create delivery // No errors found in delivery test, create delivery
ViETest::Log("Standard/delivery passed. "); ViETest::Log("Standard/delivery passed. ");
} }
else else {
{
// Didn't pass // Didn't pass
ViETest::Log("\nStandard/delivery test failed."); ViETest::Log("\nStandard/delivery test failed.");
} }
@ -58,11 +56,9 @@ int ViEAutoTestAndroid::RunAutotest(int testSelection, int subTestSelection,
} }
} }
switch (testSelection) switch (testSelection) {
{
case 0: // Specific standard test case 0: // Specific standard test
switch (subTestSelection) switch (subTestSelection) {
{
case 1: // base case 1: // base
testErrors += vieAutoTest.ViEBaseStandardTest(); testErrors += vieAutoTest.ViEBaseStandardTest();
break; break;
@ -105,8 +101,7 @@ int ViEAutoTestAndroid::RunAutotest(int testSelection, int subTestSelection,
break; break;
case 1:// specific API case 1:// specific API
switch (subTestSelection) switch (subTestSelection) {
{
case 1: // base case 1: // base
testErrors += vieAutoTest.ViEBaseAPITest(); testErrors += vieAutoTest.ViEBaseAPITest();
break; break;
@ -151,9 +146,7 @@ int ViEAutoTestAndroid::RunAutotest(int testSelection, int subTestSelection,
break; break;
case 2:// specific extended case 2:// specific extended
switch (subTestSelection) {
switch (subTestSelection)
{
case 1: // base case 1: // base
testErrors += vieAutoTest.ViEBaseExtendedTest(); testErrors += vieAutoTest.ViEBaseExtendedTest();
break; break;
@ -189,6 +182,7 @@ int ViEAutoTestAndroid::RunAutotest(int testSelection, int subTestSelection,
case 10: // RTP/RTCP case 10: // RTP/RTCP
testErrors += vieAutoTest.ViERtpRtcpExtendedTest(); testErrors += vieAutoTest.ViERtpRtcpExtendedTest();
break; break;
case 11: case 11:
break; break;
@ -196,19 +190,19 @@ int ViEAutoTestAndroid::RunAutotest(int testSelection, int subTestSelection,
break; break;
} }
break; break;
case 3: case 3:
testErrors += vieAutoTest.ViELoopbackCall(); testErrors += vieAutoTest.ViELoopbackCall();
break; break;
default: default:
break; break;
} }
if (testErrors) if (testErrors) {
{
ViETest::Log("Test done with %d errors!\n", testErrors); ViETest::Log("Test done with %d errors!\n", testErrors);
} }
else else {
{
ViETest::Log("Test passed!\n"); ViETest::Log("Test passed!\n");
} }
return testErrors; return testErrors;