Adds repeating task class.
This CL adds a single class to manage the use case of having a task that repeats itself by a fixed or variable interval. It replaces the repeating task previously locally defined for rtp transport controller send as well as the cancelable periodic task. Furthermore, it is introduced where one off repeating tasks were created before. It provides the currently used functionality of the cancelable periodic task, but not some of the unused features, such as allowing cancellation of tasks before they are started and cancellation of a task after the owning task queue has been destroyed. Bug: webrtc:9883 Change-Id: Ifa7edee836c2a64fce16a7d0f682eb09c879eaca Reviewed-on: https://webrtc-review.googlesource.com/c/116182 Commit-Queue: Sebastian Jansson <srte@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#26313}
This commit is contained in:
committed by
Commit Bot
parent
95edb037a4
commit
ecb6897ade
@ -19,7 +19,7 @@
|
||||
#include "rtc_base/experiments/quality_scaling_experiment.h"
|
||||
#include "rtc_base/numerics/moving_average.h"
|
||||
#include "rtc_base/sequenced_task_checker.h"
|
||||
#include "rtc_base/thread_annotations.h"
|
||||
#include "rtc_base/task_utils/repeating_task.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -64,7 +64,6 @@ class QualityScaler {
|
||||
int64_t sampling_period_ms);
|
||||
|
||||
private:
|
||||
class CheckQpTask;
|
||||
class QpSmoother;
|
||||
|
||||
void CheckQp();
|
||||
@ -73,7 +72,7 @@ class QualityScaler {
|
||||
void ReportQpHigh();
|
||||
int64_t GetSamplingPeriodMs() const;
|
||||
|
||||
CheckQpTask* check_qp_task_ RTC_GUARDED_BY(&task_checker_);
|
||||
RepeatingTaskHandle check_qp_task_ RTC_GUARDED_BY(&task_checker_);
|
||||
AdaptationObserverInterface* const observer_ RTC_GUARDED_BY(&task_checker_);
|
||||
rtc::SequencedTaskChecker task_checker_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user