123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- #ifndef TEST_SCENARIO_PERFORMANCE_STATS_H_
- #define TEST_SCENARIO_PERFORMANCE_STATS_H_
- #include "api/units/data_rate.h"
- #include "api/units/time_delta.h"
- #include "api/units/timestamp.h"
- #include "api/video/video_frame_buffer.h"
- #include "rtc_base/numerics/event_rate_counter.h"
- #include "rtc_base/numerics/sample_stats.h"
- namespace webrtc {
- namespace test {
- struct VideoFramePair {
- rtc::scoped_refptr<VideoFrameBuffer> captured;
- rtc::scoped_refptr<VideoFrameBuffer> decoded;
- Timestamp capture_time = Timestamp::MinusInfinity();
- Timestamp decoded_time = Timestamp::PlusInfinity();
- Timestamp render_time = Timestamp::PlusInfinity();
-
-
-
- int layer_id = 0;
- int capture_id = 0;
- int decode_id = 0;
-
-
- int repeated = 0;
- };
- struct VideoFramesStats {
- int count = 0;
- SampleStats<double> pixels;
- SampleStats<double> resolution;
- EventRateCounter frames;
- void AddFrameInfo(const VideoFrameBuffer& frame, Timestamp at_time);
- void AddStats(const VideoFramesStats& other);
- };
- struct VideoQualityStats {
- int lost_count = 0;
- int freeze_count = 0;
- VideoFramesStats capture;
- VideoFramesStats render;
-
-
- SampleStats<TimeDelta> capture_to_decoded_delay;
-
-
- SampleStats<TimeDelta> end_to_end_delay;
-
-
- SampleStats<double> psnr;
-
-
- SampleStats<double> psnr_with_freeze;
-
- SampleStats<double> skipped_between_rendered;
-
-
-
-
-
- SampleStats<TimeDelta> freeze_duration;
-
- SampleStats<TimeDelta> time_between_freezes;
- void AddStats(const VideoQualityStats& other);
- };
- struct CollectedCallStats {
- SampleStats<DataRate> target_rate;
- SampleStats<TimeDelta> pacer_delay;
- SampleStats<TimeDelta> round_trip_time;
- SampleStats<double> memory_usage;
- };
- struct CollectedAudioReceiveStats {
- SampleStats<double> expand_rate;
- SampleStats<double> accelerate_rate;
- SampleStats<TimeDelta> jitter_buffer;
- };
- struct CollectedVideoSendStats {
- SampleStats<double> encode_frame_rate;
- SampleStats<TimeDelta> encode_time;
- SampleStats<double> encode_usage;
- SampleStats<DataRate> media_bitrate;
- SampleStats<DataRate> fec_bitrate;
- };
- struct CollectedVideoReceiveStats {
- SampleStats<TimeDelta> decode_time;
- SampleStats<TimeDelta> decode_time_max;
- SampleStats<double> decode_pixels;
- SampleStats<double> resolution;
- };
- }
- }
- #endif
|