From 91c91df35acc6ebb73f6d23bb4d3c10302dbb8a1 Mon Sep 17 00:00:00 2001 From: "stefan@webrtc.org" Date: Thu, 13 Dec 2012 15:26:01 +0000 Subject: [PATCH] Track the actual render time rather than the decode time. Review URL: https://webrtc-codereview.appspot.com/993004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@3282 4adac7df-926f-26a2-2b94-8c16560cd09d --- .../interface/vie_autotest_defines.h | 2 +- .../auto_test/primitives/base_primitives.cc | 2 +- .../primitives/framedrop_primitives.cc | 51 ++++++++++++------- .../primitives/framedrop_primitives.h | 3 +- .../auto_test/source/vie_autotest_codec.cc | 16 +++--- .../source/vie_autotest_encryption.cc | 24 ++++----- .../source/vie_autotest_image_process.cc | 10 ++-- .../auto_test/source/vie_autotest_network.cc | 6 +-- .../auto_test/source/vie_autotest_render.cc | 30 +++++------ .../auto_test/source/vie_autotest_rtp_rtcp.cc | 10 ++-- 10 files changed, 85 insertions(+), 69 deletions(-) diff --git a/webrtc/video_engine/test/auto_test/interface/vie_autotest_defines.h b/webrtc/video_engine/test/auto_test/interface/vie_autotest_defines.h index ca4347b2c8..36eb4e983e 100644 --- a/webrtc/video_engine/test/auto_test/interface/vie_autotest_defines.h +++ b/webrtc/video_engine/test/auto_test/interface/vie_autotest_defines.h @@ -48,7 +48,7 @@ #define RGB(r,g,b) r|g<<8|b<<16 enum { - KAutoTestSleepTimeMs = 5000 + kAutoTestSleepTimeMs = 5000 }; struct AutoTestSize { diff --git a/webrtc/video_engine/test/auto_test/primitives/base_primitives.cc b/webrtc/video_engine/test/auto_test/primitives/base_primitives.cc index 317a850fc7..4b46450307 100644 --- a/webrtc/video_engine/test/auto_test/primitives/base_primitives.cc +++ b/webrtc/video_engine/test/auto_test/primitives/base_primitives.cc @@ -59,7 +59,7 @@ void TestI420CallSetup(webrtc::ViECodec* codec_interface, // Let the call run for a while. ViETest::Log("Call started"); - AutoTestSleep(KAutoTestSleepTimeMs); + AutoTestSleep(kAutoTestSleepTimeMs); // Stop the call. ViETest::Log("Stopping call."); diff --git a/webrtc/video_engine/test/auto_test/primitives/framedrop_primitives.cc b/webrtc/video_engine/test/auto_test/primitives/framedrop_primitives.cc index 3292fe1344..6be1bf6972 100644 --- a/webrtc/video_engine/test/auto_test/primitives/framedrop_primitives.cc +++ b/webrtc/video_engine/test/auto_test/primitives/framedrop_primitives.cc @@ -42,8 +42,10 @@ class LocalRendererEffectFilter : public webrtc::ExternalRendererEffectFilter { int Transform(int size, unsigned char* frameBuffer, unsigned int timeStamp90KHz, unsigned int width, unsigned int height) { - frame_drop_detector_->ReportFrameState(FrameDropDetector::kCreated, - timeStamp90KHz); + frame_drop_detector_->ReportFrameState( + FrameDropDetector::kCreated, + timeStamp90KHz, + webrtc::TickTime::MicrosecondTimestamp()); return webrtc::ExternalRendererEffectFilter::Transform( size, frameBuffer, timeStamp90KHz, width, height); } @@ -59,8 +61,10 @@ class FrameSentCallback : public SendFrameCallback { : frame_drop_detector_(frame_drop_detector) {} virtual ~FrameSentCallback() {} virtual void FrameSent(unsigned int rtp_timestamp) { - frame_drop_detector_->ReportFrameState(FrameDropDetector::kSent, - rtp_timestamp); + frame_drop_detector_->ReportFrameState( + FrameDropDetector::kSent, + rtp_timestamp, + webrtc::TickTime::MicrosecondTimestamp()); } private: @@ -75,8 +79,10 @@ class FrameReceivedCallback : public ReceiveFrameCallback { : frame_drop_detector_(frame_drop_detector) {} virtual ~FrameReceivedCallback() {} virtual void FrameReceived(unsigned int rtp_timestamp) { - frame_drop_detector_->ReportFrameState(FrameDropDetector::kReceived, - rtp_timestamp); + frame_drop_detector_->ReportFrameState( + FrameDropDetector::kReceived, + rtp_timestamp, + webrtc::TickTime::MicrosecondTimestamp()); } private: @@ -93,8 +99,10 @@ class DecodedTimestampEffectFilter : public webrtc::ViEEffectFilter { virtual int Transform(int size, unsigned char* frameBuffer, unsigned int timeStamp90KHz, unsigned int width, unsigned int height) { - frame_drop_detector_->ReportFrameState(FrameDropDetector::kDecoded, - timeStamp90KHz); + frame_drop_detector_->ReportFrameState( + FrameDropDetector::kDecoded, + timeStamp90KHz, + webrtc::TickTime::MicrosecondTimestamp()); return 0; } @@ -209,7 +217,7 @@ void TestFullStack(const TbInterfaces& interfaces, decode_filter)); // Send video. EXPECT_EQ(0, base_interface->StartSend(video_channel)); - AutoTestSleep(KAutoTestSleepTimeMs); + AutoTestSleep(kAutoTestSleepTimeMs); ViETest::Log("Done!"); @@ -289,21 +297,21 @@ void FixOutputFileForComparison(const std::string& output_file, ASSERT_EQ(0, std::rename(temp_file.c_str(), output_file.c_str())); } -void FrameDropDetector::ReportFrameState(State state, unsigned int timestamp) { +void FrameDropDetector::ReportFrameState(State state, unsigned int timestamp, + int64_t report_time_us) { dirty_ = true; switch (state) { case kCreated: { int number = created_frames_vector_.size(); Frame* frame = new Frame(number, timestamp); - frame->created_timestamp_in_us_ = - webrtc::TickTime::MicrosecondTimestamp(); + frame->created_timestamp_in_us_ = report_time_us; created_frames_vector_.push_back(frame); created_frames_[timestamp] = frame; num_created_frames_++; break; } case kSent: - sent_frames_[timestamp] = webrtc::TickTime::MicrosecondTimestamp(); + sent_frames_[timestamp] = report_time_us; if (timestamp_diff_ == 0) { // When the first created frame arrives we calculate the fixed // difference between the timestamps of the frames entering and leaving @@ -315,15 +323,15 @@ void FrameDropDetector::ReportFrameState(State state, unsigned int timestamp) { num_sent_frames_++; break; case kReceived: - received_frames_[timestamp] = webrtc::TickTime::MicrosecondTimestamp(); + received_frames_[timestamp] = report_time_us; num_received_frames_++; break; case kDecoded: - decoded_frames_[timestamp] = webrtc::TickTime::MicrosecondTimestamp(); + decoded_frames_[timestamp] = report_time_us; num_decoded_frames_++; break; case kRendered: - rendered_frames_[timestamp] = webrtc::TickTime::MicrosecondTimestamp(); + rendered_frames_[timestamp] = report_time_us; num_rendered_frames_++; break; } @@ -579,9 +587,16 @@ int FrameDropDetector::GetNumberOfFramesDroppedAt(State state) { int FrameDropMonitoringRemoteFileRenderer::DeliverFrame( unsigned char *buffer, int buffer_size, uint32_t time_stamp, int64_t render_time) { - // Register that this frame has been rendered: + // |render_time| provides the ideal render time for this frame. If that time + // has already passed we will render it immediately. + int64_t report_render_time_us = render_time * 1000; + int64_t time_now_us = webrtc::TickTime::MicrosecondTimestamp(); + if (render_time < (time_now_us + 500) / 1000) { + report_render_time_us = time_now_us; + } + // Register that this frame has been rendered. frame_drop_detector_->ReportFrameState(FrameDropDetector::kRendered, - time_stamp); + time_stamp, report_render_time_us); return ViEToFileRenderer::DeliverFrame(buffer, buffer_size, time_stamp, render_time); } diff --git a/webrtc/video_engine/test/auto_test/primitives/framedrop_primitives.h b/webrtc/video_engine/test/auto_test/primitives/framedrop_primitives.h index 8815c8cd87..faa8625e23 100644 --- a/webrtc/video_engine/test/auto_test/primitives/framedrop_primitives.h +++ b/webrtc/video_engine/test/auto_test/primitives/framedrop_primitives.h @@ -148,7 +148,8 @@ class FrameDropDetector { timestamp_diff_(0) {} // Reports a frame has reached a state in the frame life cycle. - void ReportFrameState(State state, unsigned int timestamp); + void ReportFrameState(State state, unsigned int timestamp, + int64_t report_time_us); // Uses all the gathered timestamp information to calculate which frames have // been dropped during the test and where they were dropped. Not until diff --git a/webrtc/video_engine/test/auto_test/source/vie_autotest_codec.cc b/webrtc/video_engine/test/auto_test/source/vie_autotest_codec.cc index 972225c265..bdf577dad8 100644 --- a/webrtc/video_engine/test/auto_test/source/vie_autotest_codec.cc +++ b/webrtc/video_engine/test/auto_test/source/vie_autotest_codec.cc @@ -180,7 +180,7 @@ void ViEAutoTest::ViECodecStandardTest() { TestCodecObserver codec_observer; EXPECT_EQ(0, codec->RegisterDecoderObserver(video_channel, codec_observer)); ViETest::Log("Loop through all codecs for %d seconds", - KAutoTestSleepTimeMs / 1000); + kAutoTestSleepTimeMs / 1000); for (int i = 0; i < codec->NumberOfCodecs() - 2; i++) { EXPECT_EQ(0, codec->GetCodec(i, video_codec)); @@ -196,7 +196,7 @@ void ViEAutoTest::ViECodecStandardTest() { RenderFilter frame_counter; EXPECT_EQ(0, image_process->RegisterRenderEffectFilter(video_channel, frame_counter)); - AutoTestSleep(KAutoTestSleepTimeMs); + AutoTestSleep(kAutoTestSleepTimeMs); // Verify we've received and decoded correct payload. EXPECT_EQ(video_codec.codecType, @@ -229,7 +229,7 @@ void ViEAutoTest::ViECodecStandardTest() { break; } } - AutoTestSleep(KAutoTestSleepTimeMs); + AutoTestSleep(kAutoTestSleepTimeMs); EXPECT_EQ(0, base->StopSend(video_channel)); EXPECT_EQ(0, codec->DeregisterEncoderObserver(video_channel)); @@ -403,7 +403,7 @@ void ViEAutoTest::ViECodecExtendedTest() { EXPECT_EQ(0, video_engine.base->StartReceive(video_channel_2)); EXPECT_EQ(0, video_engine.base->StartSend(video_channel_2)); - AutoTestSleep(KAutoTestSleepTimeMs); + AutoTestSleep(kAutoTestSleepTimeMs); EXPECT_EQ(0, video_engine.base->StopReceive(video_channel_1)); EXPECT_EQ(0, video_engine.base->StopSend(video_channel_1)); @@ -518,7 +518,7 @@ void ViEAutoTest::ViECodecExternalCodecTest() { channel.StartSend(); ViETest::Log("Using internal I420 codec"); - AutoTestSleep(KAutoTestSleepTimeMs / 2); + AutoTestSleep(kAutoTestSleepTimeMs / 2); webrtc::ViEExternalCodec* vie_external_codec = webrtc::ViEExternalCodec::GetInterface(ViE.video_engine); @@ -566,7 +566,7 @@ void ViEAutoTest::ViECodecExternalCodecTest() { __FUNCTION__, __LINE__); ViETest::Log("Using external I420 codec"); - AutoTestSleep(KAutoTestSleepTimeMs); + AutoTestSleep(kAutoTestSleepTimeMs); // Test to deregister on wrong channel error = vie_external_codec->DeRegisterExternalSendCodec( @@ -658,7 +658,7 @@ void ViEAutoTest::ViECodecExternalCodecTest() { number_of_errors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); - AutoTestSleep(KAutoTestSleepTimeMs / 2); + AutoTestSleep(kAutoTestSleepTimeMs / 2); /// ************************************************************** // Testing finished. Tear down Video Engine @@ -714,7 +714,7 @@ void ViEAutoTest::ViECodecExternalCodecTest() { } // tbI420Encoder and ext_decoder goes out of scope. ViETest::Log("Using internal I420 codec"); - AutoTestSleep(KAutoTestSleepTimeMs / 2); + AutoTestSleep(kAutoTestSleepTimeMs / 2); } if (number_of_errors > 0) { // Test failed diff --git a/webrtc/video_engine/test/auto_test/source/vie_autotest_encryption.cc b/webrtc/video_engine/test/auto_test/source/vie_autotest_encryption.cc index 1d7a8353ec..65432f35d4 100644 --- a/webrtc/video_engine/test/auto_test/source/vie_autotest_encryption.cc +++ b/webrtc/video_engine/test/auto_test/source/vie_autotest_encryption.cc @@ -123,7 +123,7 @@ void ViEAutoTest::ViEEncryptionStandardTest() tbChannel.videoChannel, webrtc::kCipherAes128CounterMode, 30, webrtc::kAuthNull, 0, 0, webrtc::kEncryption, srtpKey1)); ViETest::Log("SRTP encryption only"); - AutoTestSleep(KAutoTestSleepTimeMs); + AutoTestSleep(kAutoTestSleepTimeMs); EXPECT_EQ(0, ViE.encryption->DisableSRTPReceive(tbChannel.videoChannel)); EXPECT_EQ(0, ViE.encryption->DisableSRTPSend(tbChannel.videoChannel)); @@ -136,7 +136,7 @@ void ViEAutoTest::ViEEncryptionStandardTest() 20, 4, webrtc::kAuthentication, srtpKey1)); ViETest::Log("SRTP authentication only"); - AutoTestSleep(KAutoTestSleepTimeMs); + AutoTestSleep(kAutoTestSleepTimeMs); EXPECT_EQ(0, ViE.encryption->DisableSRTPReceive(tbChannel.videoChannel)); EXPECT_EQ(0, ViE.encryption->DisableSRTPSend(tbChannel.videoChannel)); @@ -151,7 +151,7 @@ void ViEAutoTest::ViEEncryptionStandardTest() srtpKey1)); ViETest::Log("SRTP full protection"); - AutoTestSleep(KAutoTestSleepTimeMs); + AutoTestSleep(kAutoTestSleepTimeMs); EXPECT_EQ(0, ViE.encryption->DisableSRTPReceive(tbChannel.videoChannel)); EXPECT_EQ(0, ViE.encryption->DisableSRTPSend(tbChannel.videoChannel)); #endif // WEBRTC_SRTP @@ -166,7 +166,7 @@ void ViEAutoTest::ViEEncryptionStandardTest() tbChannel.videoChannel, testEncryption)); ViETest::Log( "External encryption/decryption added, you should still see video"); - AutoTestSleep(KAutoTestSleepTimeMs); + AutoTestSleep(kAutoTestSleepTimeMs); EXPECT_EQ(0, ViE.encryption->DeregisterExternalEncryption( tbChannel.videoChannel)); @@ -219,7 +219,7 @@ void ViEAutoTest::ViEEncryptionExtendedTest() webrtc::kNoProtection, srtpKey1)); ViETest::Log("SRTP NULL encryption/authentication"); - AutoTestSleep(KAutoTestSleepTimeMs); + AutoTestSleep(kAutoTestSleepTimeMs); EXPECT_EQ(0, ViE.encryption->DisableSRTPReceive(tbChannel.videoChannel)); EXPECT_EQ(0, ViE.encryption->DisableSRTPSend(tbChannel.videoChannel)); @@ -232,7 +232,7 @@ void ViEAutoTest::ViEEncryptionExtendedTest() webrtc::kAuthNull, 0, 0, webrtc::kEncryption, srtpKey1)); ViETest::Log("SRTP encryption only"); - AutoTestSleep(KAutoTestSleepTimeMs); + AutoTestSleep(kAutoTestSleepTimeMs); EXPECT_EQ(0, ViE.encryption->DisableSRTPReceive(tbChannel.videoChannel)); EXPECT_EQ(0, ViE.encryption->DisableSRTPSend(tbChannel.videoChannel)); @@ -245,7 +245,7 @@ void ViEAutoTest::ViEEncryptionExtendedTest() 20, 4, webrtc::kAuthentication, srtpKey1)); ViETest::Log("SRTP authentication only"); - AutoTestSleep(KAutoTestSleepTimeMs); + AutoTestSleep(kAutoTestSleepTimeMs); EXPECT_EQ(0, ViE.encryption->DisableSRTPReceive(tbChannel.videoChannel)); EXPECT_EQ(0, ViE.encryption->DisableSRTPSend(tbChannel.videoChannel)); @@ -260,7 +260,7 @@ void ViEAutoTest::ViEEncryptionExtendedTest() srtpKey1)); ViETest::Log("SRTP full protection"); - AutoTestSleep(KAutoTestSleepTimeMs); + AutoTestSleep(kAutoTestSleepTimeMs); EXPECT_EQ(0, ViE.encryption->DisableSRTPReceive(tbChannel.videoChannel)); EXPECT_EQ(0, ViE.encryption->DisableSRTPSend(tbChannel.videoChannel)); @@ -277,7 +277,7 @@ void ViEAutoTest::ViEEncryptionExtendedTest() ViETest::Log( "\nSRTP receive key changed, you should not see any remote images"); - AutoTestSleep(KAutoTestSleepTimeMs); + AutoTestSleep(kAutoTestSleepTimeMs); // Change send key too EXPECT_EQ(0, ViE.encryption->DisableSRTPSend(tbChannel.videoChannel)); @@ -288,12 +288,12 @@ void ViEAutoTest::ViEEncryptionExtendedTest() ViETest::Log("\nSRTP send key changed too, you should see remote video " "again with some decoding artefacts at start"); - AutoTestSleep(KAutoTestSleepTimeMs); + AutoTestSleep(kAutoTestSleepTimeMs); EXPECT_EQ(0, ViE.encryption->DisableSRTPReceive(tbChannel.videoChannel)); // Disable receive, keep send ViETest::Log("SRTP receive disabled , you shouldn't see any video"); - AutoTestSleep(KAutoTestSleepTimeMs); + AutoTestSleep(kAutoTestSleepTimeMs); EXPECT_EQ(0, ViE.encryption->DisableSRTPSend(tbChannel.videoChannel)); #endif //WEBRTC_SRTP @@ -305,7 +305,7 @@ void ViEAutoTest::ViEEncryptionExtendedTest() tbChannel.videoChannel, testEncryption)); ViETest::Log( "External encryption/decryption added, you should still see video"); - AutoTestSleep(KAutoTestSleepTimeMs); + AutoTestSleep(kAutoTestSleepTimeMs); EXPECT_EQ(0, ViE.encryption->DeregisterExternalEncryption( tbChannel.videoChannel)); diff --git a/webrtc/video_engine/test/auto_test/source/vie_autotest_image_process.cc b/webrtc/video_engine/test/auto_test/source/vie_autotest_image_process.cc index c29d97d670..bace5203cb 100644 --- a/webrtc/video_engine/test/auto_test/source/vie_autotest_image_process.cc +++ b/webrtc/video_engine/test/auto_test/source/vie_autotest_image_process.cc @@ -61,7 +61,7 @@ void ViEAutoTest::ViEImageProcessStandardTest() ViETest::Log("Capture device is renderered in Window 1"); ViETest::Log("Remote stream is renderered in Window 2"); - AutoTestSleep(KAutoTestSleepTimeMs); + AutoTestSleep(kAutoTestSleepTimeMs); //*************************************************************** // Engine ready. Begin testing class @@ -73,7 +73,7 @@ void ViEAutoTest::ViEImageProcessStandardTest() ViETest::Log("Black and white filter registered for capture device, " "affects both windows"); - AutoTestSleep(KAutoTestSleepTimeMs); + AutoTestSleep(kAutoTestSleepTimeMs); EXPECT_EQ(0, ViE.image_process->DeregisterCaptureEffectFilter( tbCapture.captureId)); @@ -84,7 +84,7 @@ void ViEAutoTest::ViEImageProcessStandardTest() ViETest::Log("Remove capture effect filter, adding filter for incoming " "stream"); ViETest::Log("Only Window 2 should be black and white"); - AutoTestSleep(KAutoTestSleepTimeMs); + AutoTestSleep(kAutoTestSleepTimeMs); EXPECT_EQ(0, ViE.render->StopRender(tbCapture.captureId)); EXPECT_EQ(0, ViE.render->RemoveRenderer(tbCapture.captureId)); @@ -111,7 +111,7 @@ void ViEAutoTest::ViEImageProcessStandardTest() ViETest::Log("Black and white filter registered for capture device, " "affects both windows"); - AutoTestSleep(KAutoTestSleepTimeMs); + AutoTestSleep(kAutoTestSleepTimeMs); EXPECT_EQ(0, ViE.image_process->DeregisterCaptureEffectFilter( tbCapture.captureId)); @@ -122,7 +122,7 @@ void ViEAutoTest::ViEImageProcessStandardTest() ViETest::Log("Capture filter removed."); ViETest::Log("Black and white filter registered for one channel, Window2 " "should be black and white"); - AutoTestSleep(KAutoTestSleepTimeMs); + AutoTestSleep(kAutoTestSleepTimeMs); EXPECT_EQ(0, ViE.image_process->DeregisterSendEffectFilter( tbChannel.videoChannel)); diff --git a/webrtc/video_engine/test/auto_test/source/vie_autotest_network.cc b/webrtc/video_engine/test/auto_test/source/vie_autotest_network.cc index b7c95c1ead..3ecb67f1c1 100644 --- a/webrtc/video_engine/test/auto_test/source/vie_autotest_network.cc +++ b/webrtc/video_engine/test/auto_test/source/vie_autotest_network.cc @@ -72,7 +72,7 @@ void ViEAutoTest::ViENetworkStandardTest() ViETest::Log("Call started using external transport, video should " "see video in both windows\n"); - AutoTestSleep(KAutoTestSleepTimeMs); + AutoTestSleep(kAutoTestSleepTimeMs); EXPECT_EQ(0, ViE.base->StopReceive(tbChannel.videoChannel)); EXPECT_EQ(0, ViE.base->StopSend(tbChannel.videoChannel)); @@ -93,7 +93,7 @@ void ViEAutoTest::ViENetworkStandardTest() ViETest::Log("Changed to WebRTC SocketTransport, you should still see " "video in both windows\n"); - AutoTestSleep(KAutoTestSleepTimeMs); + AutoTestSleep(kAutoTestSleepTimeMs); EXPECT_EQ(0, ViE.network->SetSourceFilter( tbChannel.videoChannel, rtpPort + 10, rtpPort + 11, myIpAddress)); @@ -109,7 +109,7 @@ void ViEAutoTest::ViENetworkStandardTest() tbChannel.videoChannel, rtpPort, rtpPort + 1, myIpAddress)); ViETest::Log("Added IP filter for this computer, you should see video " "in Window2 again\n"); - AutoTestSleep(KAutoTestSleepTimeMs); + AutoTestSleep(kAutoTestSleepTimeMs); tbCapture.Disconnect(tbChannel.videoChannel); } diff --git a/webrtc/video_engine/test/auto_test/source/vie_autotest_render.cc b/webrtc/video_engine/test/auto_test/source/vie_autotest_render.cc index 0870ca1f5c..619cf6e067 100644 --- a/webrtc/video_engine/test/auto_test/source/vie_autotest_render.cc +++ b/webrtc/video_engine/test/auto_test/source/vie_autotest_render.cc @@ -102,7 +102,7 @@ void ViEAutoTest::ViERenderStandardTest() ViETest::Log("\nCapture device is renderered in Window 1"); ViETest::Log("Remote stream is renderered in Window 2"); - AutoTestSleep(KAutoTestSleepTimeMs); + AutoTestSleep(kAutoTestSleepTimeMs); EXPECT_EQ(0, ViE.render->StopRender(tbCapture.captureId)); EXPECT_EQ(0, ViE.render->RemoveRenderer(tbCapture.captureId)); @@ -116,8 +116,8 @@ void ViEAutoTest::ViERenderStandardTest() ViETest::Log("\nCapture device is now rendered in Window 2, PiP."); ViETest::Log("Switching to full screen rendering in %d seconds.\n", - KAutoTestSleepTimeMs / 1000); - AutoTestSleep(KAutoTestSleepTimeMs); + kAutoTestSleepTimeMs / 1000); + AutoTestSleep(kAutoTestSleepTimeMs); EXPECT_EQ(0, ViE.render->RemoveRenderer(tbCapture.captureId)); EXPECT_EQ(0, ViE.render->RemoveRenderer(tbChannel.videoChannel)); @@ -138,7 +138,7 @@ void ViEAutoTest::ViERenderStandardTest() tbChannel.videoChannel, _window1, 1, 0.0, 0.0, 1.0, 1.0)); EXPECT_EQ(0, ViE.render->StartRender(tbChannel.videoChannel)); - AutoTestSleep(KAutoTestSleepTimeMs); + AutoTestSleep(kAutoTestSleepTimeMs); EXPECT_EQ(0, ViE.render->RemoveRenderer(tbCapture.captureId)); @@ -188,48 +188,48 @@ void ViEAutoTest::ViERenderExtendedTest() ViETest::Log("\nCapture device is renderered in Window 1"); ViETest::Log("Remote stream is renderered in Window 2"); - AutoTestSleep(KAutoTestSleepTimeMs); + AutoTestSleep(kAutoTestSleepTimeMs); #ifdef _WIN32 ViETest::Log("\nConfiguring Window2"); ViETest::Log("you will see video only in first quadrant"); EXPECT_EQ(0, ViE.render->ConfigureRender( tbChannel.videoChannel, 0, 0.0f, 0.0f, 0.5f, 0.5f)); - AutoTestSleep(KAutoTestSleepTimeMs); + AutoTestSleep(kAutoTestSleepTimeMs); ViETest::Log("you will see video only in fourth quadrant"); EXPECT_EQ(0, ViE.render->ConfigureRender( tbChannel.videoChannel, 0, 0.5f, 0.5f, 1.0f, 1.0f)); - AutoTestSleep(KAutoTestSleepTimeMs); + AutoTestSleep(kAutoTestSleepTimeMs); ViETest::Log("normal video on Window2"); EXPECT_EQ(0, ViE.render->ConfigureRender( tbChannel.videoChannel, 0, 0.0f, 0.0f, 1.0f, 1.0f)); - AutoTestSleep(KAutoTestSleepTimeMs); + AutoTestSleep(kAutoTestSleepTimeMs); #endif ViETest::Log("Mirroring Local Preview (Window1) Left-Right"); EXPECT_EQ(0, ViE.render->MirrorRenderStream( tbCapture.captureId, true, false, true)); - AutoTestSleep(KAutoTestSleepTimeMs); + AutoTestSleep(kAutoTestSleepTimeMs); ViETest::Log("\nMirroring Local Preview (Window1) Left-Right and Up-Down"); EXPECT_EQ(0, ViE.render->MirrorRenderStream( tbCapture.captureId, true, true, true)); - AutoTestSleep(KAutoTestSleepTimeMs); + AutoTestSleep(kAutoTestSleepTimeMs); ViETest::Log("\nMirroring Remote Window(Window2) Up-Down"); EXPECT_EQ(0, ViE.render->MirrorRenderStream( tbChannel.videoChannel, true, true, false)); - AutoTestSleep(KAutoTestSleepTimeMs); + AutoTestSleep(kAutoTestSleepTimeMs); ViETest::Log("Disabling Mirroing on Window1 and Window2"); EXPECT_EQ(0, ViE.render->MirrorRenderStream( tbCapture.captureId, false, false, false)); - AutoTestSleep(KAutoTestSleepTimeMs); + AutoTestSleep(kAutoTestSleepTimeMs); EXPECT_EQ(0, ViE.render->MirrorRenderStream( tbChannel.videoChannel, false, false, false)); - AutoTestSleep(KAutoTestSleepTimeMs); + AutoTestSleep(kAutoTestSleepTimeMs); ViETest::Log("\nEnabling Full Screen render in 5 sec"); @@ -249,7 +249,7 @@ void ViEAutoTest::ViERenderExtendedTest() EXPECT_EQ(0, ViE.render->AddRenderer( tbCapture.captureId, _window1, 0, 0.0f, 0.0f, 1.0f, 1.0f)); EXPECT_EQ(0, ViE.render->StartRender(tbCapture.captureId)); - AutoTestSleep(KAutoTestSleepTimeMs); + AutoTestSleep(kAutoTestSleepTimeMs); ViETest::Log("\nStop renderer"); EXPECT_EQ(0, ViE.render->StopRender(tbCapture.captureId)); @@ -272,7 +272,7 @@ void ViEAutoTest::ViERenderExtendedTest() EXPECT_EQ(0, ViE.render->AddRenderer( tbCapture.captureId, webrtc::kVideoI420, &externalRenderObj)); EXPECT_EQ(0, ViE.render->StartRender(tbCapture.captureId)); - AutoTestSleep(KAutoTestSleepTimeMs); + AutoTestSleep(kAutoTestSleepTimeMs); EXPECT_EQ(0, ViE.render->StopRender(tbCapture.captureId)); EXPECT_EQ(0, ViE.render->RemoveRenderer(tbCapture.captureId)); diff --git a/webrtc/video_engine/test/auto_test/source/vie_autotest_rtp_rtcp.cc b/webrtc/video_engine/test/auto_test/source/vie_autotest_rtp_rtcp.cc index 29e1e4be7a..085ce5fd4e 100644 --- a/webrtc/video_engine/test/auto_test/source/vie_autotest_rtp_rtcp.cc +++ b/webrtc/video_engine/test/auto_test/source/vie_autotest_rtp_rtcp.cc @@ -175,7 +175,7 @@ void ViEAutoTest::ViERtpRtcpStandardTest() EXPECT_EQ(0, ViE.base->StartSend(tbChannel.videoChannel)); EXPECT_EQ(0, ViE.base->StartReceive(tbChannel.videoChannel)); - AutoTestSleep(KAutoTestSleepTimeMs); + AutoTestSleep(kAutoTestSleepTimeMs); unsigned short sentFractionsLost = 0; unsigned int sentCumulativeLost = 0; @@ -252,7 +252,7 @@ void ViEAutoTest::ViERtpRtcpStandardTest() EXPECT_EQ(0, ViE.base->StartReceive(tbChannel.videoChannel)); EXPECT_EQ(0, ViE.base->StartSend(tbChannel.videoChannel)); - AutoTestSleep(KAutoTestSleepTimeMs); + AutoTestSleep(kAutoTestSleepTimeMs); EXPECT_EQ(0, ViE.rtp_rtcp->GetBandwidthUsage( tbChannel.videoChannel, sentTotalBitrate, sentVideoBitrate, @@ -270,7 +270,7 @@ void ViEAutoTest::ViERtpRtcpStandardTest() EXPECT_EQ(0, ViE.rtp_rtcp->SetNACKStatus(tbChannel.videoChannel, true)); EXPECT_EQ(0, ViE.base->StartSend(tbChannel.videoChannel)); - AutoTestSleep(KAutoTestSleepTimeMs); + AutoTestSleep(kAutoTestSleepTimeMs); EXPECT_EQ(0, ViE.rtp_rtcp->GetBandwidthUsage( tbChannel.videoChannel, sentTotalBitrate, sentVideoBitrate, @@ -334,7 +334,7 @@ void ViEAutoTest::ViERtpRtcpStandardTest() EXPECT_EQ(0, ViE.base->StartSend(tbChannel.videoChannel)); - AutoTestSleep(KAutoTestSleepTimeMs); + AutoTestSleep(kAutoTestSleepTimeMs); EXPECT_EQ(0, ViE.base->StopSend(tbChannel.videoChannel)); @@ -416,7 +416,7 @@ void ViEAutoTest::ViERtpRtcpExtendedTest() tbChannel.videoChannel, subType, name, data, numBytes)); ViETest::Log("Sending RTCP application data...\n"); - AutoTestSleep(KAutoTestSleepTimeMs); + AutoTestSleep(kAutoTestSleepTimeMs); EXPECT_EQ(subType, rtcpObserver._subType); EXPECT_STRCASEEQ(data, rtcpObserver._data);