From 2585979b1bd37187f9094e07c8a350101d97f94e Mon Sep 17 00:00:00 2001 From: Artem Titov Date: Thu, 28 Feb 2019 00:32:31 +0000 Subject: [PATCH] Revert "Improve example video analyzer for use in debugging" This reverts commit 1570218ec9fc5d00642a5cf0c1cd8a16260a19a6. Reason for revert: Speculative revert on tree closing Original change's description: > Improve example video analyzer for use in debugging > > Bug: webrtc:10138 > Change-Id: I40e81179ae6bec83efc57a5723450690c21c3481 > Reviewed-on: https://webrtc-review.googlesource.com/c/124782 > Reviewed-by: Mirko Bonadei > Commit-Queue: Artem Titov > Cr-Commit-Position: refs/heads/master@{#26883} TBR=mbonadei@webrtc.org,titovartem@webrtc.org Change-Id: I034f689274ceef8a8ea1d26eb5c25e833cf6bdf0 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: webrtc:10138 Reviewed-on: https://webrtc-review.googlesource.com/c/124822 Reviewed-by: Artem Titov Commit-Queue: Artem Titov Cr-Commit-Position: refs/heads/master@{#26884} --- .../video/example_video_quality_analyzer.cc | 30 +++++-------------- .../video/example_video_quality_analyzer.h | 12 +++----- 2 files changed, 11 insertions(+), 31 deletions(-) diff --git a/test/pc/e2e/analyzer/video/example_video_quality_analyzer.cc b/test/pc/e2e/analyzer/video/example_video_quality_analyzer.cc index 2937bcb188..00c0a5b718 100644 --- a/test/pc/e2e/analyzer/video/example_video_quality_analyzer.cc +++ b/test/pc/e2e/analyzer/video/example_video_quality_analyzer.cc @@ -44,16 +44,13 @@ uint16_t ExampleVideoQualityAnalyzer::OnFrameCaptured( } void ExampleVideoQualityAnalyzer::OnFramePreEncode( - const webrtc::VideoFrame& frame) { - rtc::CritScope crit(&lock_); - ++frames_pre_encoded_; -} + const webrtc::VideoFrame& frame) {} void ExampleVideoQualityAnalyzer::OnFrameEncoded( uint16_t frame_id, const webrtc::EncodedImage& encoded_image) { rtc::CritScope crit(&lock_); - ++frames_encoded_; + ++frames_sent_; } void ExampleVideoQualityAnalyzer::OnFrameDropped( @@ -73,10 +70,7 @@ void ExampleVideoQualityAnalyzer::OnFrameReceived( void ExampleVideoQualityAnalyzer::OnFrameDecoded( const webrtc::VideoFrame& frame, absl::optional decode_time_ms, - absl::optional qp) { - rtc::CritScope crit(&lock_); - ++frames_decoded_; -} + absl::optional qp) {} void ExampleVideoQualityAnalyzer::OnFrameRendered( const webrtc::VideoFrame& frame) { @@ -118,14 +112,9 @@ uint64_t ExampleVideoQualityAnalyzer::frames_captured() const { return frames_captured_; } -uint64_t ExampleVideoQualityAnalyzer::frames_pre_encoded() const { +uint64_t ExampleVideoQualityAnalyzer::frames_sent() const { rtc::CritScope crit(&lock_); - return frames_pre_encoded_; -} - -uint64_t ExampleVideoQualityAnalyzer::frames_encoded() const { - rtc::CritScope crit(&lock_); - return frames_encoded_; + return frames_sent_; } uint64_t ExampleVideoQualityAnalyzer::frames_received() const { @@ -133,9 +122,9 @@ uint64_t ExampleVideoQualityAnalyzer::frames_received() const { return frames_received_; } -uint64_t ExampleVideoQualityAnalyzer::frames_decoded() const { +uint64_t ExampleVideoQualityAnalyzer::frames_dropped() const { rtc::CritScope crit(&lock_); - return frames_decoded_; + return frames_dropped_; } uint64_t ExampleVideoQualityAnalyzer::frames_rendered() const { @@ -143,10 +132,5 @@ uint64_t ExampleVideoQualityAnalyzer::frames_rendered() const { return frames_rendered_; } -uint64_t ExampleVideoQualityAnalyzer::frames_dropped() const { - rtc::CritScope crit(&lock_); - return frames_dropped_; -} - } // namespace test } // namespace webrtc diff --git a/test/pc/e2e/analyzer/video/example_video_quality_analyzer.h b/test/pc/e2e/analyzer/video/example_video_quality_analyzer.h index 7e96d4c218..e8a2fa4ebb 100644 --- a/test/pc/e2e/analyzer/video/example_video_quality_analyzer.h +++ b/test/pc/e2e/analyzer/video/example_video_quality_analyzer.h @@ -52,12 +52,10 @@ class ExampleVideoQualityAnalyzer : public VideoQualityAnalyzerInterface { std::string GetStreamLabel(uint16_t frame_id) override; uint64_t frames_captured() const; - uint64_t frames_pre_encoded() const; - uint64_t frames_encoded() const; + uint64_t frames_sent() const; uint64_t frames_received() const; - uint64_t frames_decoded() const; - uint64_t frames_rendered() const; uint64_t frames_dropped() const; + uint64_t frames_rendered() const; private: // When peer A captured the frame it will come into analyzer's OnFrameCaptured @@ -73,12 +71,10 @@ class ExampleVideoQualityAnalyzer : public VideoQualityAnalyzerInterface { std::map frames_to_stream_label_ RTC_GUARDED_BY(lock_); uint16_t next_frame_id_ RTC_GUARDED_BY(lock_) = 0; uint64_t frames_captured_ RTC_GUARDED_BY(lock_) = 0; - uint64_t frames_pre_encoded_ RTC_GUARDED_BY(lock_) = 0; - uint64_t frames_encoded_ RTC_GUARDED_BY(lock_) = 0; + uint64_t frames_sent_ RTC_GUARDED_BY(lock_) = 0; uint64_t frames_received_ RTC_GUARDED_BY(lock_) = 0; - uint64_t frames_decoded_ RTC_GUARDED_BY(lock_) = 0; - uint64_t frames_rendered_ RTC_GUARDED_BY(lock_) = 0; uint64_t frames_dropped_ RTC_GUARDED_BY(lock_) = 0; + uint64_t frames_rendered_ RTC_GUARDED_BY(lock_) = 0; }; } // namespace test