Reland "Always use real VideoStreamsFactory in full stack tests"

Reland with fixes. Previous iteration affected media bitrate in bunch of tests.

Always use real VideoStreamsFactory in full stack tests

Because quality scaling is enabled now in full stack test, correct
factory should be used to compute actual resolution.

Also, since analyzed stream may be disabled completely now, change how
analyzer considers the test finished --- count captured frames and
stop if required amount of frames is captured and no new comparison were made.

Original Reviewed-on: https://webrtc-review.googlesource.com/c/118687

Bug: webrtc:10204
Change-Id: Id1d9066add185d56fe3cb6856b700d350576c6b2
Reviewed-on: https://webrtc-review.googlesource.com/c/119950
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26460}
This commit is contained in:
Ilya Nikolaevskiy
2019-01-29 16:33:04 +01:00
committed by Commit Bot
parent e706c0f0c3
commit 6957abeff1
4 changed files with 97 additions and 38 deletions

View File

@ -136,7 +136,9 @@ class VideoAnalyzer : public PacketReceiver,
class CapturedFrameForwarder : public rtc::VideoSinkInterface<VideoFrame>,
public rtc::VideoSourceInterface<VideoFrame> {
public:
explicit CapturedFrameForwarder(VideoAnalyzer* analyzer, Clock* clock);
CapturedFrameForwarder(VideoAnalyzer* analyzer,
Clock* clock,
int frames_to_process);
void SetSource(rtc::VideoSourceInterface<VideoFrame>* video_source);
private:
@ -155,6 +157,8 @@ class VideoAnalyzer : public PacketReceiver,
RTC_GUARDED_BY(crit_);
VideoSourceInterface<VideoFrame>* video_source_;
Clock* clock_;
int captured_frames_ RTC_GUARDED_BY(crit_);
int frames_to_process_ RTC_GUARDED_BY(crit_);
};
struct FrameWithPsnr {
@ -240,6 +244,7 @@ class VideoAnalyzer : public PacketReceiver,
int frames_recorded_;
int frames_processed_;
int dropped_frames_;
int captured_frames_;
int dropped_frames_before_first_encode_;
int dropped_frames_before_rendering_;
int64_t last_render_time_;