Extracted a helper library from vie_auto_test.

This CL does not attempt to fix the style issues in the moved tb_ files, at least not yet. In general I've tried to avoid dependencies between the library and vie_auto_test: vie_auto_test depends on the library but not the other way around. I had to make some slight changes to achieve this. I had to remove some ViETest::Log statements in tb_interfaces.cc and I had to move knowledge of where to put output files to the library. I think it ended up being pretty clean in the end but let me know if I missed something. I tried to convert all paths I touched to src-relative paths, so look out if I missed something there.

BUG=
TEST=

Review URL: https://webrtc-codereview.appspot.com/450004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@1923 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
phoglund@webrtc.org 2012-03-22 12:56:54 +00:00
parent 6aa529ca1b
commit 4aa57b4150
38 changed files with 172 additions and 141 deletions

View File

@ -11,8 +11,8 @@
#ifndef WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_INTERFACE_VIDEO_CAPTURE_H_
#define WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_INTERFACE_VIDEO_CAPTURE_H_
#include "module.h"
#include "video_capture_defines.h"
#include "modules/interface/module.h"
#include "modules/video_capture/main/interface/video_capture_defines.h"
namespace webrtc {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
* 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
@ -13,7 +13,7 @@
// Includes
#include "typedefs.h"
#include "module_common_types.h"
#include "modules/interface/module_common_types.h"
namespace webrtc
{

View File

@ -10,7 +10,7 @@
#include "video_engine/test/auto_test/automated/two_windows_fixture.h"
#include "video_engine/test/auto_test/helpers/vie_window_creator.h"
#include "video_engine/test/auto_test/interface/vie_window_creator.h"
#include "video_engine/test/auto_test/interface/vie_autotest_window_manager_interface.h"
void TwoWindowsFixture::SetUpTestCase() {

View File

@ -13,14 +13,14 @@
#include "gtest/gtest.h"
#include "gflags/gflags.h"
#include "video_engine/test/auto_test/automated/two_windows_fixture.h"
#include "video_engine/test/auto_test/helpers/bit_flip_encryption.h"
#include "video_engine/test/auto_test/helpers/random_encryption.h"
#include "video_engine/test/auto_test/helpers/vie_window_creator.h"
#include "video_engine/test/auto_test/interface/tb_capture_device.h"
#include "video_engine/test/auto_test/interface/tb_interfaces.h"
#include "video_engine/test/auto_test/interface/tb_video_channel.h"
#include "video_engine/test/auto_test/interface/vie_window_creator.h"
#include "video_engine/test/auto_test/interface/vie_autotest_window_manager_interface.h"
#include "video_engine/test/auto_test/primitives/general_primitives.h"
#include "video_engine/test/libvietest/include/bit_flip_encryption.h"
#include "video_engine/test/libvietest/include/random_encryption.h"
#include "video_engine/test/libvietest/include/tb_capture_device.h"
#include "video_engine/test/libvietest/include/tb_interfaces.h"
#include "video_engine/test/libvietest/include/tb_video_channel.h"
namespace {

View File

@ -14,10 +14,10 @@
#include "gtest/gtest.h"
#include "testsupport/fileutils.h"
#include "testsupport/metrics/video_metrics.h"
#include "video_engine/test/auto_test/helpers/vie_to_file_renderer.h"
#include "video_engine/test/auto_test/interface/vie_autotest.h"
#include "video_engine/test/auto_test/interface/vie_file_based_comparison_tests.h"
#include "video_engine/test/auto_test/primitives/framedrop_primitives.h"
#include "video_engine/test/libvietest/include/vie_to_file_renderer.h"
namespace {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
* 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

View File

@ -16,13 +16,13 @@
#include "testsupport/fileutils.h"
#include "testsupport/frame_reader.h"
#include "testsupport/frame_writer.h"
#include "video_engine/test/auto_test/helpers/vie_to_file_renderer.h"
#include "video_engine/test/auto_test/interface/tb_interfaces.h"
#include "video_engine/test/auto_test/interface/tb_external_transport.h"
#include "video_engine/test/auto_test/interface/vie_autotest.h"
#include "video_engine/test/auto_test/interface/vie_autotest_defines.h"
#include "video_engine/test/auto_test/primitives/framedrop_primitives.h"
#include "video_engine/test/auto_test/primitives/general_primitives.h"
#include "video_engine/test/libvietest/include/tb_interfaces.h"
#include "video_engine/test/libvietest/include/tb_external_transport.h"
#include "video_engine/test/libvietest/include/vie_to_file_renderer.h"
// Tracks which frames are created on the local side and reports them to the
// FrameDropDetector class.

View File

@ -17,7 +17,7 @@
#include "video_engine/include/vie_codec.h"
#include "video_engine/include/vie_image_process.h"
#include "video_engine/test/auto_test/interface/vie_autotest_defines.h"
#include "video_engine/test/auto_test/helpers/vie_to_file_renderer.h"
#include "video_engine/test/libvietest/include/vie_to_file_renderer.h"
class FrameDropDetector;
class TbInterfaces;

View File

@ -12,29 +12,25 @@
// vie_autotest.cc
//
#include "vie_autotest.h"
#include "video_engine/test/auto_test/interface/vie_autotest.h"
#include <stdio.h>
#include "engine_configurations.h"
#include "general_primitives.h"
#include "tb_interfaces.h"
#include "tb_video_channel.h"
#include "tb_capture_device.h"
#include "modules/video_render/main/interface/video_render.h"
#include "testsupport/fileutils.h"
#include "video_render.h"
#include "vie_autotest_defines.h"
#include "video_engine/test/auto_test/interface/vie_autotest_defines.h"
#include "video_engine/test/auto_test/primitives/general_primitives.h"
#include "video_engine/test/libvietest/include/tb_capture_device.h"
#include "video_engine/test/libvietest/include/tb_interfaces.h"
#include "video_engine/test/libvietest/include/tb_video_channel.h"
// ViETest implementation
FILE* ViETest::log_file_ = NULL;
char* ViETest::log_str_ = NULL;
std::string ViETest::GetResultOutputPath() {
#ifdef WEBRTC_ANDROID
return "/sdcard/";
#else
return webrtc::test::OutputPath();
#endif
return webrtc::test::OutputPath();
}
// ViEAutoTest implementation

View File

@ -702,13 +702,10 @@ void ViEAutoTest::ViERtpRtcpAPITest()
// RTP Dump
//
{
#ifdef WEBRTC_ANDROID
const char* dumpName = "/sdcard/DumpFileName.rtp";
#else
std::string output_file = webrtc::test::OutputPath() +
"DumpFileName.rtp";
const char* dumpName = output_file.c_str();
#endif
EXPECT_EQ(0, ViE.rtp_rtcp->StartRTPDump(
tbChannel.videoChannel, dumpName, webrtc::kRtpIncoming));
EXPECT_EQ(0, ViE.rtp_rtcp->StopRTPDump(

View File

@ -10,14 +10,14 @@
#include "video_engine/test/auto_test/interface/vie_file_based_comparison_tests.h"
#include "video_engine/test/auto_test/interface/tb_interfaces.h"
#include "video_engine/test/auto_test/interface/vie_autotest_defines.h"
#include "video_engine/test/auto_test/helpers/vie_fake_camera.h"
#include "video_engine/test/auto_test/helpers/vie_to_file_renderer.h"
#include "video_engine/test/auto_test/primitives/base_primitives.h"
#include "video_engine/test/auto_test/primitives/codec_primitives.h"
#include "video_engine/test/auto_test/primitives/framedrop_primitives.h"
#include "video_engine/test/auto_test/primitives/general_primitives.h"
#include "video_engine/test/libvietest/include/tb_interfaces.h"
#include "video_engine/test/libvietest/include/vie_fake_camera.h"
#include "video_engine/test/libvietest/include/vie_to_file_renderer.h"
bool ViEFileBasedComparisonTests::TestCallSetup(
const std::string& i420_video_file,

View File

@ -8,13 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include "vie_window_creator.h"
#include "video_engine/test/auto_test/interface/vie_window_creator.h"
#include "vie_autotest_main.h"
#include "vie_codec.h"
#include "voe_codec.h"
#include "vie_window_manager_factory.h"
#include "vie_autotest_window_manager_interface.h"
#include "video_engine/include/vie_codec.h"
#include "video_engine/test/auto_test/interface/vie_autotest_main.h"
#include "video_engine/test/auto_test/interface/vie_autotest_window_manager_interface.h"
#include "video_engine/test/auto_test/interface/vie_window_manager_factory.h"
#include "voice_engine/main/interface/voe_codec.h"
#if defined(WIN32)
#include <tchar.h>

View File

@ -21,6 +21,7 @@
'<(webrtc_root)/../test/metrics.gyp:metrics',
'<(webrtc_root)/../test/test.gyp:test_support',
'video_engine_core',
'libvietest',
],
'include_dirs': [
'interface/',
@ -32,11 +33,6 @@
'../../../common_video/interface',
],
'sources': [
'interface/tb_capture_device.h',
'interface/tb_external_transport.h',
'interface/tb_I420_codec.h',
'interface/tb_interfaces.h',
'interface/tb_video_channel.h',
'interface/vie_autotest.h',
'interface/vie_autotest_defines.h',
'interface/vie_autotest_linux.h',
@ -47,20 +43,7 @@
'interface/vie_autotest_windows.h',
'interface/vie_file_based_comparison_tests.h',
'interface/vie_window_manager_factory.h',
# Helper classes
'helpers/bit_flip_encryption.cc',
'helpers/bit_flip_encryption.h',
'helpers/random_encryption.cc',
'helpers/random_encryption.h',
'helpers/vie_fake_camera.cc',
'helpers/vie_fake_camera.h',
'helpers/vie_file_capture_device.cc',
'helpers/vie_file_capture_device.h',
'helpers/vie_to_file_renderer.cc',
'helpers/vie_to_file_renderer.h',
'helpers/vie_window_creator.cc',
'helpers/vie_window_creator.h',
'interface/vie_window_creator.h',
# New, fully automated tests
'automated/legacy_fixture.cc',
@ -83,11 +66,6 @@
'primitives/general_primitives.h',
# Platform independent
'source/tb_capture_device.cc',
'source/tb_external_transport.cc',
'source/tb_I420_codec.cc',
'source/tb_interfaces.cc',
'source/tb_video_channel.cc',
'source/vie_autotest.cc',
'source/vie_autotest_base.cc',
'source/vie_autotest_capture.cc',
@ -103,6 +81,7 @@
'source/vie_autotest_custom_call.cc',
'source/vie_autotest_simulcast.cc',
'source/vie_file_based_comparison_tests.cc',
'source/vie_window_creator.cc',
# Platform dependent
# Android

View File

@ -8,12 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include "video_engine/test/auto_test/helpers/bit_flip_encryption.h"
#include "video_engine/test/libvietest/include/bit_flip_encryption.h"
#include <cstdlib>
#include "video_engine/test/auto_test/interface/vie_autotest_defines.h"
float NormalizedRand() {
return static_cast<float>(rand()) /
static_cast<float>(RAND_MAX);

View File

@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include "video_engine/test/auto_test/helpers/random_encryption.h"
#include "video_engine/test/libvietest/include/random_encryption.h"
#include <algorithm>
#include <cstdlib>

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
* 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
@ -7,13 +7,13 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "vie_fake_camera.h"
#include "video_engine/test/libvietest/include/vie_fake_camera.h"
#include <assert.h>
#include "vie_capture.h"
#include "vie_file_capture_device.h"
#include "thread_wrapper.h"
#include "system_wrappers/interface/thread_wrapper.h"
#include "video_engine/include/vie_capture.h"
#include "video_engine/test/libvietest/include/vie_file_capture_device.h"
// This callback runs the camera thread:
bool StreamVideoFileRepeatedlyIntoCaptureDevice(void* data) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
* 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
@ -7,17 +7,16 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "vie_file_capture_device.h"
#include "video_engine/test/libvietest/include/vie_file_capture_device.h"
#include <assert.h>
#include "common_types.h"
#include "critical_section_wrapper.h"
#include "event_wrapper.h"
#include "module_common_types.h"
#include "vie_autotest_defines.h"
#include "vie_capture.h"
#include "tick_util.h"
#include "modules/interface/module_common_types.h"
#include "system_wrappers/interface/critical_section_wrapper.h"
#include "system_wrappers/interface/event_wrapper.h"
#include "system_wrappers/interface/tick_util.h"
#include "video_engine/include/vie_capture.h"
// This class ensures we are not exceeding the max FPS.
class FramePacemaker {

View File

@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include "vie_to_file_renderer.h"
#include "video_engine/test/libvietest/include/vie_to_file_renderer.h"
#include <assert.h>

View File

@ -9,17 +9,14 @@
*/
/*
* tb_I420_codec.h
*
* This file contains the interface to I420 "codec"
* This is a dummy wrapper to allow VCM deal with raw I420 sequences
*
*/
#ifndef WEBRTC_VIDEO_ENGINE_MAIN_TEST_AUTOTEST_INTERFACE_TB_I420_CODEC_H_
#define WEBRTC_VIDEO_ENGINE_MAIN_TEST_AUTOTEST_INTERFACE_TB_I420_CODEC_H_
#include "video_codec_interface.h"
#include "modules/video_coding/codecs/interface/video_codec_interface.h"
class TbI420Encoder: public webrtc::VideoEncoder
{

View File

@ -13,8 +13,9 @@
#include <string>
#include "tb_interfaces.h"
#include "video_capture_factory.h"
#include "modules/video_capture/main/interface/video_capture_factory.h"
class TbInterfaces;
class TbCaptureDevice
{

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
* 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
@ -11,26 +11,27 @@
#ifndef WEBRTC_VIDEO_ENGINE_MAIN_TEST_AUTOTEST_INTERFACE_TB_INTERFACES_H_
#define WEBRTC_VIDEO_ENGINE_MAIN_TEST_AUTOTEST_INTERFACE_TB_INTERFACES_H_
#include "vie_autotest_defines.h"
#include <string>
#include "common_types.h"
#include "vie_base.h"
#include "vie_capture.h"
#include "vie_codec.h"
#include "vie_image_process.h"
#include "vie_network.h"
#include "vie_render.h"
#include "vie_rtp_rtcp.h"
#include "vie_encryption.h"
#include "vie_defines.h"
#include "video_engine/include/vie_base.h"
#include "video_engine/include/vie_capture.h"
#include "video_engine/include/vie_codec.h"
#include "video_engine/include/vie_image_process.h"
#include "video_engine/include/vie_network.h"
#include "video_engine/include/vie_render.h"
#include "video_engine/include/vie_rtp_rtcp.h"
#include "video_engine/include/vie_encryption.h"
#include "video_engine/vie_defines.h"
// This class deals with all the tedium of setting up video engine interfaces.
// It does its work in constructor and destructor, so keeping it in scope is
// enough.
// enough. It also sets up tracing.
class TbInterfaces
{
public:
TbInterfaces(const char* test_name);
// Sets up all interfaces and creates a trace file
TbInterfaces(std::string test_name);
~TbInterfaces(void);
webrtc::VideoEngine* video_engine;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
* 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
@ -11,7 +11,8 @@
#ifndef WEBRTC_VIDEO_ENGINE_MAIN_TEST_AUTOTEST_INTERFACE_TB_VIDEO_CHANNEL_H_
#define WEBRTC_VIDEO_ENGINE_MAIN_TEST_AUTOTEST_INTERFACE_TB_VIDEO_CHANNEL_H_
#include "tb_interfaces.h"
#include "video_engine/test/libvietest/include/tb_interfaces.h"
class TbVideoChannel
{
public:

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
* 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

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
* 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

View File

@ -0,0 +1,57 @@
# 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.
{
'targets': [
{
'target_name': 'libvietest',
'type': '<(library)',
'dependencies': [
'<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
'<(webrtc_root)/../testing/gtest.gyp:gtest',
'<(webrtc_root)/../test/test.gyp:test_support',
'video_engine_core',
],
'direct_dependent_settings': {
'include_dirs': [
'include/',
]
},
'include_dirs': [
'include/',
'helpers/',
],
'sources': [
# Helper classes
'include/bit_flip_encryption.h',
'include/random_encryption.h',
'include/vie_fake_camera.h',
'include/vie_file_capture_device.h',
'include/vie_to_file_renderer.h',
'helpers/bit_flip_encryption.cc',
'helpers/random_encryption.cc',
'helpers/vie_fake_camera.cc',
'helpers/vie_file_capture_device.cc',
'helpers/vie_to_file_renderer.cc',
# Testbed classes
'include/tb_capture_device.h',
'include/tb_external_transport.h',
'include/tb_I420_codec.h',
'include/tb_interfaces.h',
'include/tb_video_channel.h',
'testbed/tb_capture_device.cc',
'testbed/tb_external_transport.cc',
'testbed/tb_I420_codec.cc',
'testbed/tb_interfaces.cc',
'testbed/tb_video_channel.cc',
],
},
],
}

View File

@ -8,12 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
/*
* tb_I420_codec.cc
*
*/
#include "video_engine/test/libvietest/include/tb_I420_codec.h"
#include "tb_I420_codec.h"
#include <string.h>
#include <stdio.h>
#include <assert.h>

View File

@ -8,7 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include "tb_capture_device.h"
#include "video_engine/test/libvietest/include/tb_capture_device.h"
#include "gtest/gtest.h"
#include "video_engine/test/libvietest/include/tb_interfaces.h"
TbCaptureDevice::TbCaptureDevice(TbInterfaces& Engine) :
captureId(-1),
@ -45,8 +48,6 @@ TbCaptureDevice::TbCaptureDevice(TbInterfaces& Engine) :
int error = ViE.capture->AllocateCaptureDevice(*vcpm_, captureId);
if (error == 0)
{
ViETest::Log("Using capture device: %s, captureId: %d", deviceName,
captureId);
captureDeviceSet = true;
break;
}
@ -58,14 +59,11 @@ TbCaptureDevice::TbCaptureDevice(TbInterfaces& Engine) :
}
device_name_ = deviceName;
ViETest::Log("Starting capture device %s with captureId %d\n", deviceName,
captureId);
EXPECT_EQ(0, ViE.capture->StartCapture(captureId));
}
TbCaptureDevice::~TbCaptureDevice(void)
{
ViETest::Log("Stopping capture device with id %d\n", captureId);
EXPECT_EQ(0, ViE.capture->StopCapture(captureId));
EXPECT_EQ(0, ViE.capture->ReleaseCaptureDevice(captureId));
vcpm_->Release();

View File

@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include "tb_external_transport.h"
#include "video_engine/test/libvietest/include/tb_external_transport.h"
#include <stdio.h> // printf
#include <stdlib.h> // rand
@ -21,11 +21,11 @@
#include <cstring>
#endif
#include "critical_section_wrapper.h"
#include "event_wrapper.h"
#include "thread_wrapper.h"
#include "tick_util.h"
#include "vie_network.h"
#include "system_wrappers/interface/critical_section_wrapper.h"
#include "system_wrappers/interface/event_wrapper.h"
#include "system_wrappers/interface/thread_wrapper.h"
#include "system_wrappers/interface/tick_util.h"
#include "video_engine/include/vie_network.h"
#if defined(_WIN32)
#pragma warning(disable: 4355) // 'this' : used in base member initializer list
@ -110,7 +110,7 @@ int TbExternalTransport::SendPacket(int channel, const void *data, int len)
ssrc += ptr[10] << 8;
ssrc += ptr[11];
if (ssrc != _SSRC)
{
{
return len; // return len to avoid error in trace file
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
* 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
@ -8,20 +8,19 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include "tb_interfaces.h"
#include "video_engine/test/libvietest/include/tb_interfaces.h"
#include "gtest/gtest.h"
#include "testsupport/fileutils.h"
TbInterfaces::TbInterfaces(const char* test_name) {
std::string trace_file_path =
(ViETest::GetResultOutputPath() + test_name) + "_trace.txt";
ViETest::Log("Creating ViE Interfaces for test %s\n", test_name);
TbInterfaces::TbInterfaces(std::string test_name) {
std::string complete_path =
webrtc::test::OutputPath() + test_name + "_trace.txt";
video_engine = webrtc::VideoEngine::Create();
EXPECT_TRUE(video_engine != NULL);
EXPECT_EQ(0, video_engine->SetTraceFile(trace_file_path.c_str()));
EXPECT_EQ(0, video_engine->SetTraceFile(complete_path.c_str()));
EXPECT_EQ(0, video_engine->SetTraceFilter(webrtc::kTraceAll));
base = webrtc::ViEBase::GetInterface(video_engine);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
* 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
@ -8,7 +8,9 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include "tb_video_channel.h"
#include "video_engine/test/libvietest/include/tb_video_channel.h"
#include "gtest/gtest.h"
TbVideoChannel::TbVideoChannel(TbInterfaces& Engine,
webrtc::VideoCodecType sendCodec, int width,

View File

@ -16,6 +16,7 @@
'conditions': [
['build_with_chromium==0', {
'includes': [
'test/libvietest/libvietest.gypi',
'test/auto_test/vie_auto_test.gypi',
'main/test/WindowsTest/windowstest.gypi',
],

View File

@ -144,11 +144,7 @@ int main() {
MyObserver my_observer;
#if defined(WEBRTC_ANDROID)
const std::string out_path = "/sdcard/";
#else
const std::string out_path = webrtc::test::OutputPath();
#endif
const std::string trace_filename = out_path + "webrtc_trace.txt";
printf("Set trace filenames (enable trace)\n");

View File

@ -68,6 +68,16 @@ std::string ProjectRootPath() {
return kCannotFindProjectRootDir;
}
#ifdef WEBRTC_ANDROID
std::string OutputPath() {
// We need to touch this variable so it doesn't get flagged as unused.
(void)kOutputDirName;
return "/sdcard/";
}
#else // WEBRTC_ANDROID
std::string OutputPath() {
std::string path = ProjectRootPath();
if (path == kCannotFindProjectRootDir) {
@ -80,6 +90,8 @@ std::string OutputPath() {
return path + kPathDelimiter;
}
#endif // !WEBRTC_ANDROID
std::string WorkingDir() {
char path_buffer[FILENAME_MAX];
if (!GET_CURRENT_DIR(path_buffer, sizeof(path_buffer))) {

View File

@ -92,9 +92,10 @@ extern const char* kCannotFindProjectRootDir;
std::string ProjectRootPath();
// Creates and returns the absolute path to the output directory where log files
// and other test artifacts should be put. The output directory is always a
// and other test artifacts should be put. The output directory is generally a
// directory named "out" at the top-level of the project, i.e. a subfolder to
// the path returned by ProjectRootPath().
// the path returned by ProjectRootPath(). The exception is Android where we use
// /sdcard/ instead.
//
// Details described for ProjectRootPath() apply here too.
//