// Copyright 2020 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CC_METRICS_VIDEO_PLAYBACK_ROUGHNESS_REPORTER_H_ #define CC_METRICS_VIDEO_PLAYBACK_ROUGHNESS_REPORTER_H_ #include <optional> #include "base/containers/circular_deque.h" #include "base/containers/flat_set.h" #include "base/functional/callback.h" #include "base/time/time.h" #include "cc/cc_export.h" #include "media/base/video_frame.h" #include "media/base/video_types.h" #include "ui/gfx/geometry/size.h" namespace cc { // This class tracks moments when each frame was submitted // and when it was displayed. Then series of frames split into groups // of consecutive frames, where each group takes about one second of playback. // Such groups also called 'frame windows'. Each windows is assigned a roughness // score that measures how far playback smoothness was from the ideal playback. // // Information about several windows and their roughness score is aggregated // for a couple of playback minutes ("measurement interval") and then a window // with 95-percentile-max-roughness is reported via the provided callback. // // This sufficiently bad roughness window is deemed to represent overall // playback quality. class CC_EXPORT VideoPlaybackRoughnessReporter { … }; } // namespace cc #endif // CC_METRICS_VIDEO_PLAYBACK_ROUGHNESS_REPORTER_H_