From ac2c677bf61f57c697c8656676464c9945789ba0 Mon Sep 17 00:00:00 2001 From: "stefan@webrtc.org" Date: Wed, 30 Nov 2011 14:23:39 +0000 Subject: [PATCH] Make all video_coding tests use the resources and output directories. BUG= TEST= Review URL: http://webrtc-codereview.appspot.com/298001 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1060 4adac7df-926f-26a2-2b94-8c16560cd09d --- .../main/test/codec_database_test.cc | 31 +++++++++++++------ .../main/test/decode_from_storage_test.cc | 5 +-- .../main/test/generic_codec_test.cc | 23 +++++++++----- .../video_coding/main/test/media_opt_test.cc | 22 ++++++++----- .../video_coding/main/test/mt_rx_tx_test.cc | 8 +++-- .../video_coding/main/test/normal_test.cc | 16 ++++++---- .../main/test/quality_modes_test.cc | 9 +++--- .../main/test/receiver_timing_tests.cc | 2 +- .../video_coding/main/test/test_callbacks.h | 2 +- .../video_coding/main/test/test_util.h | 27 +++++++++++----- .../video_coding/main/test/tester_main.cc | 5 +++ .../video_coding/main/test/video_rtp_play.cc | 7 +++-- .../main/test/video_rtp_play_mt.cc | 4 +-- .../video_coding/main/test/video_source.cc | 7 +++-- 14 files changed, 111 insertions(+), 57 deletions(-) diff --git a/src/modules/video_coding/main/test/codec_database_test.cc b/src/modules/video_coding/main/test/codec_database_test.cc index 44a9627d7..cfdd811f1 100644 --- a/src/modules/video_coding/main/test/codec_database_test.cc +++ b/src/modules/video_coding/main/test/codec_database_test.cc @@ -21,6 +21,7 @@ #include "test_callbacks.h" #include "test_macros.h" #include "test_util.h" +#include "testsupport/fileutils.h" #include "testsupport/metrics/video_metrics.h" #include "vp8.h" // for external codecs test @@ -60,11 +61,11 @@ CodecDataBaseTest::Setup(CmdArgs& args) _frameRate = args.frameRate; _lengthSourceFrame = 3*_width*_height/2; if (args.outputFile.compare("")) - _outname = "CDBtest_decoded.yuv"; + _outname = test::OutputPath() + "CDBtest_decoded.yuv"; else _outname = args.outputFile; _outname = args.outputFile; - _encodedName = "../CDBtest_encoded.vp8"; + _encodedName = test::OutputPath() + "CDBtest_encoded.vp8"; if ((_sourceFile = fopen(_inname.c_str(), "rb")) == NULL) { @@ -147,9 +148,10 @@ CodecDataBaseTest::Perform(CmdArgs& args) } printf("\n\nVerify that all requested codecs are used\n \n \n"); - // testing with first codec registered - VideoCodingModule::Codec(0, &sendCodec); + // Testing with VP8. + VideoCodingModule::Codec(kVideoCodecVP8, &sendCodec); _vcm->RegisterSendCodec(&sendCodec, 1, 1440); + _encodeCompleteCallback->SetCodecType(kRTPVideoVP8); _vcm->InitializeReceiver(); TEST (_vcm->AddVideoFrame(sourceFrame) == VCM_OK ); _vcm->InitializeSender(); @@ -242,6 +244,8 @@ CodecDataBaseTest::Perform(CmdArgs& args) // and because no frame type request callback has been registered. TEST(_vcm->Decode() == VCM_MISSING_CALLBACK); TEST(_vcm->FrameTypeRequest(kVideoFrameKey, 0) == VCM_OK); + _timeStamp += (WebRtc_UWord32)(9e4 / _frameRate); + sourceFrame.SetTimeStamp(_timeStamp); TEST(_vcm->AddVideoFrame(sourceFrame) == VCM_OK); TEST(_vcm->Decode() == VCM_OK); @@ -288,7 +292,7 @@ CodecDataBaseTest::Perform(CmdArgs& args) encodeCallCDT->RegisterReceiverVCM(_vcm); if (VideoCodingModule::NumberOfCodecs() > 0) { - // registrating all available decoders + // Register all available decoders. int i, j; //double psnr; sourceFrame.VerifyAndAllocate(_lengthSourceFrame); @@ -320,6 +324,11 @@ CodecDataBaseTest::Perform(CmdArgs& args) encodeCallCDT->SetCodecType(ConvertCodecType(sendCodec.plName)); TEST(_vcm->RegisterSendCodec(&sendCodec, 1, 1440) == VCM_OK); + // We disable the frame dropper to avoid dropping frames due to + // bad rate control. This isn't a codec performance test, and the + // I420 codec is expected to produce too many bits. + _vcm->EnableFrameDropper(false); + printf("Encoding with %s \n\n", sendCodec.plName); for (j=0; j < int(300/VideoCodingModule::NumberOfCodecs()); j++)// assuming 300 frames, NumberOfCodecs <= 10 { @@ -357,6 +366,14 @@ CodecDataBaseTest::Perform(CmdArgs& args) // decode what's left in the buffer.... _vcm->Decode(); _vcm->Decode(); + // Don't measure PSNR for I420 since it will be perfect. + if (sendCodec.codecType != kVideoCodecI420) { + QualityMetricsResult psnr; + PsnrFromFiles(_inname.c_str(), _outname.c_str(), _width, _height, &psnr); + printf("\n @ %d KBPS: ", sendCodec.startBitrate); + printf("PSNR from encoder-decoder send-receive control test" + "is %f\n\n", psnr.average); + } } // end: iterate codecs rewind(_sourceFile); sourceFrame.Free(); @@ -365,10 +382,6 @@ CodecDataBaseTest::Perform(CmdArgs& args) delete encodeCallCDT; // closing and calculating PSNR for prior encoder-decoder test TearDown(); // closing open files - QualityMetricsResult psnr; - PsnrFromFiles(_inname.c_str(), _outname.c_str(), _width, _height, &psnr); - printf(" \n @ %d KBPS: ", sendCodec.startBitrate); - printf("PSNR from encoder-decoder send-receive control test is %f \n \n", psnr.average); } // end of #codecs >1 delete waitEvent; diff --git a/src/modules/video_coding/main/test/decode_from_storage_test.cc b/src/modules/video_coding/main/test/decode_from_storage_test.cc index 700469afd..b35546d99 100644 --- a/src/modules/video_coding/main/test/decode_from_storage_test.cc +++ b/src/modules/video_coding/main/test/decode_from_storage_test.cc @@ -52,14 +52,15 @@ int DecodeFromStorageTest(CmdArgs& args) std::string rtpFilename = args.inputFile; std::string outFilename = args.outputFile; if (outFilename == "") - outFilename = "DecodeFromStorage.yuv"; + outFilename = test::OutputPath() + "DecodeFromStorage.yuv"; FrameReceiveCallback receiveCallback(outFilename.c_str()); // END Settings Trace::CreateTrace(); - Trace::SetTraceFile("decodeFromStorageTestTrace.txt"); + Trace::SetTraceFile( + (test::OutputPath() + "decodeFromStorageTestTrace.txt").c_str()); Trace::SetLevelFilter(webrtc::kTraceAll); diff --git a/src/modules/video_coding/main/test/generic_codec_test.cc b/src/modules/video_coding/main/test/generic_codec_test.cc index cc2af5edf..5fdefbaa9 100644 --- a/src/modules/video_coding/main/test/generic_codec_test.cc +++ b/src/modules/video_coding/main/test/generic_codec_test.cc @@ -23,14 +23,15 @@ enum { kMaxWaitEncTimeMs = 100 }; int GenericCodecTest::RunTest(CmdArgs& args) { - // Don't run this test with debug time #if !defined(TICK_TIME_DEBUG) || !defined(EVENT_DEBUG) + printf("\n\nEnable debug time to run this test!\n\n"); return -1; #endif VideoCodingModule* vcm = VideoCodingModule::Create(1); GenericCodecTest* get = new GenericCodecTest(vcm); Trace::CreateTrace(); - Trace::SetTraceFile("genericCodecTestTrace.txt"); + Trace::SetTraceFile( + (test::OutputPath() + "genericCodecTestTrace.txt").c_str()); Trace::SetLevelFilter(webrtc::kTraceAll); get->Perform(args); Trace::ReturnTrace(); @@ -62,10 +63,10 @@ GenericCodecTest::Setup(CmdArgs& args) _inname= args.inputFile; if (args.outputFile.compare("")) - _outname = "GCTest_decoded.yuv"; + _outname = test::OutputPath() + "GCTest_decoded.yuv"; else _outname = args.outputFile; - _encodedName = "../GCTest_encoded.vp8"; + _encodedName = test::OutputPath() + "GCTest_encoded.vp8"; _width = args.width; _height = args.height; _frameRate = args.frameRate; @@ -241,6 +242,11 @@ GenericCodecTest::Perform(CmdArgs& args) TEST(_vcm->RegisterFrameTypeCallback(&frameTypeCallback) == VCM_OK); TEST(_vcm->RegisterReceiveCodec(&sendCodec, 1) == VCM_OK); TEST(_vcm->AddVideoFrame(sourceFrame) == VCM_OK); + _timeStamp += (WebRtc_UWord32)(9e4 / static_cast(_frameRate)); + sourceFrame.SetTimeStamp(_timeStamp); + // First packet of a subsequent frame required before the jitter buffer + // will allow decoding an incomplete frame. + TEST(_vcm->AddVideoFrame(sourceFrame) == VCM_OK); TEST(_vcm->Decode() == VCM_OK); printf("API tests complete \n"); @@ -263,7 +269,7 @@ GenericCodecTest::Perform(CmdArgs& args) rewind(_sourceFile); sourceFrame.Free(); sourceFrame.VerifyAndAllocate(_lengthSourceFrame); - const float bitRate[] = {100, 400, 600, 1000, 2000, 3000}; + const float bitRate[] = {100, 400, 600, 1000, 2000}; const float nBitrates = sizeof(bitRate)/sizeof(*bitRate); float _bitRate = 0; int _frameCnt = 0; @@ -305,7 +311,8 @@ GenericCodecTest::Perform(CmdArgs& args) _encodeCompleteCallback->Initialize(); sendStats.SetTargetFrameRate(static_cast(_frameRate)); _vcm->RegisterSendStatisticsCallback(&sendStats); - while (fread(tmpBuffer, 1, _lengthSourceFrame, _sourceFile) > 0) + while (fread(tmpBuffer, 1, _lengthSourceFrame, _sourceFile) == + _lengthSourceFrame) { _frameCnt++; sourceFrame.CopyFrame(_lengthSourceFrame, tmpBuffer); @@ -465,9 +472,9 @@ GenericCodecTest::Perform(CmdArgs& args) sendStats.SetTargetFrameRate(static_cast(_frameRate)); _vcm->RegisterSendStatisticsCallback(&sendStats); rewind(_sourceFile); - while (!feof(_sourceFile)) + while (fread(tmpBuffer, 1, _lengthSourceFrame, _sourceFile) == + _lengthSourceFrame) { - TEST(fread(tmpBuffer, 1, _lengthSourceFrame, _sourceFile) > 0); sourceFrame.CopyFrame(_lengthSourceFrame, tmpBuffer); sourceFrame.SetHeight(_height); sourceFrame.SetWidth(_width); diff --git a/src/modules/video_coding/main/test/media_opt_test.cc b/src/modules/video_coding/main/test/media_opt_test.cc index 1ece9f6ff..a6e6c8575 100644 --- a/src/modules/video_coding/main/test/media_opt_test.cc +++ b/src/modules/video_coding/main/test/media_opt_test.cc @@ -32,7 +32,7 @@ using namespace webrtc; int MediaOptTest::RunTest(int testNum, CmdArgs& args) { Trace::CreateTrace(); - Trace::SetTraceFile("mediaOptTestTrace.txt"); + Trace::SetTraceFile((test::OutputPath() + "mediaOptTestTrace.txt").c_str()); Trace::SetLevelFilter(webrtc::kTraceAll); VideoCodingModule* vcm = VideoCodingModule::Create(1); MediaOptTest* mot = new MediaOptTest(vcm); @@ -98,10 +98,11 @@ MediaOptTest::Setup(int testType, CmdArgs& args) // test parameters _inname = args.inputFile; if (args.outputFile == "") - _outname = "../MOTest_out.vp8"; + _outname = test::OutputPath() + "MOTest_out.vp8"; else _outname = args.outputFile; - _actualSourcename = "../MOTestSource.yuv"; // actual source after frame dropping + // actual source after frame dropping + _actualSourcename = test::OutputPath() + "MOTestSource.yuv"; _codecName = args.codecName; _sendCodecType = args.codecType; _width = args.width; @@ -163,7 +164,8 @@ MediaOptTest::Setup(int testType, CmdArgs& args) /* test settings end*/ _lengthSourceFrame = 3*_width*_height/2; - _log.open("../VCM_MediaOptLog.txt", std::fstream::out | std::fstream::app); + _log.open((test::OutputPath() + "VCM_MediaOptLog.txt").c_str(), + std::fstream::out | std::fstream::app); return; } @@ -384,12 +386,16 @@ MediaOptTest::RTTest() _rttMS = 20; _renderDelayMs = 0; - _outname = "../RTMOTest_out.yuv"; // same out name for all - _actualSourcename = "../RTMOTestSource.yuv"; // actual source after frame dropping + // same out name for all + _outname = test::OutputPath() + "RTMOTest_out.yuv"; + // actual source after frame dropping + _actualSourcename = test::OutputPath() + "RTMOTestSource.yuv"; _codecName = "VP8"; // for now just this one - later iterate over all codec types - _log.open("../VCM_RTMediaOptLog.txt", std::fstream::out | std::fstream::app); - _outputRes=fopen("../VCM_MediaOpt","ab"); + _log.open((test::OutputPath() + "/VCM_RTMediaOptLog.txt").c_str(), + std::fstream::out | std::fstream::app); + _outputRes=fopen((test::OutputPath() + "VCM_MediaOptResults.txt").c_str(), + "ab"); //char filename[128]; /* test settings end*/ diff --git a/src/modules/video_coding/main/test/mt_rx_tx_test.cc b/src/modules/video_coding/main/test/mt_rx_tx_test.cc index 2989af265..c9e066f29 100644 --- a/src/modules/video_coding/main/test/mt_rx_tx_test.cc +++ b/src/modules/video_coding/main/test/mt_rx_tx_test.cc @@ -55,7 +55,8 @@ MainSenderThread(void* obj) } if (feof(state->_sourceFile) == 0) { - TEST(fread(tmpBuffer, 1, lengthSourceFrame,state->_sourceFile) > 0); + TEST(fread(tmpBuffer, 1, lengthSourceFrame,state->_sourceFile) > 0 || + feof(state->_sourceFile)); state->_frameCnt++; sourceFrame.CopyFrame(lengthSourceFrame, tmpBuffer); sourceFrame.SetHeight(height); @@ -96,7 +97,7 @@ int MTRxTxTest(CmdArgs& args) std::string inname = args.inputFile; std::string outname; if (args.outputFile == "") - outname = "../MTRxTxTest_decoded.yuv"; + outname = test::OutputPath() + "MTRxTxTest_decoded.yuv"; else outname = args.outputFile; @@ -120,7 +121,7 @@ int MTRxTxTest(CmdArgs& args) // Set up trace Trace::CreateTrace(); - Trace::SetTraceFile("MTRxTxTestTrace.txt"); + Trace::SetTraceFile((test::OutputPath() + "MTRxTxTestTrace.txt").c_str()); Trace::SetLevelFilter(webrtc::kTraceAll); FILE* sourceFile; @@ -161,6 +162,7 @@ int MTRxTxTest(CmdArgs& args) strncpy(videoCodec.plName, args.codecName.c_str(), 32); videoCodec.plType = VCM_VP8_PAYLOAD_TYPE; videoCodec.maxBitrate = 10000; + videoCodec.codecType = args.codecType; TEST(rtp->RegisterReceivePayload(videoCodec) == 0); TEST(rtp->RegisterSendPayload(videoCodec) == 0); diff --git a/src/modules/video_coding/main/test/normal_test.cc b/src/modules/video_coding/main/test/normal_test.cc index e1ebd7ab5..34644039b 100644 --- a/src/modules/video_coding/main/test/normal_test.cc +++ b/src/modules/video_coding/main/test/normal_test.cc @@ -35,7 +35,8 @@ int NormalTest::RunTest(CmdArgs& args) printf("REAL-TIME\n"); #endif Trace::CreateTrace(); - Trace::SetTraceFile("VCMNormalTestTrace.txt"); + Trace::SetTraceFile( + (test::OutputPath() + "VCMNormalTestTrace.txt").c_str()); Trace::SetLevelFilter(webrtc::kTraceAll); VideoCodingModule* vcm = VideoCodingModule::Create(1); NormalTest VCMNTest(vcm); @@ -205,7 +206,7 @@ void NormalTest::Setup(CmdArgs& args) { _inname = args.inputFile; - _encodedName = "encoded_normaltest.yuv"; + _encodedName = test::OutputPath() + "encoded_normaltest.yuv"; _width = args.width; _height = args.height; _frameRate = args.frameRate; @@ -213,7 +214,8 @@ NormalTest::Setup(CmdArgs& args) if (args.outputFile == "") { std::ostringstream filename; - filename << "../NormalTest_" << _width << "x" << _height << "_" << _frameRate << "Hz_P420.yuv"; + filename << test::OutputPath() << "NormalTest_" << + _width << "x" << _height << "_" << _frameRate << "Hz_P420.yuv"; _outname = filename.str(); } else @@ -234,7 +236,8 @@ NormalTest::Setup(CmdArgs& args) exit(1); } - _log.open("../TestLog.txt", std::fstream::out | std::fstream::app); + _log.open((test::OutputPath() + "TestLog.txt").c_str(), + std::fstream::out | std::fstream::app); return; } @@ -274,12 +277,13 @@ NormalTest::Perform(CmdArgs& args) sendStats.SetTargetFrameRate(static_cast(_frameRate)); _vcm->RegisterSendStatisticsCallback(&sendStats); - while (feof(_sourceFile)== 0) + while (feof(_sourceFile) == 0) { #if !(defined(TICK_TIME_DEBUG) || defined(EVENT_DEBUG)) WebRtc_Word64 processStartTime = VCMTickTime::MillisecondTimestamp(); #endif - TEST(fread(tmpBuffer, 1, _lengthSourceFrame, _sourceFile) > 0); + TEST(fread(tmpBuffer, 1, _lengthSourceFrame, _sourceFile) > 0 || + feof(_sourceFile)); _frameCnt++; sourceFrame.CopyFrame(_lengthSourceFrame, tmpBuffer); sourceFrame.SetHeight(_height); diff --git a/src/modules/video_coding/main/test/quality_modes_test.cc b/src/modules/video_coding/main/test/quality_modes_test.cc index fd5d7466e..629aca202 100644 --- a/src/modules/video_coding/main/test/quality_modes_test.cc +++ b/src/modules/video_coding/main/test/quality_modes_test.cc @@ -54,9 +54,9 @@ QualityModesTest::Setup() { - _inname= "../codecs/testFiles/database/crew_30f_4CIF.yuv"; - _outname = "../out_qmtest.yuv"; - _encodedName = "../encoded_qmtest.yuv"; + _inname= test::ProjectRootPath() + "resources/crew_30f_4CIF.yuv"; + _outname = test::OutputPath() + "out_qmtest.yuv"; + _encodedName = test::OutputPath() + "encoded_qmtest.yuv"; //NATIVE/SOURCE VALUES _nativeWidth = 2*352; @@ -91,7 +91,8 @@ QualityModesTest::Setup() exit(1); } - _log.open("../TestLog.txt", std::fstream::out | std::fstream::app); + _log.open((test::OutputPath() + "TestLog.txt").c_str(), + std::fstream::out | std::fstream::app); return; } diff --git a/src/modules/video_coding/main/test/receiver_timing_tests.cc b/src/modules/video_coding/main/test/receiver_timing_tests.cc index ddf11b2e3..b26e73f9f 100644 --- a/src/modules/video_coding/main/test/receiver_timing_tests.cc +++ b/src/modules/video_coding/main/test/receiver_timing_tests.cc @@ -56,7 +56,7 @@ int ReceiverTimingTests(CmdArgs& args) // Set up trace Trace::CreateTrace(); - Trace::SetTraceFile("receiverTestTrace.txt"); + Trace::SetTraceFile((test::OutputPath() + "receiverTestTrace.txt").c_str()); Trace::SetLevelFilter(webrtc::kTraceAll); // A static random seed diff --git a/src/modules/video_coding/main/test/test_callbacks.h b/src/modules/video_coding/main/test/test_callbacks.h index f65f3ae4d..637ab9679 100644 --- a/src/modules/video_coding/main/test/test_callbacks.h +++ b/src/modules/video_coding/main/test/test_callbacks.h @@ -80,7 +80,7 @@ private: VideoCodingModule* _VCMReceiver; FrameType _frameType; WebRtc_UWord8* _payloadData; - WebRtc_UWord8 _seqNo; + WebRtc_UWord16 _seqNo; bool _encodeComplete; WebRtc_Word32 _width; WebRtc_Word32 _height; diff --git a/src/modules/video_coding/main/test/test_util.h b/src/modules/video_coding/main/test/test_util.h index 84e35bfbc..817043676 100644 --- a/src/modules/video_coding/main/test/test_util.h +++ b/src/modules/video_coding/main/test/test_util.h @@ -15,22 +15,33 @@ * General declarations used through out VCM offline tests. */ -#include "module_common_types.h" - #include #include #include +#include "module_common_types.h" +#include "testsupport/fileutils.h" // Class used for passing command line arguments to tests class CmdArgs { -public: - CmdArgs() : codecName(""), codecType(webrtc::kVideoCodecVP8), width(-1), - height(-1), bitRate(-1), frameRate(-1), packetLoss(0), rtt(0), - protectionMode(0), camaEnable(0), inputFile(""), outputFile(""), - testNum(-1) - {} + public: + CmdArgs() + : codecName("VP8"), + codecType(webrtc::kVideoCodecVP8), + width(352), + height(288), + bitRate(500), + frameRate(30), + packetLoss(0), + rtt(0), + protectionMode(0), + camaEnable(0), + inputFile(webrtc::test::ProjectRootPath() + + "/resources/foreman_cif.yuv"), + outputFile(webrtc::test::OutputPath() + + "video_coding_test_output_352x288.yuv"), + testNum(11) {} std::string codecName; webrtc::VideoCodecType codecType; int width; diff --git a/src/modules/video_coding/main/test/tester_main.cc b/src/modules/video_coding/main/test/tester_main.cc index a76e47041..7e326eb85 100644 --- a/src/modules/video_coding/main/test/tester_main.cc +++ b/src/modules/video_coding/main/test/tester_main.cc @@ -196,6 +196,11 @@ int main(int argc, char **argv) case 10: ret = DecodeFromStorageTest(args); break; + case 11: + ret = NormalTest::RunTest(args); + ret |= CodecDataBaseTest::RunTest(args); + ret |= ReceiverTimingTests(args); + ret |= JitterBufferTest(args); default: ret = -1; break; diff --git a/src/modules/video_coding/main/test/video_rtp_play.cc b/src/modules/video_coding/main/test/video_rtp_play.cc index c2134fbd5..4fedc1907 100644 --- a/src/modules/video_coding/main/test/video_rtp_play.cc +++ b/src/modules/video_coding/main/test/video_rtp_play.cc @@ -48,7 +48,8 @@ FrameReceiveCallback::FrameToRender(VideoFrame& videoFrame) { if (_timingFile == NULL) { - _timingFile = fopen("renderTiming.txt", "w"); + _timingFile = fopen((test::OutputPath() + "renderTiming.txt").c_str(), + "w"); if (_timingFile == NULL) { return -1; @@ -87,7 +88,7 @@ int RtpPlay(CmdArgs& args) const WebRtc_Word64 MAX_RUNTIME_MS = -1; std::string outFile = args.outputFile; if (outFile == "") - outFile = "RtpPlay_decoded.yuv"; + outFile = test::OutputPath() + "RtpPlay_decoded.yuv"; FrameReceiveCallback receiveCallback(outFile); VideoCodingModule* vcm = VideoCodingModule::Create(1); RtpDataCallback dataCallback(vcm); @@ -98,7 +99,7 @@ int RtpPlay(CmdArgs& args) payloadTypes.PushFront(new PayloadCodecTuple(VCM_VP8_PAYLOAD_TYPE, "VP8", kVideoCodecVP8)); Trace::CreateTrace(); - Trace::SetTraceFile("receiverTestTrace.txt"); + Trace::SetTraceFile((test::OutputPath() + "receiverTestTrace.txt").c_str()); Trace::SetLevelFilter(webrtc::kTraceAll); // END Settings diff --git a/src/modules/video_coding/main/test/video_rtp_play_mt.cc b/src/modules/video_coding/main/test/video_rtp_play_mt.cc index 45800e6a8..60a33619b 100644 --- a/src/modules/video_coding/main/test/video_rtp_play_mt.cc +++ b/src/modules/video_coding/main/test/video_rtp_play_mt.cc @@ -76,7 +76,7 @@ int RtpPlayMT(CmdArgs& args, int releaseTestNo, webrtc::VideoCodecType releaseTe const WebRtc_Word64 MAX_RUNTIME_MS = 10000; std::string outFilename = args.outputFile; if (outFilename == "") - outFilename = "RtpPlayMT_decoded.yuv"; + outFilename = test::OutputPath() + "RtpPlayMT_decoded.yuv"; bool nackEnabled = (protectionEnabled && (protection == kProtectionDualDecoder || @@ -94,7 +94,7 @@ int RtpPlayMT(CmdArgs& args, int releaseTestNo, webrtc::VideoCodecType releaseTe { case webrtc::kVideoCodecVP8: rtpFilename = args.inputFile; - outFilename = "MTReceiveTest_VP8"; + outFilename = test::OutputPath() + "MTReceiveTest_VP8"; break; default: return -1; diff --git a/src/modules/video_coding/main/test/video_source.cc b/src/modules/video_coding/main/test/video_source.cc index b80ff0ce5..b12295171 100644 --- a/src/modules/video_coding/main/test/video_source.cc +++ b/src/modules/video_coding/main/test/video_source.cc @@ -8,13 +8,16 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "vplib.h" #include "video_source.h" + #include +#include "testsupport/fileutils.h" +#include "vplib.h" + VideoSource::VideoSource() : -_fileName("../../../../../codecs_video/testFiles/foreman.yuv"), +_fileName(webrtc::test::ProjectRootPath() + "resources/foreman_cif.yuv"), _width(352), _height(288), _type(webrtc::kI420),