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
@ -24,7 +24,7 @@
|
||||
#include "modules/rtp_rtcp/source/rtcp_packet/report_block.h"
|
||||
#include "modules/rtp_rtcp/source/rtcp_packet/target_bitrate.h"
|
||||
#include "modules/rtp_rtcp/source/rtcp_transceiver_config.h"
|
||||
#include "rtc_base/cancelable_task_handle.h"
|
||||
#include "rtc_base/task_utils/repeating_task.h"
|
||||
#include "system_wrappers/include/ntp_time.h"
|
||||
|
||||
namespace webrtc {
|
||||
@ -96,7 +96,7 @@ class RtcpTransceiverImpl {
|
||||
// TODO(danilchap): Remove entries from remote_senders_ that are no longer
|
||||
// needed.
|
||||
std::map<uint32_t, RemoteSenderState> remote_senders_;
|
||||
rtc::CancelableTaskHandle periodic_task_handle_;
|
||||
RepeatingTaskHandle periodic_task_handle_;
|
||||
};
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
Reference in New Issue
Block a user