Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Unified Diff: video/send_statistics_proxy.h

Issue 3012863002: Add stats for forced software encoder fallback for VP8. (Closed)
Patch Set: Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | video/send_statistics_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: video/send_statistics_proxy.h
diff --git a/video/send_statistics_proxy.h b/video/send_statistics_proxy.h
index 8a609e0022cdf6ae2d565deb133e7be79216f48b..351683009a1108a8a570d221f53cd4078540a0ea 100644
--- a/video/send_statistics_proxy.h
+++ b/video/send_statistics_proxy.h
@@ -16,7 +16,7 @@
#include <string>
#include <vector>
-#include "common_types.h"
+#include "common_types.h" // NOLINT(build/include)
#include "modules/video_coding/include/video_codec_interface.h"
#include "modules/video_coding/include/video_coding_defines.h"
#include "rtc_base/criticalsection.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);
@@ -173,9 +181,13 @@ class SendStatisticsProxy : public CpuOveruseMetricsObserver,
const VideoStreamEncoder::AdaptCounts& quality_counts)
RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
+ void UpdateEncoderFallbackStats(const CodecSpecificInfo* codec_info)
+ RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
+
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_ RTC_GUARDED_BY(crit_);
const int64_t start_ms_;
@@ -232,6 +244,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_;
« no previous file with comments | « no previous file | video/send_statistics_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698