aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtem Titov <titovartem@google.com>2021-02-02 10:57:19 +0100
committerCommit Bot <commit-bot@chromium.org>2021-02-02 14:56:27 +0000
commitc8421c4c3e84e4a34461cb0628f584b92bf3cd93 (patch)
tree6185407e0168e82b053bfff8442aff1475ff4227
parent7358b40f4468c1cbbe9f73a293385b7cfe7b3920 (diff)
downloadwebrtc-c8421c4c3e84e4a34461cb0628f584b92bf3cd93.tar.gz
Replace rtc::ThreadChecker with webrtc::SequenceChecker
Bug: webrtc:12419 Change-Id: I825c014cc1c4b1dcba5ef300409d44859e971144 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/205002 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Tommi <tommi@webrtc.org> Commit-Queue: Artem Titov <titovartem@webrtc.org> Cr-Commit-Position: refs/heads/master@{#33136}
-rw-r--r--api/ice_transport_factory.cc2
-rw-r--r--audio/audio_receive_stream.h6
-rw-r--r--audio/audio_state.h6
-rw-r--r--audio/channel_receive.cc8
-rw-r--r--audio/channel_send.cc11
-rw-r--r--audio/null_audio_poller.h4
-rw-r--r--audio/voip/BUILD.gn1
-rw-r--r--audio/voip/audio_egress.h2
-rw-r--r--call/rtp_video_sender.h4
-rw-r--r--call/simulated_network.h2
-rw-r--r--common_video/include/incoming_video_stream.h4
-rw-r--r--examples/androidnativeapi/jni/android_call_client.h4
-rw-r--r--examples/objcnativeapi/objc/objc_call_client.h4
-rw-r--r--media/base/video_broadcaster.h2
-rw-r--r--media/base/video_source_base.h2
-rw-r--r--media/engine/webrtc_video_engine.h8
-rw-r--r--media/engine/webrtc_voice_engine.cc4
-rw-r--r--media/engine/webrtc_voice_engine.h8
-rw-r--r--media/sctp/sctp_transport.cc2
-rw-r--r--modules/audio_device/android/aaudio_player.h6
-rw-r--r--modules/audio_device/android/aaudio_recorder.h6
-rw-r--r--modules/audio_device/android/aaudio_wrapper.h6
-rw-r--r--modules/audio_device/android/audio_device_template.h4
-rw-r--r--modules/audio_device/android/audio_manager.h6
-rw-r--r--modules/audio_device/android/audio_record_jni.h6
-rw-r--r--modules/audio_device/android/audio_track_jni.h6
-rw-r--r--modules/audio_device/android/opensles_player.h6
-rw-r--r--modules/audio_device/android/opensles_recorder.h6
-rw-r--r--modules/audio_device/audio_device_buffer.h4
-rw-r--r--modules/audio_device/audio_device_unittest.cc6
-rw-r--r--modules/audio_device/linux/audio_device_pulse_linux.h6
-rw-r--r--modules/audio_device/linux/audio_mixer_manager_pulse_linux.h6
-rw-r--r--modules/audio_device/win/audio_device_module_win.cc4
-rw-r--r--modules/audio_device/win/core_audio_base_win.h6
-rw-r--r--modules/congestion_controller/rtp/transport_feedback_adapter.h2
-rw-r--r--modules/desktop_capture/fallback_desktop_capturer_wrapper.cc4
-rw-r--r--modules/desktop_capture/mac/desktop_frame_provider.h4
-rw-r--r--modules/desktop_capture/mac/screen_capturer_mac.h4
-rw-r--r--modules/utility/include/jvm_android.h8
-rw-r--r--modules/utility/source/process_thread_impl.h4
-rw-r--r--modules/video_capture/windows/sink_filter_ds.h8
-rw-r--r--modules/video_coding/codecs/test/videoprocessor.h1
-rw-r--r--modules/video_coding/generic_decoder.h4
-rw-r--r--modules/video_coding/video_coding_impl.cc4
-rw-r--r--modules/video_coding/video_coding_impl.h7
-rw-r--r--modules/video_coding/video_receiver.cc2
-rw-r--r--modules/video_coding/video_receiver2.h6
-rw-r--r--p2p/base/default_ice_transport_factory.h2
-rw-r--r--p2p/base/dtls_transport.h3
-rw-r--r--p2p/base/test_turn_server.h4
-rw-r--r--p2p/base/turn_server.h4
-rw-r--r--p2p/stunprober/stun_prober.cc2
-rw-r--r--p2p/stunprober/stun_prober.h4
-rw-r--r--pc/BUILD.gn1
-rw-r--r--pc/audio_track.h4
-rw-r--r--pc/ice_transport.h2
-rw-r--r--pc/jsep_transport.h1
-rw-r--r--pc/srtp_filter.h2
-rw-r--r--pc/srtp_session.h4
-rw-r--r--pc/test/fake_periodic_video_source.h2
-rw-r--r--pc/test/peer_connection_test_wrapper.cc2
-rw-r--r--pc/test/peer_connection_test_wrapper.h4
-rw-r--r--pc/test/rtc_stats_obtainer.h2
-rw-r--r--pc/video_track.h4
-rw-r--r--pc/video_track_source.h4
-rw-r--r--rtc_base/BUILD.gn1
-rw-r--r--rtc_base/event_tracer.cc4
-rw-r--r--rtc_base/platform_thread.h6
-rw-r--r--rtc_base/synchronization/sequence_checker_unittest.cc2
-rw-r--r--rtc_tools/network_tester/test_controller.h3
-rw-r--r--sdk/android/native_api/jni/java_types.h4
-rw-r--r--sdk/android/src/jni/audio_device/aaudio_player.h6
-rw-r--r--sdk/android/src/jni/audio_device/aaudio_recorder.h6
-rw-r--r--sdk/android/src/jni/audio_device/aaudio_wrapper.h6
-rw-r--r--sdk/android/src/jni/audio_device/audio_device_module.cc4
-rw-r--r--sdk/android/src/jni/audio_device/audio_record_jni.h6
-rw-r--r--sdk/android/src/jni/audio_device/audio_track_jni.h6
-rw-r--r--sdk/android/src/jni/audio_device/opensles_common.h4
-rw-r--r--sdk/android/src/jni/audio_device/opensles_player.h6
-rw-r--r--sdk/android/src/jni/audio_device/opensles_recorder.h6
-rw-r--r--sdk/android/src/jni/video_decoder_wrapper.h4
-rw-r--r--sdk/objc/native/src/audio/audio_device_ios.h6
-rw-r--r--test/network/emulated_network_manager.h2
-rw-r--r--test/network/network_emulation.h3
-rw-r--r--test/time_controller/simulated_time_controller.h2
-rw-r--r--video/call_stats.h6
-rw-r--r--video/receive_statistics_proxy.h8
-rw-r--r--video/receive_statistics_proxy2.h3
-rw-r--r--video/rtp_streams_synchronizer.h4
-rw-r--r--video/rtp_video_stream_receiver.h3
-rw-r--r--video/video_send_stream.h4
-rw-r--r--video/video_send_stream_impl.cc1
-rw-r--r--video/video_stream_decoder_impl.h2
-rw-r--r--video/video_stream_encoder.h2
94 files changed, 195 insertions, 202 deletions
diff --git a/api/ice_transport_factory.cc b/api/ice_transport_factory.cc
index c32d7d2e11..31b4faa353 100644
--- a/api/ice_transport_factory.cc
+++ b/api/ice_transport_factory.cc
@@ -41,7 +41,7 @@ class IceTransportWithTransportChannel : public IceTransportInterface {
}
private:
- const rtc::ThreadChecker thread_checker_{};
+ const SequenceChecker thread_checker_{};
const std::unique_ptr<cricket::IceTransportInternal> internal_
RTC_GUARDED_BY(thread_checker_);
};
diff --git a/audio/audio_receive_stream.h b/audio/audio_receive_stream.h
index 7cafc38014..4d882d193f 100644
--- a/audio/audio_receive_stream.h
+++ b/audio/audio_receive_stream.h
@@ -21,7 +21,7 @@
#include "call/audio_receive_stream.h"
#include "call/syncable.h"
#include "modules/rtp_rtcp/source/source_tracker.h"
-#include "rtc_base/thread_checker.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "system_wrappers/include/clock.h"
namespace webrtc {
@@ -108,8 +108,8 @@ class AudioReceiveStream final : public webrtc::AudioReceiveStream,
AudioState* audio_state() const;
- rtc::ThreadChecker worker_thread_checker_;
- rtc::ThreadChecker module_process_thread_checker_;
+ SequenceChecker worker_thread_checker_;
+ SequenceChecker module_process_thread_checker_;
webrtc::AudioReceiveStream::Config config_;
rtc::scoped_refptr<webrtc::AudioState> audio_state_;
const std::unique_ptr<voe::ChannelReceiveInterface> channel_receive_;
diff --git a/audio/audio_state.h b/audio/audio_state.h
index 5e766428d9..5a8818eec7 100644
--- a/audio/audio_state.h
+++ b/audio/audio_state.h
@@ -19,7 +19,7 @@
#include "audio/null_audio_poller.h"
#include "call/audio_state.h"
#include "rtc_base/ref_count.h"
-#include "rtc_base/thread_checker.h"
+#include "rtc_base/synchronization/sequence_checker.h"
namespace webrtc {
@@ -65,8 +65,8 @@ class AudioState : public webrtc::AudioState {
void UpdateAudioTransportWithSendingStreams();
void UpdateNullAudioPollerState();
- rtc::ThreadChecker thread_checker_;
- rtc::ThreadChecker process_thread_checker_;
+ SequenceChecker thread_checker_;
+ SequenceChecker process_thread_checker_;
const webrtc::AudioState::Config config_;
bool recording_enabled_ = true;
bool playout_enabled_ = true;
diff --git a/audio/channel_receive.cc b/audio/channel_receive.cc
index 2788dacf78..a8015c8637 100644
--- a/audio/channel_receive.cc
+++ b/audio/channel_receive.cc
@@ -46,7 +46,7 @@
#include "rtc_base/numerics/safe_minmax.h"
#include "rtc_base/race_checker.h"
#include "rtc_base/synchronization/mutex.h"
-#include "rtc_base/thread_checker.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/time_utils.h"
#include "system_wrappers/include/metrics.h"
@@ -197,8 +197,8 @@ class ChannelReceive : public ChannelReceiveInterface {
// we know about. The goal is to eventually split up voe::ChannelReceive into
// parts with single-threaded semantics, and thereby reduce the need for
// locks.
- rtc::ThreadChecker worker_thread_checker_;
- rtc::ThreadChecker module_process_thread_checker_;
+ SequenceChecker worker_thread_checker_;
+ SequenceChecker module_process_thread_checker_;
// Methods accessed from audio and video threads are checked for sequential-
// only access. We don't necessarily own and control these threads, so thread
// checkers cannot be used. E.g. Chromium may transfer "ownership" from one
@@ -269,7 +269,7 @@ class ChannelReceive : public ChannelReceiveInterface {
PacketRouter* packet_router_ = nullptr;
- rtc::ThreadChecker construction_thread_;
+ SequenceChecker construction_thread_;
// E2EE Audio Frame Decryption
rtc::scoped_refptr<FrameDecryptorInterface> frame_decryptor_;
diff --git a/audio/channel_send.cc b/audio/channel_send.cc
index d331f0129b..bdb047be77 100644
--- a/audio/channel_send.cc
+++ b/audio/channel_send.cc
@@ -40,8 +40,8 @@
#include "rtc_base/race_checker.h"
#include "rtc_base/rate_limiter.h"
#include "rtc_base/synchronization/mutex.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/task_queue.h"
-#include "rtc_base/thread_checker.h"
#include "rtc_base/time_utils.h"
#include "system_wrappers/include/clock.h"
#include "system_wrappers/include/field_trial.h"
@@ -179,8 +179,8 @@ class ChannelSend : public ChannelSendInterface,
// specific threads we know about. The goal is to eventually split up
// voe::Channel into parts with single-threaded semantics, and thereby reduce
// the need for locks.
- rtc::ThreadChecker worker_thread_checker_;
- rtc::ThreadChecker module_process_thread_checker_;
+ SequenceChecker worker_thread_checker_;
+ SequenceChecker module_process_thread_checker_;
// Methods accessed from audio and video threads are checked for sequential-
// only access. We don't necessarily own and control these threads, so thread
// checkers cannot be used. E.g. Chromium may transfer "ownership" from one
@@ -218,8 +218,7 @@ class ChannelSend : public ChannelSendInterface,
const std::unique_ptr<RtpPacketSenderProxy> rtp_packet_pacer_proxy_;
const std::unique_ptr<RateLimiter> retransmission_rate_limiter_;
- rtc::ThreadChecker construction_thread_;
-
+ SequenceChecker construction_thread_;
bool encoder_queue_is_active_ RTC_GUARDED_BY(encoder_queue_) = false;
@@ -264,7 +263,7 @@ class RtpPacketSenderProxy : public RtpPacketSender {
}
private:
- rtc::ThreadChecker thread_checker_;
+ SequenceChecker thread_checker_;
Mutex mutex_;
RtpPacketSender* rtp_packet_pacer_ RTC_GUARDED_BY(&mutex_);
};
diff --git a/audio/null_audio_poller.h b/audio/null_audio_poller.h
index 97cd2c7e6c..99b48c2b6d 100644
--- a/audio/null_audio_poller.h
+++ b/audio/null_audio_poller.h
@@ -15,7 +15,7 @@
#include "modules/audio_device/include/audio_device_defines.h"
#include "rtc_base/message_handler.h"
-#include "rtc_base/thread_checker.h"
+#include "rtc_base/synchronization/sequence_checker.h"
namespace webrtc {
namespace internal {
@@ -29,7 +29,7 @@ class NullAudioPoller final : public rtc::MessageHandler {
void OnMessage(rtc::Message* msg) override;
private:
- rtc::ThreadChecker thread_checker_;
+ SequenceChecker thread_checker_;
AudioTransport* const audio_transport_;
int64_t reschedule_at_;
};
diff --git a/audio/voip/BUILD.gn b/audio/voip/BUILD.gn
index ed0508ff1e..77e87d5019 100644
--- a/audio/voip/BUILD.gn
+++ b/audio/voip/BUILD.gn
@@ -100,6 +100,7 @@ rtc_library("audio_egress") {
"../../rtc_base:thread_checker",
"../../rtc_base:timeutils",
"../../rtc_base/synchronization:mutex",
+ "../../rtc_base/synchronization:sequence_checker",
"../../rtc_base/system:no_unique_address",
"../utility:audio_frame_operations",
]
diff --git a/audio/voip/audio_egress.h b/audio/voip/audio_egress.h
index fcd9ed0f20..4fdbb5de23 100644
--- a/audio/voip/audio_egress.h
+++ b/audio/voip/audio_egress.h
@@ -24,8 +24,8 @@
#include "modules/rtp_rtcp/source/rtp_rtcp_interface.h"
#include "modules/rtp_rtcp/source/rtp_sender_audio.h"
#include "rtc_base/synchronization/mutex.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/task_queue.h"
-#include "rtc_base/thread_checker.h"
#include "rtc_base/time_utils.h"
namespace webrtc {
diff --git a/call/rtp_video_sender.h b/call/rtp_video_sender.h
index a8fb0ab59c..0cf3f016d8 100644
--- a/call/rtp_video_sender.h
+++ b/call/rtp_video_sender.h
@@ -38,8 +38,8 @@
#include "rtc_base/constructor_magic.h"
#include "rtc_base/rate_limiter.h"
#include "rtc_base/synchronization/mutex.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/thread_annotations.h"
-#include "rtc_base/thread_checker.h"
namespace webrtc {
@@ -185,7 +185,7 @@ class RtpVideoSender : public RtpVideoSenderInterface,
bool active_ RTC_GUARDED_BY(mutex_);
ProcessThread* module_process_thread_;
- rtc::ThreadChecker module_process_thread_checker_;
+ SequenceChecker module_process_thread_checker_;
std::map<uint32_t, RtpState> suspended_ssrcs_;
const std::unique_ptr<FecController> fec_controller_;
diff --git a/call/simulated_network.h b/call/simulated_network.h
index b53ecc0ddb..1840430013 100644
--- a/call/simulated_network.h
+++ b/call/simulated_network.h
@@ -23,8 +23,8 @@
#include "rtc_base/race_checker.h"
#include "rtc_base/random.h"
#include "rtc_base/synchronization/mutex.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/thread_annotations.h"
-#include "rtc_base/thread_checker.h"
namespace webrtc {
// Implementation of the CoDel active queue management algorithm. Loosely based
diff --git a/common_video/include/incoming_video_stream.h b/common_video/include/incoming_video_stream.h
index a779f2c622..08a21497b0 100644
--- a/common_video/include/incoming_video_stream.h
+++ b/common_video/include/incoming_video_stream.h
@@ -18,9 +18,9 @@
#include "api/video/video_sink_interface.h"
#include "common_video/video_render_frames.h"
#include "rtc_base/race_checker.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/task_queue.h"
#include "rtc_base/thread_annotations.h"
-#include "rtc_base/thread_checker.h"
namespace webrtc {
@@ -35,7 +35,7 @@ class IncomingVideoStream : public rtc::VideoSinkInterface<VideoFrame> {
void OnFrame(const VideoFrame& video_frame) override;
void Dequeue();
- rtc::ThreadChecker main_thread_checker_;
+ SequenceChecker main_thread_checker_;
rtc::RaceChecker decoder_race_checker_;
VideoRenderFrames render_buffers_ RTC_GUARDED_BY(&incoming_render_queue_);
diff --git a/examples/androidnativeapi/jni/android_call_client.h b/examples/androidnativeapi/jni/android_call_client.h
index f3f61a4695..8dc6f0a3af 100644
--- a/examples/androidnativeapi/jni/android_call_client.h
+++ b/examples/androidnativeapi/jni/android_call_client.h
@@ -19,7 +19,7 @@
#include "api/peer_connection_interface.h"
#include "api/scoped_refptr.h"
#include "rtc_base/synchronization/mutex.h"
-#include "rtc_base/thread_checker.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "sdk/android/native_api/jni/scoped_java_ref.h"
#include "sdk/android/native_api/video/video_source.h"
@@ -46,7 +46,7 @@ class AndroidCallClient {
void CreatePeerConnection() RTC_RUN_ON(thread_checker_);
void Connect() RTC_RUN_ON(thread_checker_);
- rtc::ThreadChecker thread_checker_;
+ webrtc::SequenceChecker thread_checker_;
bool call_started_ RTC_GUARDED_BY(thread_checker_);
diff --git a/examples/objcnativeapi/objc/objc_call_client.h b/examples/objcnativeapi/objc/objc_call_client.h
index b952402bc0..24b8243c1e 100644
--- a/examples/objcnativeapi/objc/objc_call_client.h
+++ b/examples/objcnativeapi/objc/objc_call_client.h
@@ -19,7 +19,7 @@
#include "api/peer_connection_interface.h"
#include "api/scoped_refptr.h"
#include "rtc_base/synchronization/mutex.h"
-#include "rtc_base/thread_checker.h"
+#include "rtc_base/synchronization/sequence_checker.h"
@class RTC_OBJC_TYPE(RTCVideoCapturer);
@protocol RTC_OBJC_TYPE
@@ -57,7 +57,7 @@ class ObjCCallClient {
void CreatePeerConnection() RTC_RUN_ON(thread_checker_);
void Connect() RTC_RUN_ON(thread_checker_);
- rtc::ThreadChecker thread_checker_;
+ webrtc::SequenceChecker thread_checker_;
bool call_started_ RTC_GUARDED_BY(thread_checker_);
diff --git a/media/base/video_broadcaster.h b/media/base/video_broadcaster.h
index 0703862c4f..ba298866fd 100644
--- a/media/base/video_broadcaster.h
+++ b/media/base/video_broadcaster.h
@@ -16,8 +16,8 @@
#include "api/video/video_source_interface.h"
#include "media/base/video_source_base.h"
#include "rtc_base/synchronization/mutex.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/thread_annotations.h"
-#include "rtc_base/thread_checker.h"
namespace rtc {
diff --git a/media/base/video_source_base.h b/media/base/video_source_base.h
index 507fa10645..c61e2988b3 100644
--- a/media/base/video_source_base.h
+++ b/media/base/video_source_base.h
@@ -16,7 +16,7 @@
#include "api/video/video_frame.h"
#include "api/video/video_sink_interface.h"
#include "api/video/video_source_interface.h"
-#include "rtc_base/thread_checker.h"
+#include "rtc_base/synchronization/sequence_checker.h"
namespace rtc {
diff --git a/media/engine/webrtc_video_engine.h b/media/engine/webrtc_video_engine.h
index 327c4e7525..b6ef2bff51 100644
--- a/media/engine/webrtc_video_engine.h
+++ b/media/engine/webrtc_video_engine.h
@@ -34,9 +34,9 @@
#include "media/engine/unhandled_packets_buffer.h"
#include "rtc_base/network_route.h"
#include "rtc_base/synchronization/mutex.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/task_utils/pending_task_safety_flag.h"
#include "rtc_base/thread_annotations.h"
-#include "rtc_base/thread_checker.h"
namespace webrtc {
class VideoDecoderFactory;
@@ -398,7 +398,7 @@ class WebRtcVideoChannel : public VideoMediaChannel,
webrtc::DegradationPreference GetDegradationPreference() const
RTC_EXCLUSIVE_LOCKS_REQUIRED(&thread_checker_);
- rtc::ThreadChecker thread_checker_;
+ webrtc::SequenceChecker thread_checker_;
rtc::Thread* worker_thread_;
const std::vector<uint32_t> ssrcs_ RTC_GUARDED_BY(&thread_checker_);
const std::vector<SsrcGroup> ssrc_groups_ RTC_GUARDED_BY(&thread_checker_);
@@ -556,8 +556,8 @@ class WebRtcVideoChannel : public VideoMediaChannel,
rtc::Thread* const worker_thread_;
webrtc::ScopedTaskSafety task_safety_;
- rtc::ThreadChecker network_thread_checker_;
- rtc::ThreadChecker thread_checker_;
+ webrtc::SequenceChecker network_thread_checker_;
+ webrtc::SequenceChecker thread_checker_;
uint32_t rtcp_receiver_report_ssrc_ RTC_GUARDED_BY(thread_checker_);
bool sending_ RTC_GUARDED_BY(thread_checker_);
diff --git a/media/engine/webrtc_voice_engine.cc b/media/engine/webrtc_voice_engine.cc
index f6b42369a1..9efef3aefc 100644
--- a/media/engine/webrtc_voice_engine.cc
+++ b/media/engine/webrtc_voice_engine.cc
@@ -1147,7 +1147,7 @@ class WebRtcVoiceMediaChannel::WebRtcAudioSendStream
int NumPreferredChannels() const override { return num_encoded_channels_; }
const AdaptivePtimeConfig adaptive_ptime_config_;
- rtc::ThreadChecker worker_thread_checker_;
+ webrtc::SequenceChecker worker_thread_checker_;
rtc::RaceChecker audio_capture_race_checker_;
webrtc::Call* call_ = nullptr;
webrtc::AudioSendStream::Config config_;
@@ -1376,7 +1376,7 @@ class WebRtcVoiceMediaChannel::WebRtcAudioReceiveStream {
stream_->Reconfigure(config_);
}
- rtc::ThreadChecker worker_thread_checker_;
+ webrtc::SequenceChecker worker_thread_checker_;
webrtc::Call* call_ = nullptr;
webrtc::AudioReceiveStream::Config config_;
// The stream is owned by WebRtcAudioReceiveStream and may be reallocated if
diff --git a/media/engine/webrtc_voice_engine.h b/media/engine/webrtc_voice_engine.h
index 7cf184ce91..205adf665f 100644
--- a/media/engine/webrtc_voice_engine.h
+++ b/media/engine/webrtc_voice_engine.h
@@ -28,9 +28,9 @@
#include "modules/async_audio_processing/async_audio_processing.h"
#include "rtc_base/buffer.h"
#include "rtc_base/network_route.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/task_queue.h"
#include "rtc_base/task_utils/pending_task_safety_flag.h"
-#include "rtc_base/thread_checker.h"
namespace webrtc {
class AudioFrameProcessor;
@@ -113,8 +113,8 @@ class WebRtcVoiceEngine final : public VoiceEngineInterface {
std::vector<AudioCodec> CollectCodecs(
const std::vector<webrtc::AudioCodecSpec>& specs) const;
- rtc::ThreadChecker signal_thread_checker_;
- rtc::ThreadChecker worker_thread_checker_;
+ webrtc::SequenceChecker signal_thread_checker_;
+ webrtc::SequenceChecker worker_thread_checker_;
// The audio device module.
rtc::scoped_refptr<webrtc::AudioDeviceModule> adm_;
@@ -287,7 +287,7 @@ class WebRtcVoiceMediaChannel final : public VoiceMediaChannel,
webrtc::TaskQueueBase* const worker_thread_;
webrtc::ScopedTaskSafety task_safety_;
- rtc::ThreadChecker network_thread_checker_;
+ webrtc::SequenceChecker network_thread_checker_;
WebRtcVoiceEngine* const engine_ = nullptr;
std::vector<AudioCodec> send_codecs_;
diff --git a/media/sctp/sctp_transport.cc b/media/sctp/sctp_transport.cc
index 4a99144752..13d5680c01 100644
--- a/media/sctp/sctp_transport.cc
+++ b/media/sctp/sctp_transport.cc
@@ -47,9 +47,9 @@ constexpr int kSctpSuccessReturn = 1;
#include "rtc_base/numerics/safe_conversions.h"
#include "rtc_base/string_utils.h"
#include "rtc_base/synchronization/mutex.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/task_utils/to_queued_task.h"
#include "rtc_base/thread_annotations.h"
-#include "rtc_base/thread_checker.h"
#include "rtc_base/trace_event.h"
namespace {
diff --git a/modules/audio_device/android/aaudio_player.h b/modules/audio_device/android/aaudio_player.h
index 820d279d6e..18bde3ca6c 100644
--- a/modules/audio_device/android/aaudio_player.h
+++ b/modules/audio_device/android/aaudio_player.h
@@ -18,9 +18,9 @@
#include "modules/audio_device/android/aaudio_wrapper.h"
#include "modules/audio_device/include/audio_device_defines.h"
#include "rtc_base/message_handler.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/thread.h"
#include "rtc_base/thread_annotations.h"
-#include "rtc_base/thread_checker.h"
namespace webrtc {
@@ -95,12 +95,12 @@ class AAudioPlayer final : public AAudioObserverInterface,
// Ensures that methods are called from the same thread as this object is
// created on.
- rtc::ThreadChecker main_thread_checker_;
+ SequenceChecker main_thread_checker_;
// Stores thread ID in first call to AAudioPlayer::OnDataCallback from a
// real-time thread owned by AAudio. Detached during construction of this
// object.
- rtc::ThreadChecker thread_checker_aaudio_;
+ SequenceChecker thread_checker_aaudio_;
// The thread on which this object is created on.
rtc::Thread* main_thread_;
diff --git a/modules/audio_device/android/aaudio_recorder.h b/modules/audio_device/android/aaudio_recorder.h
index d9427e2aec..6ab37557e1 100644
--- a/modules/audio_device/android/aaudio_recorder.h
+++ b/modules/audio_device/android/aaudio_recorder.h
@@ -18,8 +18,8 @@
#include "modules/audio_device/android/aaudio_wrapper.h"
#include "modules/audio_device/include/audio_device_defines.h"
#include "rtc_base/message_handler.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/thread.h"
-#include "rtc_base/thread_checker.h"
namespace webrtc {
@@ -88,12 +88,12 @@ class AAudioRecorder : public AAudioObserverInterface,
// Ensures that methods are called from the same thread as this object is
// created on.
- rtc::ThreadChecker thread_checker_;
+ SequenceChecker thread_checker_;
// Stores thread ID in first call to AAudioPlayer::OnDataCallback from a
// real-time thread owned by AAudio. Detached during construction of this
// object.
- rtc::ThreadChecker thread_checker_aaudio_;
+ SequenceChecker thread_checker_aaudio_;
// The thread on which this object is created on.
rtc::Thread* main_thread_;
diff --git a/modules/audio_device/android/aaudio_wrapper.h b/modules/audio_device/android/aaudio_wrapper.h
index 4915092149..08c352f162 100644
--- a/modules/audio_device/android/aaudio_wrapper.h
+++ b/modules/audio_device/android/aaudio_wrapper.h
@@ -14,7 +14,7 @@
#include <aaudio/AAudio.h>
#include "modules/audio_device/include/audio_device_defines.h"
-#include "rtc_base/thread_checker.h"
+#include "rtc_base/synchronization/sequence_checker.h"
namespace webrtc {
@@ -113,8 +113,8 @@ class AAudioWrapper {
bool VerifyStreamConfiguration();
bool OptimizeBuffers();
- rtc::ThreadChecker thread_checker_;
- rtc::ThreadChecker aaudio_thread_checker_;
+ SequenceChecker thread_checker_;
+ SequenceChecker aaudio_thread_checker_;
AudioParameters audio_parameters_;
const aaudio_direction_t direction_;
AAudioObserverInterface* observer_ = nullptr;
diff --git a/modules/audio_device/android/audio_device_template.h b/modules/audio_device/android/audio_device_template.h
index a755cf73eb..04cfc7f875 100644
--- a/modules/audio_device/android/audio_device_template.h
+++ b/modules/audio_device/android/audio_device_template.h
@@ -15,7 +15,7 @@
#include "modules/audio_device/audio_device_generic.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
-#include "rtc_base/thread_checker.h"
+#include "rtc_base/synchronization/sequence_checker.h"
namespace webrtc {
@@ -411,7 +411,7 @@ class AudioDeviceTemplate : public AudioDeviceGeneric {
}
private:
- rtc::ThreadChecker thread_checker_;
+ SequenceChecker thread_checker_;
// Local copy of the audio layer set during construction of the
// AudioDeviceModuleImpl instance. Read only value.
diff --git a/modules/audio_device/android/audio_manager.h b/modules/audio_device/android/audio_manager.h
index d1debdb415..03b6c77069 100644
--- a/modules/audio_device/android/audio_manager.h
+++ b/modules/audio_device/android/audio_manager.h
@@ -23,7 +23,7 @@
#include "modules/audio_device/include/audio_device_defines.h"
#include "modules/utility/include/helpers_android.h"
#include "modules/utility/include/jvm_android.h"
-#include "rtc_base/thread_checker.h"
+#include "rtc_base/synchronization/sequence_checker.h"
namespace webrtc {
@@ -158,9 +158,9 @@ class AudioManager {
jint input_buffer_size);
// Stores thread ID in the constructor.
- // We can then use ThreadChecker::IsCurrent() to ensure that
+ // We can then use RTC_DCHECK_RUN_ON(&thread_checker_) to ensure that
// other methods are called from the same thread.
- rtc::ThreadChecker thread_checker_;
+ SequenceChecker thread_checker_;
// Calls JavaVM::AttachCurrentThread() if this thread is not attached at
// construction.
diff --git a/modules/audio_device/android/audio_record_jni.h b/modules/audio_device/android/audio_record_jni.h
index 102f29ab1a..b4d93d20e2 100644
--- a/modules/audio_device/android/audio_record_jni.h
+++ b/modules/audio_device/android/audio_record_jni.h
@@ -20,7 +20,7 @@
#include "modules/audio_device/include/audio_device_defines.h"
#include "modules/utility/include/helpers_android.h"
#include "modules/utility/include/jvm_android.h"
-#include "rtc_base/thread_checker.h"
+#include "rtc_base/synchronization/sequence_checker.h"
namespace webrtc {
@@ -110,11 +110,11 @@ class AudioRecordJni {
void OnDataIsRecorded(int length);
// Stores thread ID in constructor.
- rtc::ThreadChecker thread_checker_;
+ SequenceChecker thread_checker_;
// Stores thread ID in first call to OnDataIsRecorded() from high-priority
// thread in Java. Detached during construction of this object.
- rtc::ThreadChecker thread_checker_java_;
+ SequenceChecker thread_checker_java_;
// Calls JavaVM::AttachCurrentThread() if this thread is not attached at
// construction.
diff --git a/modules/audio_device/android/audio_track_jni.h b/modules/audio_device/android/audio_track_jni.h
index 529a9013e8..b1f503558c 100644
--- a/modules/audio_device/android/audio_track_jni.h
+++ b/modules/audio_device/android/audio_track_jni.h
@@ -21,7 +21,7 @@
#include "modules/audio_device/include/audio_device_defines.h"
#include "modules/utility/include/helpers_android.h"
#include "modules/utility/include/jvm_android.h"
-#include "rtc_base/thread_checker.h"
+#include "rtc_base/synchronization/sequence_checker.h"
namespace webrtc {
@@ -109,11 +109,11 @@ class AudioTrackJni {
void OnGetPlayoutData(size_t length);
// Stores thread ID in constructor.
- rtc::ThreadChecker thread_checker_;
+ SequenceChecker thread_checker_;
// Stores thread ID in first call to OnGetPlayoutData() from high-priority
// thread in Java. Detached during construction of this object.
- rtc::ThreadChecker thread_checker_java_;
+ SequenceChecker thread_checker_java_;
// Calls JavaVM::AttachCurrentThread() if this thread is not attached at
// construction.
diff --git a/modules/audio_device/android/opensles_player.h b/modules/audio_device/android/opensles_player.h
index 20107585a6..da2e9ae148 100644
--- a/modules/audio_device/android/opensles_player.h
+++ b/modules/audio_device/android/opensles_player.h
@@ -21,7 +21,7 @@
#include "modules/audio_device/audio_device_generic.h"
#include "modules/audio_device/include/audio_device_defines.h"
#include "modules/utility/include/helpers_android.h"
-#include "rtc_base/thread_checker.h"
+#include "rtc_base/synchronization/sequence_checker.h"
namespace webrtc {
@@ -113,12 +113,12 @@ class OpenSLESPlayer {
// Ensures that methods are called from the same thread as this object is
// created on.
- rtc::ThreadChecker thread_checker_;
+ SequenceChecker thread_checker_;
// Stores thread ID in first call to SimpleBufferQueueCallback() from internal
// non-application thread which is not attached to the Dalvik JVM.
// Detached during construction of this object.
- rtc::ThreadChecker thread_checker_opensles_;
+ SequenceChecker thread_checker_opensles_;
// Raw pointer to the audio manager injected at construction. Used to cache
// audio parameters and to access the global SL engine object needed by the
diff --git a/modules/audio_device/android/opensles_recorder.h b/modules/audio_device/android/opensles_recorder.h
index ee1ede51d5..468d26c1b5 100644
--- a/modules/audio_device/android/opensles_recorder.h
+++ b/modules/audio_device/android/opensles_recorder.h
@@ -23,7 +23,7 @@
#include "modules/audio_device/audio_device_generic.h"
#include "modules/audio_device/include/audio_device_defines.h"
#include "modules/utility/include/helpers_android.h"
-#include "rtc_base/thread_checker.h"
+#include "rtc_base/synchronization/sequence_checker.h"
namespace webrtc {
@@ -123,12 +123,12 @@ class OpenSLESRecorder {
// Ensures that methods are called from the same thread as this object is
// created on.
- rtc::ThreadChecker thread_checker_;
+ SequenceChecker thread_checker_;
// Stores thread ID in first call to SimpleBufferQueueCallback() from internal
// non-application thread which is not attached to the Dalvik JVM.
// Detached during construction of this object.
- rtc::ThreadChecker thread_checker_opensles_;
+ SequenceChecker thread_checker_opensles_;
// Raw pointer to the audio manager injected at construction. Used to cache
// audio parameters and to access the global SL engine object needed by the
diff --git a/modules/audio_device/audio_device_buffer.h b/modules/audio_device/audio_device_buffer.h
index 37b8a2ec5e..0f24459aa4 100644
--- a/modules/audio_device/audio_device_buffer.h
+++ b/modules/audio_device/audio_device_buffer.h
@@ -20,9 +20,9 @@
#include "modules/audio_device/include/audio_device_defines.h"
#include "rtc_base/buffer.h"
#include "rtc_base/synchronization/mutex.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/task_queue.h"
#include "rtc_base/thread_annotations.h"
-#include "rtc_base/thread_checker.h"
namespace webrtc {
@@ -140,7 +140,7 @@ class AudioDeviceBuffer {
// TODO(henrika): see if it is possible to refactor and annotate all members.
// Main thread on which this object is created.
- rtc::ThreadChecker main_thread_checker_;
+ SequenceChecker main_thread_checker_;
Mutex lock_;
diff --git a/modules/audio_device/audio_device_unittest.cc b/modules/audio_device/audio_device_unittest.cc
index 709b191b9f..b3eccb168c 100644
--- a/modules/audio_device/audio_device_unittest.cc
+++ b/modules/audio_device/audio_device_unittest.cc
@@ -30,8 +30,8 @@
#include "rtc_base/numerics/safe_conversions.h"
#include "rtc_base/race_checker.h"
#include "rtc_base/synchronization/mutex.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/thread_annotations.h"
-#include "rtc_base/thread_checker.h"
#include "rtc_base/time_utils.h"
#include "test/gmock.h"
#include "test/gtest.h"
@@ -317,8 +317,8 @@ class LatencyAudioStream : public AudioStream {
Mutex lock_;
rtc::RaceChecker race_checker_;
- rtc::ThreadChecker read_thread_checker_;
- rtc::ThreadChecker write_thread_checker_;
+ SequenceChecker read_thread_checker_;
+ SequenceChecker write_thread_checker_;
absl::optional<int64_t> pulse_time_ RTC_GUARDED_BY(lock_);
std::vector<int> latencies_ RTC_GUARDED_BY(race_checker_);
diff --git a/modules/audio_device/linux/audio_device_pulse_linux.h b/modules/audio_device/linux/audio_device_pulse_linux.h
index 03aa16bb85..e4f38ddba7 100644
--- a/modules/audio_device/linux/audio_device_pulse_linux.h
+++ b/modules/audio_device/linux/audio_device_pulse_linux.h
@@ -22,8 +22,8 @@
#include "rtc_base/event.h"
#include "rtc_base/platform_thread.h"
#include "rtc_base/synchronization/mutex.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/thread_annotations.h"
-#include "rtc_base/thread_checker.h"
#if defined(WEBRTC_USE_X11)
#include <X11/Xlib.h>
@@ -284,10 +284,10 @@ class AudioDeviceLinuxPulse : public AudioDeviceGeneric {
uint8_t _playChannels;
// Stores thread ID in constructor.
- // We can then use ThreadChecker::IsCurrent() to ensure that
+ // We can then use RTC_DCHECK_RUN_ON(&worker_thread_checker_) to ensure that
// other methods are called from the same thread.
// Currently only does RTC_DCHECK(thread_checker_.IsCurrent()).
- rtc::ThreadChecker thread_checker_;
+ SequenceChecker thread_checker_;
bool _initialized;
bool _recording;
diff --git a/modules/audio_device/linux/audio_mixer_manager_pulse_linux.h b/modules/audio_device/linux/audio_mixer_manager_pulse_linux.h
index f2f3e48c70..88ff446e6b 100644
--- a/modules/audio_device/linux/audio_mixer_manager_pulse_linux.h
+++ b/modules/audio_device/linux/audio_mixer_manager_pulse_linux.h
@@ -14,7 +14,7 @@
#include <pulse/pulseaudio.h>
#include <stdint.h>
-#include "rtc_base/thread_checker.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#ifndef UINT32_MAX
#define UINT32_MAX ((uint32_t)-1)
@@ -103,10 +103,10 @@ class AudioMixerManagerLinuxPulse {
bool _paObjectsSet;
// Stores thread ID in constructor.
- // We can then use ThreadChecker::IsCurrent() to ensure that
+ // We can then use RTC_DCHECK_RUN_ON(&worker_thread_checker_) to ensure that
// other methods are called from the same thread.
// Currently only does RTC_DCHECK(thread_checker_.IsCurrent()).
- rtc::ThreadChecker thread_checker_;
+ SequenceChecker thread_checker_;
};
} // namespace webrtc
diff --git a/modules/audio_device/win/audio_device_module_win.cc b/modules/audio_device/win/audio_device_module_win.cc
index 12014749c0..62278fe867 100644
--- a/modules/audio_device/win/audio_device_module_win.cc
+++ b/modules/audio_device/win/audio_device_module_win.cc
@@ -19,7 +19,7 @@
#include "rtc_base/logging.h"
#include "rtc_base/ref_counted_object.h"
#include "rtc_base/string_utils.h"
-#include "rtc_base/thread_checker.h"
+#include "rtc_base/synchronization/sequence_checker.h"
namespace webrtc {
namespace webrtc_win {
@@ -487,7 +487,7 @@ class WindowsAudioDeviceModule : public AudioDeviceModuleForTest {
private:
// Ensures that the class is used on the same thread as it is constructed
// and destroyed on.
- rtc::ThreadChecker thread_checker_;
+ SequenceChecker thread_checker_;
// Implements the AudioInput interface and deals with audio capturing parts.
const std::unique_ptr<AudioInput> input_;
diff --git a/modules/audio_device/win/core_audio_base_win.h b/modules/audio_device/win/core_audio_base_win.h
index 87f306f541..e4a41be0ef 100644
--- a/modules/audio_device/win/core_audio_base_win.h
+++ b/modules/audio_device/win/core_audio_base_win.h
@@ -19,7 +19,7 @@
#include "absl/types/optional.h"
#include "modules/audio_device/win/core_audio_utility_win.h"
#include "rtc_base/platform_thread.h"
-#include "rtc_base/thread_checker.h"
+#include "rtc_base/synchronization/sequence_checker.h"
namespace webrtc {
@@ -128,8 +128,8 @@ class CoreAudioBase : public IAudioSessionEvents {
// level here. In addition, calls to Init(), Start() and Stop() are not
// included to allow for support of internal restart (where these methods are
// called on the audio thread).
- rtc::ThreadChecker thread_checker_;
- rtc::ThreadChecker thread_checker_audio_;
+ SequenceChecker thread_checker_;
+ SequenceChecker thread_checker_audio_;
AudioDeviceBuffer* audio_device_buffer_ = nullptr;
bool initialized_ = false;
WAVEFORMATEXTENSIBLE format_ = {};
diff --git a/modules/congestion_controller/rtp/transport_feedback_adapter.h b/modules/congestion_controller/rtp/transport_feedback_adapter.h
index c41a7c67f8..21cd5b7f01 100644
--- a/modules/congestion_controller/rtp/transport_feedback_adapter.h
+++ b/modules/congestion_controller/rtp/transport_feedback_adapter.h
@@ -21,8 +21,8 @@
#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
#include "rtc_base/network/sent_packet.h"
#include "rtc_base/network_route.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/thread_annotations.h"
-#include "rtc_base/thread_checker.h"
namespace webrtc {
diff --git a/modules/desktop_capture/fallback_desktop_capturer_wrapper.cc b/modules/desktop_capture/fallback_desktop_capturer_wrapper.cc
index 206791ca78..e93ed5a2d5 100644
--- a/modules/desktop_capture/fallback_desktop_capturer_wrapper.cc
+++ b/modules/desktop_capture/fallback_desktop_capturer_wrapper.cc
@@ -15,7 +15,7 @@
#include <utility>
#include "rtc_base/checks.h"
-#include "rtc_base/thread_checker.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "system_wrappers/include/metrics.h"
namespace webrtc {
@@ -42,7 +42,7 @@ class SharedMemoryFactoryProxy : public SharedMemoryFactory {
explicit SharedMemoryFactoryProxy(SharedMemoryFactory* factory);
SharedMemoryFactory* factory_ = nullptr;
- rtc::ThreadChecker thread_checker_;
+ SequenceChecker thread_checker_;
};
} // namespace
diff --git a/modules/desktop_capture/mac/desktop_frame_provider.h b/modules/desktop_capture/mac/desktop_frame_provider.h
index 4826f99e8e..115c63039a 100644
--- a/modules/desktop_capture/mac/desktop_frame_provider.h
+++ b/modules/desktop_capture/mac/desktop_frame_provider.h
@@ -18,7 +18,7 @@
#include <memory>
#include "modules/desktop_capture/shared_desktop_frame.h"
-#include "rtc_base/thread_checker.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "sdk/objc/helpers/scoped_cftyperef.h"
namespace webrtc {
@@ -44,7 +44,7 @@ class DesktopFrameProvider {
void Release();
private:
- rtc::ThreadChecker thread_checker_;
+ SequenceChecker thread_checker_;
const bool allow_iosurface_;
// Most recent IOSurface that contains a capture of matching display.
diff --git a/modules/desktop_capture/mac/screen_capturer_mac.h b/modules/desktop_capture/mac/screen_capturer_mac.h
index 8076e5b09a..d2243272d1 100644
--- a/modules/desktop_capture/mac/screen_capturer_mac.h
+++ b/modules/desktop_capture/mac/screen_capturer_mac.h
@@ -27,7 +27,7 @@
#include "modules/desktop_capture/screen_capture_frame_queue.h"
#include "modules/desktop_capture/screen_capturer_helper.h"
#include "modules/desktop_capture/shared_desktop_frame.h"
-#include "rtc_base/thread_checker.h"
+#include "rtc_base/synchronization/sequence_checker.h"
namespace webrtc {
@@ -110,7 +110,7 @@ class ScreenCapturerMac final : public DesktopCapturer {
DesktopFrameProvider desktop_frame_provider_;
// Start, CaptureFrame and destructor have to called in the same thread.
- rtc::ThreadChecker thread_checker_;
+ SequenceChecker thread_checker_;
RTC_DISALLOW_COPY_AND_ASSIGN(ScreenCapturerMac);
};
diff --git a/modules/utility/include/jvm_android.h b/modules/utility/include/jvm_android.h
index 3caab87761..abffc8c8aa 100644
--- a/modules/utility/include/jvm_android.h
+++ b/modules/utility/include/jvm_android.h
@@ -17,7 +17,7 @@
#include <string>
#include "modules/utility/include/helpers_android.h"
-#include "rtc_base/thread_checker.h"
+#include "rtc_base/synchronization/sequence_checker.h"
namespace webrtc {
@@ -34,7 +34,7 @@ class JvmThreadConnector {
~JvmThreadConnector();
private:
- rtc::ThreadChecker thread_checker_;
+ SequenceChecker thread_checker_;
bool attached_;
};
@@ -111,7 +111,7 @@ class JNIEnvironment {
std::string JavaToStdString(const jstring& j_string);
private:
- rtc::ThreadChecker thread_checker_;
+ SequenceChecker thread_checker_;
JNIEnv* const jni_;
};
@@ -184,7 +184,7 @@ class JVM {
private:
JNIEnv* jni() const { return GetEnv(jvm_); }
- rtc::ThreadChecker thread_checker_;
+ SequenceChecker thread_checker_;
JavaVM* const jvm_;
};
diff --git a/modules/utility/source/process_thread_impl.h b/modules/utility/source/process_thread_impl.h
index ed9f5c3bfc..e3c3ae7472 100644
--- a/modules/utility/source/process_thread_impl.h
+++ b/modules/utility/source/process_thread_impl.h
@@ -24,7 +24,7 @@
#include "rtc_base/event.h"
#include "rtc_base/location.h"
#include "rtc_base/platform_thread.h"
-#include "rtc_base/thread_checker.h"
+#include "rtc_base/synchronization/sequence_checker.h"
namespace webrtc {
@@ -95,7 +95,7 @@ class ProcessThreadImpl : public ProcessThread {
rtc::RecursiveCriticalSection
lock_; // Used to guard modules_, tasks_ and stop_.
- rtc::ThreadChecker thread_checker_;
+ SequenceChecker thread_checker_;
rtc::Event wake_up_;
// TODO(pbos): Remove unique_ptr and stop recreating the thread.
std::unique_ptr<rtc::PlatformThread> thread_;
diff --git a/modules/video_capture/windows/sink_filter_ds.h b/modules/video_capture/windows/sink_filter_ds.h
index af264a937a..03be05c36f 100644
--- a/modules/video_capture/windows/sink_filter_ds.h
+++ b/modules/video_capture/windows/sink_filter_ds.h
@@ -19,8 +19,8 @@
#include "modules/video_capture/video_capture_impl.h"
#include "modules/video_capture/windows/help_functions_ds.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/thread_annotations.h"
-#include "rtc_base/thread_checker.h"
namespace webrtc {
namespace videocapturemodule {
@@ -89,8 +89,8 @@ class CaptureInputPin : public IMemInputPin, public IPin {
STDMETHOD(ReceiveCanBlock)() override;
// clang-format on
- rtc::ThreadChecker main_checker_;
- rtc::ThreadChecker capture_checker_;
+ SequenceChecker main_checker_;
+ SequenceChecker capture_checker_;
VideoCaptureCapability requested_capability_ RTC_GUARDED_BY(main_checker_);
// Accessed on the main thread when Filter()->IsStopped() (capture thread not
@@ -147,7 +147,7 @@ class CaptureSinkFilter : public IBaseFilter {
virtual ~CaptureSinkFilter();
private:
- rtc::ThreadChecker main_checker_;
+ SequenceChecker main_checker_;
const rtc::scoped_refptr<ComRefCount<CaptureInputPin>> input_pin_;
VideoCaptureImpl* const capture_observer_;
FILTER_INFO info_ RTC_GUARDED_BY(main_checker_) = {};
diff --git a/modules/video_coding/codecs/test/videoprocessor.h b/modules/video_coding/codecs/test/videoprocessor.h
index ba171d6cd9..9fedc98e5c 100644
--- a/modules/video_coding/codecs/test/videoprocessor.h
+++ b/modules/video_coding/codecs/test/videoprocessor.h
@@ -40,7 +40,6 @@
#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/system/no_unique_address.h"
#include "rtc_base/thread_annotations.h"
-#include "rtc_base/thread_checker.h"
#include "test/testsupport/frame_reader.h"
#include "test/testsupport/frame_writer.h"
diff --git a/modules/video_coding/generic_decoder.h b/modules/video_coding/generic_decoder.h
index 9524bab99b..8f416909aa 100644
--- a/modules/video_coding/generic_decoder.h
+++ b/modules/video_coding/generic_decoder.h
@@ -21,7 +21,7 @@
#include "modules/video_coding/timing.h"
#include "rtc_base/experiments/field_trial_parser.h"
#include "rtc_base/synchronization/mutex.h"
-#include "rtc_base/thread_checker.h"
+#include "rtc_base/synchronization/sequence_checker.h"
namespace webrtc {
@@ -61,7 +61,7 @@ class VCMDecodedFrameCallback : public DecodedImageCallback {
int32_t Pop(uint32_t timestamp);
private:
- rtc::ThreadChecker construction_thread_;
+ SequenceChecker construction_thread_;
// Protect |_timestampMap|.
Clock* const _clock;
// This callback must be set before the decoder thread starts running
diff --git a/modules/video_coding/video_coding_impl.cc b/modules/video_coding/video_coding_impl.cc
index 049695d753..de29e2c9e7 100644
--- a/modules/video_coding/video_coding_impl.cc
+++ b/modules/video_coding/video_coding_impl.cc
@@ -16,7 +16,7 @@
#include "api/video/encoded_image.h"
#include "modules/video_coding/include/video_codec_interface.h"
#include "modules/video_coding/timing.h"
-#include "rtc_base/thread_checker.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "system_wrappers/include/clock.h"
namespace webrtc {
@@ -105,7 +105,7 @@ class VideoCodingModuleImpl : public VideoCodingModule {
}
private:
- rtc::ThreadChecker construction_thread_;
+ SequenceChecker construction_thread_;
const std::unique_ptr<VCMTiming> timing_;
vcm::VideoReceiver receiver_;
};
diff --git a/modules/video_coding/video_coding_impl.h b/modules/video_coding/video_coding_impl.h
index aee6337e50..d8b0225e16 100644
--- a/modules/video_coding/video_coding_impl.h
+++ b/modules/video_coding/video_coding_impl.h
@@ -27,7 +27,6 @@
#include "rtc_base/synchronization/mutex.h"
#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/thread_annotations.h"
-#include "rtc_base/thread_checker.h"
#include "system_wrappers/include/clock.h"
namespace webrtc {
@@ -97,9 +96,9 @@ class VideoReceiver : public Module {
// In builds where DCHECKs aren't enabled, it will return true.
bool IsDecoderThreadRunning();
- rtc::ThreadChecker construction_thread_checker_;
- rtc::ThreadChecker decoder_thread_checker_;
- rtc::ThreadChecker module_thread_checker_;
+ SequenceChecker construction_thread_checker_;
+ SequenceChecker decoder_thread_checker_;
+ SequenceChecker module_thread_checker_;
Clock* const clock_;
Mutex process_mutex_;
VCMTiming* _timing;
diff --git a/modules/video_coding/video_receiver.cc b/modules/video_coding/video_receiver.cc
index 23c251f59c..f1f70a16ac 100644
--- a/modules/video_coding/video_receiver.cc
+++ b/modules/video_coding/video_receiver.cc
@@ -33,7 +33,7 @@
#include "rtc_base/location.h"
#include "rtc_base/logging.h"
#include "rtc_base/one_time_event.h"
-#include "rtc_base/thread_checker.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/trace_event.h"
#include "system_wrappers/include/clock.h"
diff --git a/modules/video_coding/video_receiver2.h b/modules/video_coding/video_receiver2.h
index c7b7b80b6d..781ab22d23 100644
--- a/modules/video_coding/video_receiver2.h
+++ b/modules/video_coding/video_receiver2.h
@@ -15,7 +15,7 @@
#include "modules/video_coding/encoded_frame.h"
#include "modules/video_coding/generic_decoder.h"
#include "modules/video_coding/timing.h"
-#include "rtc_base/thread_checker.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "system_wrappers/include/clock.h"
namespace webrtc {
@@ -54,8 +54,8 @@ class VideoReceiver2 {
// In builds where DCHECKs aren't enabled, it will return true.
bool IsDecoderThreadRunning();
- rtc::ThreadChecker construction_thread_checker_;
- rtc::ThreadChecker decoder_thread_checker_;
+ SequenceChecker construction_thread_checker_;
+ SequenceChecker decoder_thread_checker_;
Clock* const clock_;
VCMTiming* timing_;
VCMDecodedFrameCallback decodedFrameCallback_;
diff --git a/p2p/base/default_ice_transport_factory.h b/p2p/base/default_ice_transport_factory.h
index 4834c9ada7..e46680d480 100644
--- a/p2p/base/default_ice_transport_factory.h
+++ b/p2p/base/default_ice_transport_factory.h
@@ -36,7 +36,7 @@ class DefaultIceTransport : public IceTransportInterface {
}
private:
- const rtc::ThreadChecker thread_checker_{};
+ const SequenceChecker thread_checker_{};
std::unique_ptr<cricket::P2PTransportChannel> internal_
RTC_GUARDED_BY(thread_checker_);
};
diff --git a/p2p/base/dtls_transport.h b/p2p/base/dtls_transport.h
index 5c8a721d03..4822362342 100644
--- a/p2p/base/dtls_transport.h
+++ b/p2p/base/dtls_transport.h
@@ -26,7 +26,6 @@
#include "rtc_base/strings/string_builder.h"
#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/system/no_unique_address.h"
-#include "rtc_base/thread_checker.h"
namespace rtc {
class PacketTransportInternal;
@@ -223,7 +222,7 @@ class DtlsTransport : public DtlsTransportInternal {
// Sets the DTLS state, signaling if necessary.
void set_dtls_state(DtlsTransportState state);
- rtc::ThreadChecker thread_checker_;
+ webrtc::SequenceChecker thread_checker_;
std::string transport_name_;
int component_;
diff --git a/p2p/base/test_turn_server.h b/p2p/base/test_turn_server.h
index d438a83301..8732426ccd 100644
--- a/p2p/base/test_turn_server.h
+++ b/p2p/base/test_turn_server.h
@@ -20,8 +20,8 @@
#include "rtc_base/async_udp_socket.h"
#include "rtc_base/ssl_adapter.h"
#include "rtc_base/ssl_identity.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/thread.h"
-#include "rtc_base/thread_checker.h"
namespace cricket {
@@ -147,7 +147,7 @@ class TestTurnServer : public TurnAuthInterface {
TurnServer server_;
rtc::Thread* thread_;
- rtc::ThreadChecker thread_checker_;
+ webrtc::SequenceChecker thread_checker_;
};
} // namespace cricket
diff --git a/p2p/base/turn_server.h b/p2p/base/turn_server.h
index ca856448b3..600e778253 100644
--- a/p2p/base/turn_server.h
+++ b/p2p/base/turn_server.h
@@ -23,9 +23,9 @@
#include "rtc_base/async_invoker.h"
#include "rtc_base/async_packet_socket.h"
#include "rtc_base/socket_address.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/third_party/sigslot/sigslot.h"
#include "rtc_base/thread.h"
-#include "rtc_base/thread_checker.h"
namespace rtc {
class ByteBufferWriter;
@@ -316,7 +316,7 @@ class TurnServer : public sigslot::has_slots<> {
typedef std::map<rtc::AsyncSocket*, ProtocolType> ServerSocketMap;
rtc::Thread* thread_;
- rtc::ThreadChecker thread_checker_;
+ webrtc::SequenceChecker thread_checker_;
std::string nonce_key_;
std::string realm_;
std::string software_;
diff --git a/p2p/stunprober/stun_prober.cc b/p2p/stunprober/stun_prober.cc
index 3aed1990ec..513097d17b 100644
--- a/p2p/stunprober/stun_prober.cc
+++ b/p2p/stunprober/stun_prober.cc
@@ -103,7 +103,7 @@ class StunProber::Requester : public sigslot::has_slots<> {
int16_t num_request_sent_ = 0;
int16_t num_response_received_ = 0;
- rtc::ThreadChecker& thread_checker_;
+ webrtc::SequenceChecker& thread_checker_;
RTC_DISALLOW_COPY_AND_ASSIGN(Requester);
};
diff --git a/p2p/stunprober/stun_prober.h b/p2p/stunprober/stun_prober.h
index a739a6c98b..60d3b7062c 100644
--- a/p2p/stunprober/stun_prober.h
+++ b/p2p/stunprober/stun_prober.h
@@ -22,9 +22,9 @@
#include "rtc_base/ip_address.h"
#include "rtc_base/network.h"
#include "rtc_base/socket_address.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/system/rtc_export.h"
#include "rtc_base/thread.h"
-#include "rtc_base/thread_checker.h"
namespace rtc {
class AsyncPacketSocket;
@@ -227,7 +227,7 @@ class RTC_EXPORT StunProber : public sigslot::has_slots<> {
// The set of STUN probe sockets and their state.
std::vector<Requester*> requesters_;
- rtc::ThreadChecker thread_checker_;
+ webrtc::SequenceChecker thread_checker_;
// Temporary storage for created sockets.
std::vector<rtc::AsyncPacketSocket*> sockets_;
diff --git a/pc/BUILD.gn b/pc/BUILD.gn
index 1e76e2c3c6..d3b8fccbbf 100644
--- a/pc/BUILD.gn
+++ b/pc/BUILD.gn
@@ -584,6 +584,7 @@ rtc_library("audio_track") {
"../rtc_base:checks",
"../rtc_base:refcount",
"../rtc_base:thread_checker",
+ "../rtc_base/synchronization:sequence_checker",
]
}
diff --git a/pc/audio_track.h b/pc/audio_track.h
index 8cff79e8b9..26b4769623 100644
--- a/pc/audio_track.h
+++ b/pc/audio_track.h
@@ -16,7 +16,7 @@
#include "api/media_stream_interface.h"
#include "api/media_stream_track.h"
#include "api/scoped_refptr.h"
-#include "rtc_base/thread_checker.h"
+#include "rtc_base/synchronization/sequence_checker.h"
namespace webrtc {
@@ -53,7 +53,7 @@ class AudioTrack : public MediaStreamTrack<AudioTrackInterface>,
private:
const rtc::scoped_refptr<AudioSourceInterface> audio_source_;
- rtc::ThreadChecker thread_checker_;
+ SequenceChecker thread_checker_;
};
} // namespace webrtc
diff --git a/pc/ice_transport.h b/pc/ice_transport.h
index 4234ff6a78..6121b8d5b3 100644
--- a/pc/ice_transport.h
+++ b/pc/ice_transport.h
@@ -13,9 +13,9 @@
#include "api/ice_transport_interface.h"
#include "rtc_base/checks.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/thread.h"
#include "rtc_base/thread_annotations.h"
-#include "rtc_base/thread_checker.h"
namespace webrtc {
diff --git a/pc/jsep_transport.h b/pc/jsep_transport.h
index 20d0c926e0..0260b9374b 100644
--- a/pc/jsep_transport.h
+++ b/pc/jsep_transport.h
@@ -52,7 +52,6 @@
#include "rtc_base/third_party/sigslot/sigslot.h"
#include "rtc_base/thread.h"
#include "rtc_base/thread_annotations.h"
-#include "rtc_base/thread_checker.h"
namespace cricket {
diff --git a/pc/srtp_filter.h b/pc/srtp_filter.h
index 74847764d4..a7ae97f28b 100644
--- a/pc/srtp_filter.h
+++ b/pc/srtp_filter.h
@@ -28,7 +28,7 @@
#include "rtc_base/buffer.h"
#include "rtc_base/constructor_magic.h"
#include "rtc_base/ssl_stream_adapter.h"
-#include "rtc_base/thread_checker.h"
+#include "rtc_base/synchronization/sequence_checker.h"
// Forward declaration to avoid pulling in libsrtp headers here
struct srtp_event_data_t;
diff --git a/pc/srtp_session.h b/pc/srtp_session.h
index 62327a9039..f2210cf182 100644
--- a/pc/srtp_session.h
+++ b/pc/srtp_session.h
@@ -16,7 +16,7 @@
#include "api/scoped_refptr.h"
#include "rtc_base/constructor_magic.h"
#include "rtc_base/synchronization/mutex.h"
-#include "rtc_base/thread_checker.h"
+#include "rtc_base/synchronization/sequence_checker.h"
// Forward declaration to avoid pulling in libsrtp headers here
struct srtp_event_data_t;
@@ -124,7 +124,7 @@ class SrtpSession {
void HandleEvent(const srtp_event_data_t* ev);
static void HandleEventThunk(srtp_event_data_t* ev);
- rtc::ThreadChecker thread_checker_;
+ webrtc::SequenceChecker thread_checker_;
srtp_ctx_t_* session_ = nullptr;
int rtp_auth_tag_len_ = 0;
int rtcp_auth_tag_len_ = 0;
diff --git a/pc/test/fake_periodic_video_source.h b/pc/test/fake_periodic_video_source.h
index ac6e5a43e7..871c29cbae 100644
--- a/pc/test/fake_periodic_video_source.h
+++ b/pc/test/fake_periodic_video_source.h
@@ -86,7 +86,7 @@ class FakePeriodicVideoSource final
}
private:
- rtc::ThreadChecker thread_checker_;
+ SequenceChecker thread_checker_;
rtc::VideoBroadcaster broadcaster_;
cricket::FakeFrameSource frame_source_;
diff --git a/pc/test/peer_connection_test_wrapper.cc b/pc/test/peer_connection_test_wrapper.cc
index 946f459f3b..f401ebbc7f 100644
--- a/pc/test/peer_connection_test_wrapper.cc
+++ b/pc/test/peer_connection_test_wrapper.cc
@@ -37,7 +37,7 @@
#include "rtc_base/ref_counted_object.h"
#include "rtc_base/rtc_certificate_generator.h"
#include "rtc_base/string_encode.h"
-#include "rtc_base/thread_checker.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/time_utils.h"
#include "test/gtest.h"
diff --git a/pc/test/peer_connection_test_wrapper.h b/pc/test/peer_connection_test_wrapper.h
index 92599b78ab..f345f54e0e 100644
--- a/pc/test/peer_connection_test_wrapper.h
+++ b/pc/test/peer_connection_test_wrapper.h
@@ -27,9 +27,9 @@
#include "api/scoped_refptr.h"
#include "pc/test/fake_audio_capture_module.h"
#include "pc/test/fake_video_track_renderer.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/third_party/sigslot/sigslot.h"
#include "rtc_base/thread.h"
-#include "rtc_base/thread_checker.h"
class PeerConnectionTestWrapper
: public webrtc::PeerConnectionObserver,
@@ -120,7 +120,7 @@ class PeerConnectionTestWrapper
std::string name_;
rtc::Thread* const network_thread_;
rtc::Thread* const worker_thread_;
- rtc::ThreadChecker pc_thread_checker_;
+ webrtc::SequenceChecker pc_thread_checker_;
rtc::scoped_refptr<webrtc::PeerConnectionInterface> peer_connection_;
rtc::scoped_refptr<webrtc::PeerConnectionFactoryInterface>
peer_connection_factory_;
diff --git a/pc/test/rtc_stats_obtainer.h b/pc/test/rtc_stats_obtainer.h
index 95201f6649..335b9de307 100644
--- a/pc/test/rtc_stats_obtainer.h
+++ b/pc/test/rtc_stats_obtainer.h
@@ -43,7 +43,7 @@ class RTCStatsObtainer : public RTCStatsCollectorCallback {
: report_ptr_(report_ptr) {}
private:
- rtc::ThreadChecker thread_checker_;
+ SequenceChecker thread_checker_;
rtc::scoped_refptr<const RTCStatsReport> report_;
rtc::scoped_refptr<const RTCStatsReport>* report_ptr_;
};
diff --git a/pc/video_track.h b/pc/video_track.h
index b7835dee29..a2cf46fd0b 100644
--- a/pc/video_track.h
+++ b/pc/video_track.h
@@ -20,9 +20,9 @@
#include "api/video/video_sink_interface.h"
#include "api/video/video_source_interface.h"
#include "media/base/video_source_base.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/thread.h"
#include "rtc_base/thread_annotations.h"
-#include "rtc_base/thread_checker.h"
namespace webrtc {
@@ -58,7 +58,7 @@ class VideoTrack : public MediaStreamTrack<VideoTrackInterface>,
void OnChanged() override;
rtc::Thread* const worker_thread_;
- rtc::ThreadChecker signaling_thread_checker_;
+ SequenceChecker signaling_thread_checker_;
rtc::scoped_refptr<VideoTrackSourceInterface> video_source_;
ContentHint content_hint_ RTC_GUARDED_BY(signaling_thread_checker_);
};
diff --git a/pc/video_track_source.h b/pc/video_track_source.h
index d4fc916a1f..223c5dd669 100644
--- a/pc/video_track_source.h
+++ b/pc/video_track_source.h
@@ -19,8 +19,8 @@
#include "api/video/video_sink_interface.h"
#include "api/video/video_source_interface.h"
#include "media/base/media_channel.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/system/rtc_export.h"
-#include "rtc_base/thread_checker.h"
namespace webrtc {
@@ -56,7 +56,7 @@ class RTC_EXPORT VideoTrackSource : public Notifier<VideoTrackSourceInterface> {
virtual rtc::VideoSourceInterface<VideoFrame>* source() = 0;
private:
- rtc::ThreadChecker worker_thread_checker_;
+ SequenceChecker worker_thread_checker_;
SourceState state_;
const bool remote_;
};
diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn
index 0d6b7e93a5..983488f893 100644
--- a/rtc_base/BUILD.gn
+++ b/rtc_base/BUILD.gn
@@ -238,6 +238,7 @@ rtc_library("platform_thread") {
":rtc_event",
":thread_checker",
":timeutils",
+ "synchronization:sequence_checker",
]
absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
}
diff --git a/rtc_base/event_tracer.cc b/rtc_base/event_tracer.cc
index 3af8183b1f..8626589321 100644
--- a/rtc_base/event_tracer.cc
+++ b/rtc_base/event_tracer.cc
@@ -24,8 +24,8 @@
#include "rtc_base/platform_thread.h"
#include "rtc_base/platform_thread_types.h"
#include "rtc_base/synchronization/mutex.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/thread_annotations.h"
-#include "rtc_base/thread_checker.h"
#include "rtc_base/time_utils.h"
#include "rtc_base/trace_event.h"
@@ -321,7 +321,7 @@ class EventLogger final {
std::vector<TraceEvent> trace_events_ RTC_GUARDED_BY(mutex_);
rtc::PlatformThread logging_thread_;
rtc::Event shutdown_event_;
- rtc::ThreadChecker thread_checker_;
+ webrtc::SequenceChecker thread_checker_;
FILE* output_file_ = nullptr;
bool output_file_owned_ = false;
};
diff --git a/rtc_base/platform_thread.h b/rtc_base/platform_thread.h
index 4968de9ee5..3438f8e617 100644
--- a/rtc_base/platform_thread.h
+++ b/rtc_base/platform_thread.h
@@ -19,7 +19,7 @@
#include "absl/strings/string_view.h"
#include "rtc_base/constructor_magic.h"
#include "rtc_base/platform_thread_types.h"
-#include "rtc_base/thread_checker.h"
+#include "rtc_base/synchronization/sequence_checker.h"
namespace rtc {
@@ -84,8 +84,8 @@ class PlatformThread {
// TODO(pbos): Make sure call sites use string literals and update to a const
// char* instead of a std::string.
const std::string name_;
- rtc::ThreadChecker thread_checker_;
- rtc::ThreadChecker spawned_thread_checker_;
+ webrtc::SequenceChecker thread_checker_;
+ webrtc::SequenceChecker spawned_thread_checker_;
#if defined(WEBRTC_WIN)
static DWORD WINAPI StartThread(void* param);
diff --git a/rtc_base/synchronization/sequence_checker_unittest.cc b/rtc_base/synchronization/sequence_checker_unittest.cc
index 6fcb522c54..ff91b0a7fb 100644
--- a/rtc_base/synchronization/sequence_checker_unittest.cc
+++ b/rtc_base/synchronization/sequence_checker_unittest.cc
@@ -16,8 +16,8 @@
#include "api/function_view.h"
#include "rtc_base/event.h"
#include "rtc_base/platform_thread.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/task_queue_for_test.h"
-#include "rtc_base/thread_checker.h"
#include "test/gtest.h"
namespace webrtc {
diff --git a/rtc_tools/network_tester/test_controller.h b/rtc_tools/network_tester/test_controller.h
index b73ac94329..20f580e8a4 100644
--- a/rtc_tools/network_tester/test_controller.h
+++ b/rtc_tools/network_tester/test_controller.h
@@ -28,7 +28,6 @@
#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/third_party/sigslot/sigslot.h"
#include "rtc_base/thread_annotations.h"
-#include "rtc_base/thread_checker.h"
#include "rtc_tools/network_tester/packet_logger.h"
#include "rtc_tools/network_tester/packet_sender.h"
@@ -69,7 +68,7 @@ class TestController : public sigslot::has_slots<> {
size_t len,
const rtc::SocketAddress& remote_addr,
const int64_t& packet_time_us);
- rtc::ThreadChecker test_controller_thread_checker_;
+ SequenceChecker test_controller_thread_checker_;
SequenceChecker packet_sender_checker_;
rtc::BasicPacketSocketFactory socket_factory_;
const std::string config_file_path_;
diff --git a/sdk/android/native_api/jni/java_types.h b/sdk/android/native_api/jni/java_types.h
index 26fdd5a0b8..c12eff8a75 100644
--- a/sdk/android/native_api/jni/java_types.h
+++ b/sdk/android/native_api/jni/java_types.h
@@ -27,7 +27,7 @@
#include "absl/types/optional.h"
#include "api/array_view.h"
#include "rtc_base/checks.h"
-#include "rtc_base/thread_checker.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "sdk/android/native_api/jni/scoped_java_ref.h"
// Abort the process if |jni| has a Java exception pending.
@@ -95,7 +95,7 @@ class Iterable {
JNIEnv* jni_ = nullptr;
ScopedJavaLocalRef<jobject> iterator_;
ScopedJavaLocalRef<jobject> value_;
- rtc::ThreadChecker thread_checker_;
+ SequenceChecker thread_checker_;
RTC_DISALLOW_COPY_AND_ASSIGN(Iterator);
};
diff --git a/sdk/android/src/jni/audio_device/aaudio_player.h b/sdk/android/src/jni/audio_device/aaudio_player.h
index e6146d0d47..0bfc0a9b32 100644
--- a/sdk/android/src/jni/audio_device/aaudio_player.h
+++ b/sdk/android/src/jni/audio_device/aaudio_player.h
@@ -18,9 +18,9 @@
#include "modules/audio_device/audio_device_buffer.h"
#include "modules/audio_device/include/audio_device_defines.h"
#include "rtc_base/message_handler.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/thread.h"
#include "rtc_base/thread_annotations.h"
-#include "rtc_base/thread_checker.h"
#include "sdk/android/src/jni/audio_device/aaudio_wrapper.h"
#include "sdk/android/src/jni/audio_device/audio_device_module.h"
@@ -99,12 +99,12 @@ class AAudioPlayer final : public AudioOutput,
// Ensures that methods are called from the same thread as this object is
// created on.
- rtc::ThreadChecker main_thread_checker_;
+ SequenceChecker main_thread_checker_;
// Stores thread ID in first call to AAudioPlayer::OnDataCallback from a
// real-time thread owned by AAudio. Detached during construction of this
// object.
- rtc::ThreadChecker thread_checker_aaudio_;
+ SequenceChecker thread_checker_aaudio_;
// The thread on which this object is created on.
rtc::Thread* main_thread_;
diff --git a/sdk/android/src/jni/audio_device/aaudio_recorder.h b/sdk/android/src/jni/audio_device/aaudio_recorder.h
index 0ed0fa2d5c..2943c24029 100644
--- a/sdk/android/src/jni/audio_device/aaudio_recorder.h
+++ b/sdk/android/src/jni/audio_device/aaudio_recorder.h
@@ -17,8 +17,8 @@
#include "modules/audio_device/audio_device_buffer.h"
#include "modules/audio_device/include/audio_device_defines.h"
#include "rtc_base/message_handler.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/thread.h"
-#include "rtc_base/thread_checker.h"
#include "sdk/android/src/jni/audio_device/aaudio_wrapper.h"
#include "sdk/android/src/jni/audio_device/audio_device_module.h"
@@ -90,12 +90,12 @@ class AAudioRecorder : public AudioInput,
// Ensures that methods are called from the same thread as this object is
// created on.
- rtc::ThreadChecker thread_checker_;
+ SequenceChecker thread_checker_;
// Stores thread ID in first call to AAudioPlayer::OnDataCallback from a
// real-time thread owned by AAudio. Detached during construction of this
// object.
- rtc::ThreadChecker thread_checker_aaudio_;
+ SequenceChecker thread_checker_aaudio_;
// The thread on which this object is created on.
rtc::Thread* main_thread_;
diff --git a/sdk/android/src/jni/audio_device/aaudio_wrapper.h b/sdk/android/src/jni/audio_device/aaudio_wrapper.h
index 1900ab988c..593545cc8b 100644
--- a/sdk/android/src/jni/audio_device/aaudio_wrapper.h
+++ b/sdk/android/src/jni/audio_device/aaudio_wrapper.h
@@ -14,7 +14,7 @@
#include <aaudio/AAudio.h>
#include "modules/audio_device/include/audio_device_defines.h"
-#include "rtc_base/thread_checker.h"
+#include "rtc_base/synchronization/sequence_checker.h"
namespace webrtc {
@@ -113,8 +113,8 @@ class AAudioWrapper {
bool VerifyStreamConfiguration();
bool OptimizeBuffers();
- rtc::ThreadChecker thread_checker_;
- rtc::ThreadChecker aaudio_thread_checker_;
+ SequenceChecker thread_checker_;
+ SequenceChecker aaudio_thread_checker_;
const AudioParameters audio_parameters_;
const aaudio_direction_t direction_;
AAudioObserverInterface* observer_ = nullptr;
diff --git a/sdk/android/src/jni/audio_device/audio_device_module.cc b/sdk/android/src/jni/audio_device/audio_device_module.cc
index ab8143c42a..9515d8d1df 100644
--- a/sdk/android/src/jni/audio_device/audio_device_module.cc
+++ b/sdk/android/src/jni/audio_device/audio_device_module.cc
@@ -19,7 +19,7 @@
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
#include "rtc_base/ref_counted_object.h"
-#include "rtc_base/thread_checker.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "sdk/android/generated_audio_device_module_base_jni/WebRtcAudioManager_jni.h"
#include "system_wrappers/include/metrics.h"
@@ -583,7 +583,7 @@ class AndroidAudioDeviceModule : public AudioDeviceModule {
}
private:
- rtc::ThreadChecker thread_checker_;
+ SequenceChecker thread_checker_;
const AudioDeviceModule::AudioLayer audio_layer_;
const bool is_stereo_playout_supported_;
diff --git a/sdk/android/src/jni/audio_device/audio_record_jni.h b/sdk/android/src/jni/audio_device/audio_record_jni.h
index 7578f83948..b8b258d9c6 100644
--- a/sdk/android/src/jni/audio_device/audio_record_jni.h
+++ b/sdk/android/src/jni/audio_device/audio_record_jni.h
@@ -16,7 +16,7 @@
#include "modules/audio_device/audio_device_buffer.h"
#include "modules/audio_device/include/audio_device_defines.h"
-#include "rtc_base/thread_checker.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "sdk/android/src/jni/audio_device/audio_device_module.h"
namespace webrtc {
@@ -93,11 +93,11 @@ class AudioRecordJni : public AudioInput {
private:
// Stores thread ID in constructor.
- rtc::ThreadChecker thread_checker_;
+ SequenceChecker thread_checker_;
// Stores thread ID in first call to OnDataIsRecorded() from high-priority
// thread in Java. Detached during construction of this object.
- rtc::ThreadChecker thread_checker_java_;
+ SequenceChecker thread_checker_java_;
// Wraps the Java specific parts of the AudioRecordJni class.
JNIEnv* env_ = nullptr;
diff --git a/sdk/android/src/jni/audio_device/audio_track_jni.h b/sdk/android/src/jni/audio_device/audio_track_jni.h
index c7d060033f..8ecee49268 100644
--- a/sdk/android/src/jni/audio_device/audio_track_jni.h
+++ b/sdk/android/src/jni/audio_device/audio_track_jni.h
@@ -17,7 +17,7 @@
#include "absl/types/optional.h"
#include "modules/audio_device/audio_device_buffer.h"
#include "modules/audio_device/include/audio_device_defines.h"
-#include "rtc_base/thread_checker.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "sdk/android/src/jni/audio_device/audio_common.h"
#include "sdk/android/src/jni/audio_device/audio_device_module.h"
@@ -84,11 +84,11 @@ class AudioTrackJni : public AudioOutput {
private:
// Stores thread ID in constructor.
- rtc::ThreadChecker thread_checker_;
+ SequenceChecker thread_checker_;
// Stores thread ID in first call to OnGetPlayoutData() from high-priority
// thread in Java. Detached during construction of this object.
- rtc::ThreadChecker thread_checker_java_;
+ SequenceChecker thread_checker_java_;
// Wraps the Java specific parts of the AudioTrackJni class.
JNIEnv* env_ = nullptr;
diff --git a/sdk/android/src/jni/audio_device/opensles_common.h b/sdk/android/src/jni/audio_device/opensles_common.h
index 605ddfc0eb..3303909338 100644
--- a/sdk/android/src/jni/audio_device/opensles_common.h
+++ b/sdk/android/src/jni/audio_device/opensles_common.h
@@ -17,7 +17,7 @@
#include "api/ref_counted_base.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
-#include "rtc_base/thread_checker.h"
+#include "rtc_base/synchronization/sequence_checker.h"
namespace webrtc {
@@ -75,7 +75,7 @@ class OpenSLEngineManager : public rtc::RefCountedBase {
SLObjectItf GetOpenSLEngine();
private:
- rtc::ThreadChecker thread_checker_;
+ SequenceChecker thread_checker_;
// This object is the global entry point of the OpenSL ES API.
// After creating the engine object, the application can obtain this object‘s
// SLEngineItf interface. This interface contains creation methods for all
diff --git a/sdk/android/src/jni/audio_device/opensles_player.h b/sdk/android/src/jni/audio_device/opensles_player.h
index a2a49f986f..9b3c34d66a 100644
--- a/sdk/android/src/jni/audio_device/opensles_player.h
+++ b/sdk/android/src/jni/audio_device/opensles_player.h
@@ -21,7 +21,7 @@
#include "modules/audio_device/audio_device_buffer.h"
#include "modules/audio_device/fine_audio_buffer.h"
#include "modules/audio_device/include/audio_device_defines.h"
-#include "rtc_base/thread_checker.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "sdk/android/src/jni/audio_device/audio_common.h"
#include "sdk/android/src/jni/audio_device/audio_device_module.h"
#include "sdk/android/src/jni/audio_device/opensles_common.h"
@@ -121,12 +121,12 @@ class OpenSLESPlayer : public AudioOutput {
// Ensures that methods are called from the same thread as this object is
// created on.
- rtc::ThreadChecker thread_checker_;
+ SequenceChecker thread_checker_;
// Stores thread ID in first call to SimpleBufferQueueCallback() from internal
// non-application thread which is not attached to the Dalvik JVM.
// Detached during construction of this object.
- rtc::ThreadChecker thread_checker_opensles_;
+ SequenceChecker thread_checker_opensles_;
const AudioParameters audio_parameters_;
diff --git a/sdk/android/src/jni/audio_device/opensles_recorder.h b/sdk/android/src/jni/audio_device/opensles_recorder.h
index 4856fd0155..d5e269a189 100644
--- a/sdk/android/src/jni/audio_device/opensles_recorder.h
+++ b/sdk/android/src/jni/audio_device/opensles_recorder.h
@@ -21,7 +21,7 @@
#include "modules/audio_device/audio_device_buffer.h"
#include "modules/audio_device/fine_audio_buffer.h"
#include "modules/audio_device/include/audio_device_defines.h"
-#include "rtc_base/thread_checker.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "sdk/android/src/jni/audio_device/audio_common.h"
#include "sdk/android/src/jni/audio_device/audio_device_module.h"
#include "sdk/android/src/jni/audio_device/opensles_common.h"
@@ -128,12 +128,12 @@ class OpenSLESRecorder : public AudioInput {
// Ensures that methods are called from the same thread as this object is
// created on.
- rtc::ThreadChecker thread_checker_;
+ SequenceChecker thread_checker_;
// Stores thread ID in first call to SimpleBufferQueueCallback() from internal
// non-application thread which is not attached to the Dalvik JVM.
// Detached during construction of this object.
- rtc::ThreadChecker thread_checker_opensles_;
+ SequenceChecker thread_checker_opensles_;
const AudioParameters audio_parameters_;
diff --git a/sdk/android/src/jni/video_decoder_wrapper.h b/sdk/android/src/jni/video_decoder_wrapper.h
index e8d0fec4e6..af9fe2d05b 100644
--- a/sdk/android/src/jni/video_decoder_wrapper.h
+++ b/sdk/android/src/jni/video_decoder_wrapper.h
@@ -20,7 +20,7 @@
#include "common_video/h264/h264_bitstream_parser.h"
#include "rtc_base/race_checker.h"
#include "rtc_base/synchronization/mutex.h"
-#include "rtc_base/thread_checker.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "sdk/android/src/jni/jni_helpers.h"
namespace webrtc {
@@ -83,7 +83,7 @@ class VideoDecoderWrapper : public VideoDecoder {
const ScopedJavaGlobalRef<jobject> decoder_;
const std::string implementation_name_;
- rtc::ThreadChecker decoder_thread_checker_;
+ SequenceChecker decoder_thread_checker_;
// Callbacks must be executed sequentially on an arbitrary thread. We do not
// own this thread so a thread checker cannot be used.
rtc::RaceChecker callback_race_checker_;
diff --git a/sdk/objc/native/src/audio/audio_device_ios.h b/sdk/objc/native/src/audio/audio_device_ios.h
index ac2dc34b9a..d50acee24d 100644
--- a/sdk/objc/native/src/audio/audio_device_ios.h
+++ b/sdk/objc/native/src/audio/audio_device_ios.h
@@ -16,9 +16,9 @@
#include "audio_session_observer.h"
#include "modules/audio_device/audio_device_generic.h"
#include "rtc_base/buffer.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/thread.h"
#include "rtc_base/thread_annotations.h"
-#include "rtc_base/thread_checker.h"
#include "sdk/objc/base/RTCMacros.h"
#include "voice_processing_audio_unit.h"
@@ -210,10 +210,10 @@ class AudioDeviceIOS : public AudioDeviceGeneric,
// Ensures that methods are called from the same thread as this object is
// created on.
- rtc::ThreadChecker thread_checker_;
+ SequenceChecker thread_checker_;
// Native I/O audio thread checker.
- rtc::ThreadChecker io_thread_checker_;
+ SequenceChecker io_thread_checker_;
// Thread that this object is created on.
rtc::Thread* thread_;
diff --git a/test/network/emulated_network_manager.h b/test/network/emulated_network_manager.h
index 2321af0e04..d564e4166e 100644
--- a/test/network/emulated_network_manager.h
+++ b/test/network/emulated_network_manager.h
@@ -20,8 +20,8 @@
#include "rtc_base/ip_address.h"
#include "rtc_base/network.h"
#include "rtc_base/socket_server.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/thread.h"
-#include "rtc_base/thread_checker.h"
#include "test/network/network_emulation.h"
namespace webrtc {
diff --git a/test/network/network_emulation.h b/test/network/network_emulation.h
index 84872cb017..78d53c1e9c 100644
--- a/test/network/network_emulation.h
+++ b/test/network/network_emulation.h
@@ -33,7 +33,6 @@
#include "rtc_base/task_queue_for_test.h"
#include "rtc_base/task_utils/repeating_task.h"
#include "rtc_base/thread_annotations.h"
-#include "rtc_base/thread_checker.h"
#include "system_wrappers/include/clock.h"
namespace webrtc {
@@ -525,7 +524,7 @@ class EmulatedEndpointImpl : public EmulatedEndpoint {
uint16_t NextPort() RTC_EXCLUSIVE_LOCKS_REQUIRED(receiver_lock_);
rtc::RecursiveCriticalSection receiver_lock_;
- rtc::ThreadChecker enabled_state_checker_;
+ SequenceChecker enabled_state_checker_;
const uint64_t id_;
const std::string log_name_;
diff --git a/test/time_controller/simulated_time_controller.h b/test/time_controller/simulated_time_controller.h
index 6c6dbfab9d..dbe089ca99 100644
--- a/test/time_controller/simulated_time_controller.h
+++ b/test/time_controller/simulated_time_controller.h
@@ -24,8 +24,8 @@
#include "rtc_base/fake_clock.h"
#include "rtc_base/platform_thread_types.h"
#include "rtc_base/synchronization/mutex.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/synchronization/yield_policy.h"
-#include "rtc_base/thread_checker.h"
namespace webrtc {
namespace sim_time_impl {
diff --git a/video/call_stats.h b/video/call_stats.h
index 3bfb632446..f4a87c3015 100644
--- a/video/call_stats.h
+++ b/video/call_stats.h
@@ -19,7 +19,7 @@
#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
#include "rtc_base/constructor_magic.h"
#include "rtc_base/synchronization/mutex.h"
-#include "rtc_base/thread_checker.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "system_wrappers/include/clock.h"
namespace webrtc {
@@ -110,8 +110,8 @@ class CallStats : public Module, public RtcpRttStats {
// for the observers_ list, which makes the most common case lock free.
std::list<CallStatsObserver*> observers_;
- rtc::ThreadChecker construction_thread_checker_;
- rtc::ThreadChecker process_thread_checker_;
+ SequenceChecker construction_thread_checker_;
+ SequenceChecker process_thread_checker_;
ProcessThread* const process_thread_;
bool process_thread_running_ RTC_GUARDED_BY(construction_thread_checker_);
diff --git a/video/receive_statistics_proxy.h b/video/receive_statistics_proxy.h
index 8b94c32b69..1475b0c451 100644
--- a/video/receive_statistics_proxy.h
+++ b/video/receive_statistics_proxy.h
@@ -26,8 +26,8 @@
#include "rtc_base/rate_statistics.h"
#include "rtc_base/rate_tracker.h"
#include "rtc_base/synchronization/mutex.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/thread_annotations.h"
-#include "rtc_base/thread_checker.h"
#include "video/quality_threshold.h"
#include "video/stats_counter.h"
#include "video/video_quality_observer.h"
@@ -196,9 +196,9 @@ class ReceiveStatisticsProxy : public VCMReceiveStatisticsCallback,
RTC_GUARDED_BY(&mutex_);
absl::optional<int64_t> last_estimated_playout_time_ms_
RTC_GUARDED_BY(&mutex_);
- rtc::ThreadChecker decode_thread_;
- rtc::ThreadChecker network_thread_;
- rtc::ThreadChecker main_thread_;
+ SequenceChecker decode_thread_;
+ SequenceChecker network_thread_;
+ SequenceChecker main_thread_;
};
} // namespace webrtc
diff --git a/video/receive_statistics_proxy2.h b/video/receive_statistics_proxy2.h
index e9950c5e84..930ee641f2 100644
--- a/video/receive_statistics_proxy2.h
+++ b/video/receive_statistics_proxy2.h
@@ -31,7 +31,6 @@
#include "rtc_base/system/no_unique_address.h"
#include "rtc_base/task_utils/pending_task_safety_flag.h"
#include "rtc_base/thread_annotations.h"
-#include "rtc_base/thread_checker.h"
#include "video/quality_threshold.h"
#include "video/stats_counter.h"
#include "video/video_quality_observer2.h"
@@ -215,7 +214,7 @@ class ReceiveStatisticsProxy : public VCMReceiveStatisticsCallback,
ScopedTaskSafety task_safety_;
RTC_NO_UNIQUE_ADDRESS SequenceChecker decode_queue_;
- rtc::ThreadChecker main_thread_;
+ SequenceChecker main_thread_;
RTC_NO_UNIQUE_ADDRESS SequenceChecker incoming_render_queue_;
};
diff --git a/video/rtp_streams_synchronizer.h b/video/rtp_streams_synchronizer.h
index 732c9a7d77..b04d6f937b 100644
--- a/video/rtp_streams_synchronizer.h
+++ b/video/rtp_streams_synchronizer.h
@@ -18,7 +18,7 @@
#include "modules/include/module.h"
#include "rtc_base/synchronization/mutex.h"
-#include "rtc_base/thread_checker.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "video/stream_synchronization.h"
namespace webrtc {
@@ -57,7 +57,7 @@ class RtpStreamsSynchronizer : public Module {
StreamSynchronization::Measurements audio_measurement_ RTC_GUARDED_BY(mutex_);
StreamSynchronization::Measurements video_measurement_ RTC_GUARDED_BY(mutex_);
- rtc::ThreadChecker process_thread_checker_;
+ SequenceChecker process_thread_checker_;
int64_t last_sync_time_ RTC_GUARDED_BY(&process_thread_checker_);
int64_t last_stats_log_ms_ RTC_GUARDED_BY(&process_thread_checker_);
};
diff --git a/video/rtp_video_stream_receiver.h b/video/rtp_video_stream_receiver.h
index 40958c48ec..ba863a3652 100644
--- a/video/rtp_video_stream_receiver.h
+++ b/video/rtp_video_stream_receiver.h
@@ -48,7 +48,6 @@
#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/system/no_unique_address.h"
#include "rtc_base/thread_annotations.h"
-#include "rtc_base/thread_checker.h"
#include "video/buffered_frame_decryptor.h"
#include "video/rtp_video_stream_receiver_frame_transformer_delegate.h"
@@ -387,7 +386,7 @@ class RtpVideoStreamReceiver : public LossNotificationSender,
// Used to validate the buffered frame decryptor is always run on the correct
// thread.
- rtc::ThreadChecker network_tc_;
+ SequenceChecker network_tc_;
// Handles incoming encrypted frames and forwards them to the
// rtp_reference_finder if they are decryptable.
std::unique_ptr<BufferedFrameDecryptor> buffered_frame_decryptor_
diff --git a/video/video_send_stream.h b/video/video_send_stream.h
index e10f4ad59b..f3bf6cc8cd 100644
--- a/video/video_send_stream.h
+++ b/video/video_send_stream.h
@@ -21,8 +21,8 @@
#include "call/video_receive_stream.h"
#include "call/video_send_stream.h"
#include "rtc_base/event.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/task_queue.h"
-#include "rtc_base/thread_checker.h"
#include "video/send_delay_stats.h"
#include "video/send_statistics_proxy.h"
@@ -97,7 +97,7 @@ class VideoSendStream : public webrtc::VideoSendStream {
absl::optional<float> GetPacingFactorOverride() const;
- rtc::ThreadChecker thread_checker_;
+ SequenceChecker thread_checker_;
rtc::TaskQueue* const worker_queue_;
rtc::Event thread_sync_event_;
diff --git a/video/video_send_stream_impl.cc b/video/video_send_stream_impl.cc
index aeb197c223..0cf7033d19 100644
--- a/video/video_send_stream_impl.cc
+++ b/video/video_send_stream_impl.cc
@@ -33,7 +33,6 @@
#include "rtc_base/logging.h"
#include "rtc_base/numerics/safe_conversions.h"
#include "rtc_base/synchronization/sequence_checker.h"
-#include "rtc_base/thread_checker.h"
#include "rtc_base/trace_event.h"
#include "system_wrappers/include/clock.h"
#include "system_wrappers/include/field_trial.h"
diff --git a/video/video_stream_decoder_impl.h b/video/video_stream_decoder_impl.h
index 69a8195054..57ddf63d66 100644
--- a/video/video_stream_decoder_impl.h
+++ b/video/video_stream_decoder_impl.h
@@ -21,8 +21,8 @@
#include "modules/video_coding/timing.h"
#include "rtc_base/platform_thread.h"
#include "rtc_base/synchronization/mutex.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/task_queue.h"
-#include "rtc_base/thread_checker.h"
#include "system_wrappers/include/clock.h"
namespace webrtc {
diff --git a/video/video_stream_encoder.h b/video/video_stream_encoder.h
index ff04329fdd..8e32135cfb 100644
--- a/video/video_stream_encoder.h
+++ b/video/video_stream_encoder.h
@@ -37,10 +37,10 @@
#include "rtc_base/numerics/exp_filter.h"
#include "rtc_base/race_checker.h"
#include "rtc_base/rate_statistics.h"
+#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/task_queue.h"
#include "rtc_base/task_utils/pending_task_safety_flag.h"
#include "rtc_base/thread_annotations.h"
-#include "rtc_base/thread_checker.h"
#include "system_wrappers/include/clock.h"
#include "video/adaptation/video_stream_encoder_resource_manager.h"
#include "video/encoder_bitrate_adjuster.h"