Update thread annotiation macros in modules to use RTC_ prefix

BUG=webrtc:8198

Review-Url: https://codereview.webrtc.org/3010223002
Cr-Commit-Position: refs/heads/master@{#19728}
This commit is contained in:
danilchap
2017-09-07 07:53:45 -07:00
committed by Commit Bot
parent df23299259
commit 56359be7fe
60 changed files with 878 additions and 837 deletions

View File

@ -52,8 +52,8 @@ bool ffmpeg_initialized = false;
// Called by FFmpeg to do mutex operations if initialized using
// |InitializeFFmpeg|. Disabling thread safety analysis because void** does not
// play nicely with thread_annotations.h macros.
int LockManagerOperation(void** lock, AVLockOp op)
NO_THREAD_SAFETY_ANALYSIS {
int LockManagerOperation(void** lock,
AVLockOp op) RTC_NO_THREAD_SAFETY_ANALYSIS {
switch (op) {
case AV_LOCK_CREATE:
*lock = new rtc::CriticalSection();

View File

@ -95,13 +95,15 @@ class VideoCodecTest : public ::testing::Test {
rtc::Event encoded_frame_event_;
rtc::CriticalSection encoded_frame_section_;
rtc::Optional<EncodedImage> encoded_frame_ GUARDED_BY(encoded_frame_section_);
CodecSpecificInfo codec_specific_info_ GUARDED_BY(encoded_frame_section_);
rtc::Optional<EncodedImage> encoded_frame_
RTC_GUARDED_BY(encoded_frame_section_);
CodecSpecificInfo codec_specific_info_ RTC_GUARDED_BY(encoded_frame_section_);
rtc::Event decoded_frame_event_;
rtc::CriticalSection decoded_frame_section_;
rtc::Optional<VideoFrame> decoded_frame_ GUARDED_BY(decoded_frame_section_);
rtc::Optional<uint8_t> decoded_qp_ GUARDED_BY(decoded_frame_section_);
rtc::Optional<VideoFrame> decoded_frame_
RTC_GUARDED_BY(decoded_frame_section_);
rtc::Optional<uint8_t> decoded_qp_ RTC_GUARDED_BY(decoded_frame_section_);
};
} // namespace webrtc

View File

@ -253,8 +253,8 @@ class VideoProcessor {
// Invoked by the callback adapter when a frame has completed decoding.
void FrameDecoded(const webrtc::VideoFrame& image);
bool initialized_ GUARDED_BY(sequence_checker_);
TestConfig config_ GUARDED_BY(sequence_checker_);
bool initialized_ RTC_GUARDED_BY(sequence_checker_);
TestConfig config_ RTC_GUARDED_BY(sequence_checker_);
webrtc::VideoEncoder* const encoder_;
webrtc::VideoDecoder* const decoder_;
@ -280,27 +280,27 @@ class VideoProcessor {
FrameWriter* const decoded_frame_writer_;
// Keep track of inputed/encoded/decoded frames, so we can detect frame drops.
int last_inputed_frame_num_ GUARDED_BY(sequence_checker_);
int last_encoded_frame_num_ GUARDED_BY(sequence_checker_);
int last_decoded_frame_num_ GUARDED_BY(sequence_checker_);
int last_inputed_frame_num_ RTC_GUARDED_BY(sequence_checker_);
int last_encoded_frame_num_ RTC_GUARDED_BY(sequence_checker_);
int last_decoded_frame_num_ RTC_GUARDED_BY(sequence_checker_);
// Store an RTP timestamp -> frame number map, since the timestamps are
// based off of the frame rate, which can change mid-test.
std::map<uint32_t, int> rtp_timestamp_to_frame_num_
GUARDED_BY(sequence_checker_);
RTC_GUARDED_BY(sequence_checker_);
// Keep track of if we have excluded the first key frame from packet loss.
bool first_key_frame_has_been_excluded_ GUARDED_BY(sequence_checker_);
bool first_key_frame_has_been_excluded_ RTC_GUARDED_BY(sequence_checker_);
// Keep track of the last successfully decoded frame, since we write that
// frame to disk when decoding fails.
rtc::Buffer last_decoded_frame_buffer_ GUARDED_BY(sequence_checker_);
rtc::Buffer last_decoded_frame_buffer_ RTC_GUARDED_BY(sequence_checker_);
// Statistics.
Stats* stats_;
std::vector<int> num_dropped_frames_ GUARDED_BY(sequence_checker_);
std::vector<int> num_spatial_resizes_ GUARDED_BY(sequence_checker_);
int rate_update_index_ GUARDED_BY(sequence_checker_);
std::vector<int> num_dropped_frames_ RTC_GUARDED_BY(sequence_checker_);
std::vector<int> num_spatial_resizes_ RTC_GUARDED_BY(sequence_checker_);
int rate_update_index_ RTC_GUARDED_BY(sequence_checker_);
rtc::SequencedTaskChecker sequence_checker_;

View File

@ -106,7 +106,7 @@ class Vp9FrameBufferPool {
rtc::CriticalSection buffers_lock_;
// All buffers, in use or ready to be recycled.
std::vector<rtc::scoped_refptr<Vp9FrameBuffer>> allocated_buffers_
GUARDED_BY(buffers_lock_);
RTC_GUARDED_BY(buffers_lock_);
// If more buffers than this are allocated we print warnings and crash if in
// debug mode. VP9 is defined to have 8 reference buffers, of which 3 can be
// referenced by any frame, see