Replacing SequencedTaskChecker with SequenceChecker.

Bug: webrtc:9883
Change-Id: I5e3189da2a46e6f4ed1a3c5a5dfd2f7d75a16b5d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130961
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27518}
This commit is contained in:
Sebastian Jansson
2019-04-09 13:44:04 +02:00
committed by Commit Bot
parent 412dc5f27e
commit b55015e4e1
59 changed files with 379 additions and 424 deletions

View File

@ -17,7 +17,7 @@
#include "modules/include/module_common_types.h"
#include "modules/video_coding/packet.h"
#include "rtc_base/numerics/sequence_number_util.h"
#include "rtc_base/sequenced_task_checker.h"
#include "rtc_base/synchronization/sequence_checker.h"
namespace webrtc {
@ -61,26 +61,25 @@ class LossNotificationController {
void HandleLoss(uint16_t last_received_seq_num, bool decodability_flag);
KeyFrameRequestSender* const key_frame_request_sender_
RTC_GUARDED_BY(sequenced_task_checker_);
RTC_GUARDED_BY(sequence_checker_);
LossNotificationSender* const loss_notification_sender_
RTC_GUARDED_BY(sequenced_task_checker_);
RTC_GUARDED_BY(sequence_checker_);
SeqNumUnwrapper<uint16_t> frame_id_unwrapper_
RTC_GUARDED_BY(sequenced_task_checker_);
RTC_GUARDED_BY(sequence_checker_);
// Tracked to avoid processing repeated frames (buggy/malicious remote).
absl::optional<int64_t> last_received_unwrapped_frame_id_
RTC_GUARDED_BY(sequenced_task_checker_);
RTC_GUARDED_BY(sequence_checker_);
// Tracked to avoid processing repeated packets.
absl::optional<uint16_t> last_received_seq_num_
RTC_GUARDED_BY(sequenced_task_checker_);
RTC_GUARDED_BY(sequence_checker_);
// Tracked in order to correctly report the potential-decodability of
// multi-packet frames.
bool current_frame_potentially_decodable_
RTC_GUARDED_BY(sequenced_task_checker_);
bool current_frame_potentially_decodable_ RTC_GUARDED_BY(sequence_checker_);
// Loss notifications contain the sequence number of the first packet of
// the last decodable-and-non-discardable frame. Since this is a bit of
@ -92,15 +91,15 @@ class LossNotificationController {
uint16_t first_seq_num;
};
absl::optional<FrameInfo> last_decodable_non_discardable_
RTC_GUARDED_BY(sequenced_task_checker_);
RTC_GUARDED_BY(sequence_checker_);
// Track which frames are decodable. Later frames are also decodable if
// all of their dependencies can be found in this container.
// (Naturally, later frames must also be assemblable to be decodable.)
std::set<int64_t> decodable_unwrapped_frame_ids_
RTC_GUARDED_BY(sequenced_task_checker_);
RTC_GUARDED_BY(sequence_checker_);
rtc::SequencedTaskChecker sequenced_task_checker_;
SequenceChecker sequence_checker_;
};
} // namespace webrtc