Index: webrtc/video/send_statistics_proxy.h |
diff --git a/webrtc/video/send_statistics_proxy.h b/webrtc/video/send_statistics_proxy.h |
index fead8488f3143b539c7137ff94cbd4f957519f9d..53ab7bea4700b0fed1b59480e336e107e3677626 100644 |
--- a/webrtc/video/send_statistics_proxy.h |
+++ b/webrtc/video/send_statistics_proxy.h |
@@ -150,6 +150,14 @@ class SendStatisticsProxy : public CpuOveruseMetricsObserver, |
bool last_paused_or_resumed; |
int64_t last_ms; |
}; |
+ struct FallbackEncoderInfo { |
+ bool is_possible = true; |
+ bool is_active = false; |
+ int on_off_events = 0; |
+ int64_t elapsed_ms = 0; |
+ rtc::Optional<int64_t> last_update_ms; |
+ const int max_frame_diff_ms = 2000; |
+ }; |
struct StatsTimer { |
void Start(int64_t now_ms); |
void Stop(int64_t now_ms); |
@@ -174,9 +182,14 @@ class SendStatisticsProxy : public CpuOveruseMetricsObserver, |
const VideoStreamEncoder::AdaptCounts& quality_counts) |
EXCLUSIVE_LOCKS_REQUIRED(crit_); |
+ void UpdateEncoderFallbackStats(const CodecSpecificInfo* codec_info, |
+ FallbackEncoderInfo* fallback_info) |
+ EXCLUSIVE_LOCKS_REQUIRED(crit_); |
brandtr
2017/09/14 12:30:12
I think you have to rebase this to use the RTC_ pr
åsapersson
2017/09/14 14:41:44
Done.
|
+ |
Clock* const clock_; |
const std::string payload_name_; |
const VideoSendStream::Config::Rtp rtp_config_; |
+ const rtc::Optional<int> min_first_fallback_interval_ms_; |
rtc::CriticalSection crit_; |
VideoEncoderConfig::ContentType content_type_ GUARDED_BY(crit_); |
const int64_t start_ms_; |
@@ -233,6 +246,8 @@ class SendStatisticsProxy : public CpuOveruseMetricsObserver, |
StatsTimer quality_adapt_timer_; |
BoolSampleCounter paused_time_counter_; |
TargetRateUpdates target_rate_updates_; |
+ BoolSampleCounter fallback_active_counter_; |
+ FallbackEncoderInfo fallback_info_; |
ReportBlockStats report_block_stats_; |
const VideoSendStream::Stats start_stats_; |