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

@ -226,7 +226,7 @@ VideoProcessor::VideoProcessor(webrtc::VideoEncoder* encoder,
}
VideoProcessor::~VideoProcessor() {
RTC_DCHECK_CALLED_SEQUENTIALLY(&sequence_checker_);
RTC_DCHECK_RUN_ON(&sequence_checker_);
// Explicitly reset codecs, in case they don't do that themselves when they
// go out of scope.
@ -242,7 +242,7 @@ VideoProcessor::~VideoProcessor() {
}
void VideoProcessor::ProcessFrame() {
RTC_DCHECK_CALLED_SEQUENTIALLY(&sequence_checker_);
RTC_DCHECK_RUN_ON(&sequence_checker_);
const size_t frame_number = last_inputed_frame_num_++;
// Get input frame and store for future quality calculation.
@ -296,7 +296,7 @@ void VideoProcessor::ProcessFrame() {
}
void VideoProcessor::SetRates(size_t bitrate_kbps, size_t framerate_fps) {
RTC_DCHECK_CALLED_SEQUENTIALLY(&sequence_checker_);
RTC_DCHECK_RUN_ON(&sequence_checker_);
framerate_fps_ = static_cast<uint32_t>(framerate_fps);
bitrate_allocation_ = bitrate_allocator_->GetAllocation(
static_cast<uint32_t>(bitrate_kbps * 1000), framerate_fps_);
@ -333,7 +333,7 @@ int32_t VideoProcessor::VideoProcessorDecodeCompleteCallback::Decoded(
void VideoProcessor::FrameEncoded(
const webrtc::EncodedImage& encoded_image,
const webrtc::CodecSpecificInfo& codec_specific) {
RTC_DCHECK_CALLED_SEQUENTIALLY(&sequence_checker_);
RTC_DCHECK_RUN_ON(&sequence_checker_);
// For the highest measurement accuracy of the encode time, the start/stop
// time recordings should wrap the Encode call as tightly as possible.
@ -455,7 +455,7 @@ void VideoProcessor::FrameEncoded(
void VideoProcessor::FrameDecoded(const VideoFrame& decoded_frame,
size_t spatial_idx) {
RTC_DCHECK_CALLED_SEQUENTIALLY(&sequence_checker_);
RTC_DCHECK_RUN_ON(&sequence_checker_);
// For the highest measurement accuracy of the decode time, the start/stop
// time recordings should wrap the Decode call as tightly as possible.
@ -529,7 +529,7 @@ void VideoProcessor::FrameDecoded(const VideoFrame& decoded_frame,
void VideoProcessor::DecodeFrame(const EncodedImage& encoded_image,
size_t spatial_idx) {
RTC_DCHECK_CALLED_SEQUENTIALLY(&sequence_checker_);
RTC_DCHECK_RUN_ON(&sequence_checker_);
FrameStatistics* frame_stat =
stats_->GetFrameWithTimestamp(encoded_image.Timestamp(), spatial_idx);

View File

@ -36,7 +36,7 @@
#include "rtc_base/buffer.h"
#include "rtc_base/checks.h"
#include "rtc_base/constructor_magic.h"
#include "rtc_base/sequenced_task_checker.h"
#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/thread_annotations.h"
#include "rtc_base/thread_checker.h"
#include "test/testsupport/frame_reader.h"
@ -250,7 +250,7 @@ class VideoProcessor {
int64_t post_encode_time_ns_ RTC_GUARDED_BY(sequence_checker_);
// This class must be operated on a TaskQueue.
rtc::SequencedTaskChecker sequence_checker_;
SequenceChecker sequence_checker_;
RTC_DISALLOW_COPY_AND_ASSIGN(VideoProcessor);
};