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}
diff --git a/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc b/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc
index 290df94..b71347e 100644
--- a/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc
+++ b/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc
@@ -52,8 +52,8 @@
 // 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();
diff --git a/webrtc/modules/video_coding/codecs/test/video_codec_test.h b/webrtc/modules/video_coding/codecs/test/video_codec_test.h
index efdac0c..ed2c1a3 100644
--- a/webrtc/modules/video_coding/codecs/test/video_codec_test.h
+++ b/webrtc/modules/video_coding/codecs/test/video_codec_test.h
@@ -95,13 +95,15 @@
 
   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
diff --git a/webrtc/modules/video_coding/codecs/test/videoprocessor.h b/webrtc/modules/video_coding/codecs/test/videoprocessor.h
index 072a396..295d012 100644
--- a/webrtc/modules/video_coding/codecs/test/videoprocessor.h
+++ b/webrtc/modules/video_coding/codecs/test/videoprocessor.h
@@ -253,8 +253,8 @@
   // 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 @@
   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_;
 
diff --git a/webrtc/modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.h b/webrtc/modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.h
index 485dc5f..d75f674 100644
--- a/webrtc/modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.h
+++ b/webrtc/modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.h
@@ -106,7 +106,7 @@
   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
diff --git a/webrtc/modules/video_coding/frame_buffer2.h b/webrtc/modules/video_coding/frame_buffer2.h
index 13dd341..5f5173e 100644
--- a/webrtc/modules/video_coding/frame_buffer2.h
+++ b/webrtc/modules/video_coding/frame_buffer2.h
@@ -129,56 +129,56 @@
   // Updates the minimal and maximal playout delays
   // depending on the frame.
   void UpdatePlayoutDelays(const FrameObject& frame)
-      EXCLUSIVE_LOCKS_REQUIRED(crit_);
+      RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
 
   // Update all directly dependent and indirectly dependent frames and mark
   // them as continuous if all their references has been fulfilled.
   void PropagateContinuity(FrameMap::iterator start)
-      EXCLUSIVE_LOCKS_REQUIRED(crit_);
+      RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
 
   // Marks the frame as decoded and updates all directly dependent frames.
   void PropagateDecodability(const FrameInfo& info)
-      EXCLUSIVE_LOCKS_REQUIRED(crit_);
+      RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
 
   // Advances |last_decoded_frame_it_| to |decoded| and removes old
   // frame info.
   void AdvanceLastDecodedFrame(FrameMap::iterator decoded)
-      EXCLUSIVE_LOCKS_REQUIRED(crit_);
+      RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
 
   // Update the corresponding FrameInfo of |frame| and all FrameInfos that
   // |frame| references.
   // Return false if |frame| will never be decodable, true otherwise.
   bool UpdateFrameInfoWithIncomingFrame(const FrameObject& frame,
                                         FrameMap::iterator info)
-      EXCLUSIVE_LOCKS_REQUIRED(crit_);
+      RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
 
-  void UpdateJitterDelay() EXCLUSIVE_LOCKS_REQUIRED(crit_);
+  void UpdateJitterDelay() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
 
-  void UpdateTimingFrameInfo() EXCLUSIVE_LOCKS_REQUIRED(crit_);
+  void UpdateTimingFrameInfo() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
 
-  void ClearFramesAndHistory() EXCLUSIVE_LOCKS_REQUIRED(crit_);
+  void ClearFramesAndHistory() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
 
   bool HasBadRenderTiming(const FrameObject& frame, int64_t now_ms)
-      EXCLUSIVE_LOCKS_REQUIRED(crit_);
+      RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
 
-  FrameMap frames_ GUARDED_BY(crit_);
+  FrameMap frames_ RTC_GUARDED_BY(crit_);
 
   rtc::CriticalSection crit_;
   Clock* const clock_;
   rtc::Event new_continuous_frame_event_;
-  VCMJitterEstimator* const jitter_estimator_ GUARDED_BY(crit_);
-  VCMTiming* const timing_ GUARDED_BY(crit_);
-  VCMInterFrameDelay inter_frame_delay_ GUARDED_BY(crit_);
-  uint32_t last_decoded_frame_timestamp_ GUARDED_BY(crit_);
-  FrameMap::iterator last_decoded_frame_it_ GUARDED_BY(crit_);
-  FrameMap::iterator last_continuous_frame_it_ GUARDED_BY(crit_);
-  FrameMap::iterator next_frame_it_ GUARDED_BY(crit_);
-  int num_frames_history_ GUARDED_BY(crit_);
-  int num_frames_buffered_ GUARDED_BY(crit_);
-  bool stopped_ GUARDED_BY(crit_);
-  VCMVideoProtection protection_mode_ GUARDED_BY(crit_);
+  VCMJitterEstimator* const jitter_estimator_ RTC_GUARDED_BY(crit_);
+  VCMTiming* const timing_ RTC_GUARDED_BY(crit_);
+  VCMInterFrameDelay inter_frame_delay_ RTC_GUARDED_BY(crit_);
+  uint32_t last_decoded_frame_timestamp_ RTC_GUARDED_BY(crit_);
+  FrameMap::iterator last_decoded_frame_it_ RTC_GUARDED_BY(crit_);
+  FrameMap::iterator last_continuous_frame_it_ RTC_GUARDED_BY(crit_);
+  FrameMap::iterator next_frame_it_ RTC_GUARDED_BY(crit_);
+  int num_frames_history_ RTC_GUARDED_BY(crit_);
+  int num_frames_buffered_ RTC_GUARDED_BY(crit_);
+  bool stopped_ RTC_GUARDED_BY(crit_);
+  VCMVideoProtection protection_mode_ RTC_GUARDED_BY(crit_);
   VCMReceiveStatisticsCallback* const stats_callback_;
-  int64_t last_log_non_decoded_ms_ GUARDED_BY(crit_);
+  int64_t last_log_non_decoded_ms_ RTC_GUARDED_BY(crit_);
 
   RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(FrameBuffer);
 };
diff --git a/webrtc/modules/video_coding/generic_decoder.h b/webrtc/modules/video_coding/generic_decoder.h
index fcfea77..c8122da 100644
--- a/webrtc/modules/video_coding/generic_decoder.h
+++ b/webrtc/modules/video_coding/generic_decoder.h
@@ -69,7 +69,7 @@
   VCMReceiveCallback* _receiveCallback = nullptr;
   VCMTiming* _timing;
   rtc::CriticalSection lock_;
-  VCMTimestampMap _timestampMap GUARDED_BY(lock_);
+  VCMTimestampMap _timestampMap RTC_GUARDED_BY(lock_);
   uint64_t _lastReceivedPictureID;
   int64_t ntp_offset_;
 };
diff --git a/webrtc/modules/video_coding/generic_encoder.h b/webrtc/modules/video_coding/generic_encoder.h
index 20e07c7..32db2e79 100644
--- a/webrtc/modules/video_coding/generic_encoder.h
+++ b/webrtc/modules/video_coding/generic_encoder.h
@@ -77,11 +77,11 @@
   };
   // Separate instance for each simulcast stream or spatial layer.
   std::vector<TimingFramesLayerInfo> timing_frames_info_
-      GUARDED_BY(timing_params_lock_);
-  size_t framerate_ GUARDED_BY(timing_params_lock_);
-  int64_t last_timing_frame_time_ms_ GUARDED_BY(timing_params_lock_);
+      RTC_GUARDED_BY(timing_params_lock_);
+  size_t framerate_ RTC_GUARDED_BY(timing_params_lock_);
+  int64_t last_timing_frame_time_ms_ RTC_GUARDED_BY(timing_params_lock_);
   VideoCodec::TimingFrameTriggerThresholds timing_frames_thresholds_
-      GUARDED_BY(timing_params_lock_);
+      RTC_GUARDED_BY(timing_params_lock_);
 
   // Experiment groups parsed from field trials for realtime video ([0]) and
   // screenshare ([1]). 0 means no group specified. Positive values are
@@ -117,11 +117,11 @@
  private:
   rtc::RaceChecker race_checker_;
 
-  VideoEncoder* const encoder_ GUARDED_BY(race_checker_);
+  VideoEncoder* const encoder_ RTC_GUARDED_BY(race_checker_);
   VCMEncodedFrameCallback* const vcm_encoded_frame_callback_;
   const bool internal_source_;
   rtc::CriticalSection params_lock_;
-  EncoderParameters encoder_params_ GUARDED_BY(params_lock_);
+  EncoderParameters encoder_params_ RTC_GUARDED_BY(params_lock_);
   bool is_screenshare_;
   size_t streams_or_svc_num_;
 };
diff --git a/webrtc/modules/video_coding/jitter_buffer.h b/webrtc/modules/video_coding/jitter_buffer.h
index 44794d2..04fc0cd 100644
--- a/webrtc/modules/video_coding/jitter_buffer.h
+++ b/webrtc/modules/video_coding/jitter_buffer.h
@@ -219,72 +219,72 @@
   VCMFrameBufferEnum GetFrame(const VCMPacket& packet,
                               VCMFrameBuffer** frame,
                               FrameList** frame_list)
-      EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
+      RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
 
   // Returns true if |frame| is continuous in |decoding_state|, not taking
   // decodable frames into account.
   bool IsContinuousInState(const VCMFrameBuffer& frame,
                            const VCMDecodingState& decoding_state) const
-      EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
+      RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
   // Returns true if |frame| is continuous in the |last_decoded_state_|, taking
   // all decodable frames into account.
   bool IsContinuous(const VCMFrameBuffer& frame) const
-      EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
+      RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
   // Looks for frames in |incomplete_frames_| which are continuous in the
   // provided |decoded_state|. Starts the search from the timestamp of
   // |decoded_state|.
   void FindAndInsertContinuousFramesWithState(
       const VCMDecodingState& decoded_state)
-      EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
+      RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
   // Looks for frames in |incomplete_frames_| which are continuous in
   // |last_decoded_state_| taking all decodable frames into account. Starts
   // the search from |new_frame|.
   void FindAndInsertContinuousFrames(const VCMFrameBuffer& new_frame)
-      EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
-  VCMFrameBuffer* NextFrame() const EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
+      RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
+  VCMFrameBuffer* NextFrame() const RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
   // Returns true if the NACK list was updated to cover sequence numbers up to
   // |sequence_number|. If false a key frame is needed to get into a state where
   // we can continue decoding.
   bool UpdateNackList(uint16_t sequence_number)
-      EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
+      RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
   bool TooLargeNackList() const;
   // Returns true if the NACK list was reduced without problem. If false a key
   // frame is needed to get into a state where we can continue decoding.
-  bool HandleTooLargeNackList() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
+  bool HandleTooLargeNackList() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
   bool MissingTooOldPacket(uint16_t latest_sequence_number) const
-      EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
+      RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
   // Returns true if the too old packets was successfully removed from the NACK
   // list. If false, a key frame is needed to get into a state where we can
   // continue decoding.
   bool HandleTooOldPackets(uint16_t latest_sequence_number)
-      EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
+      RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
   // Drops all packets in the NACK list up until |last_decoded_sequence_number|.
   void DropPacketsFromNackList(uint16_t last_decoded_sequence_number);
 
   // Gets an empty frame, creating a new frame if necessary (i.e. increases
   // jitter buffer size).
-  VCMFrameBuffer* GetEmptyFrame() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
+  VCMFrameBuffer* GetEmptyFrame() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
 
   // Attempts to increase the size of the jitter buffer. Returns true on
   // success, false otherwise.
-  bool TryToIncreaseJitterBufferSize() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
+  bool TryToIncreaseJitterBufferSize() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
 
   // Recycles oldest frames until a key frame is found. Used if jitter buffer is
   // completely full. Returns true if a key frame was found.
-  bool RecycleFramesUntilKeyFrame() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
+  bool RecycleFramesUntilKeyFrame() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
 
   // Updates the frame statistics.
   // Counts only complete frames, so decodable incomplete frames will not be
   // counted.
   void CountFrame(const VCMFrameBuffer& frame)
-      EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
+      RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
 
   // Update rolling average of packets per frame.
   void UpdateAveragePacketsPerFrame(int current_number_packets_);
 
   // Cleans the frame list in the JB from old/empty frames.
   // Should only be called prior to actual use.
-  void CleanUpOldOrEmptyFrames() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
+  void CleanUpOldOrEmptyFrames() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
 
   // Returns true if |packet| is likely to have been retransmitted.
   bool IsPacketRetransmitted(const VCMPacket& packet) const;
@@ -302,15 +302,16 @@
   // Returns true if we should wait for retransmissions, false otherwise.
   bool WaitForRetransmissions();
 
-  int NonContinuousOrIncompleteDuration() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
+  int NonContinuousOrIncompleteDuration()
+      RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
 
   uint16_t EstimatedLowSequenceNumber(const VCMFrameBuffer& frame) const;
 
-  void UpdateHistograms() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
+  void UpdateHistograms() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
 
   // Reset frame buffer and return it to free_frames_.
   void RecycleFrameBuffer(VCMFrameBuffer* frame)
-      EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
+      RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
 
   Clock* clock_;
   // If we are running (have started) or not.
@@ -320,14 +321,14 @@
   std::unique_ptr<EventWrapper> frame_event_;
   // Number of allocated frames.
   int max_number_of_frames_;
-  UnorderedFrameList free_frames_ GUARDED_BY(crit_sect_);
-  FrameList decodable_frames_ GUARDED_BY(crit_sect_);
-  FrameList incomplete_frames_ GUARDED_BY(crit_sect_);
-  VCMDecodingState last_decoded_state_ GUARDED_BY(crit_sect_);
+  UnorderedFrameList free_frames_ RTC_GUARDED_BY(crit_sect_);
+  FrameList decodable_frames_ RTC_GUARDED_BY(crit_sect_);
+  FrameList incomplete_frames_ RTC_GUARDED_BY(crit_sect_);
+  VCMDecodingState last_decoded_state_ RTC_GUARDED_BY(crit_sect_);
   bool first_packet_since_reset_;
 
   // Statistics.
-  VCMReceiveStatisticsCallback* stats_callback_ GUARDED_BY(crit_sect_);
+  VCMReceiveStatisticsCallback* stats_callback_ RTC_GUARDED_BY(crit_sect_);
   // Frame counts for each type (key, delta, ...)
   FrameCounts receive_statistics_;
   // Latest calculated frame rates of incoming stream.
@@ -339,13 +340,13 @@
   // Number of packets in a row that have been too old.
   int num_consecutive_old_packets_;
   // Number of packets received.
-  int num_packets_ GUARDED_BY(crit_sect_);
+  int num_packets_ RTC_GUARDED_BY(crit_sect_);
   // Number of duplicated packets received.
-  int num_duplicated_packets_ GUARDED_BY(crit_sect_);
+  int num_duplicated_packets_ RTC_GUARDED_BY(crit_sect_);
   // Number of packets discarded by the jitter buffer.
-  int num_discarded_packets_ GUARDED_BY(crit_sect_);
+  int num_discarded_packets_ RTC_GUARDED_BY(crit_sect_);
   // Time when first packet is received.
-  int64_t time_first_packet_ms_ GUARDED_BY(crit_sect_);
+  int64_t time_first_packet_ms_ RTC_GUARDED_BY(crit_sect_);
 
   // Jitter estimation.
   // Filter for estimating jitter.
diff --git a/webrtc/modules/video_coding/media_optimization.h b/webrtc/modules/video_coding/media_optimization.h
index 1e4179c..bbd018e 100644
--- a/webrtc/modules/video_coding/media_optimization.h
+++ b/webrtc/modules/video_coding/media_optimization.h
@@ -68,40 +68,42 @@
   struct EncodedFrameSample;
   typedef std::list<EncodedFrameSample> FrameSampleList;
 
-  void UpdateIncomingFrameRate() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
+  void UpdateIncomingFrameRate() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
   void PurgeOldFrameSamples(int64_t threshold_ms)
-      EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
-  void UpdateSentFramerate() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
+      RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
+  void UpdateSentFramerate() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
 
   void ProcessIncomingFrameRate(int64_t now)
-      EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
+      RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
 
   // Checks conditions for suspending the video. The method compares
   // |video_target_bitrate_| with the threshold values for suspension, and
   // changes the state of |video_suspended_| accordingly.
-  void CheckSuspendConditions() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
+  void CheckSuspendConditions() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
 
   void SetEncodingDataInternal(int32_t max_bit_rate,
                                uint32_t frame_rate,
                                uint32_t bit_rate)
-      EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
+      RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
 
-  uint32_t InputFrameRateInternal() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
+  uint32_t InputFrameRateInternal() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
 
-  uint32_t SentFrameRateInternal() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
+  uint32_t SentFrameRateInternal() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
 
   // Protect all members.
   rtc::CriticalSection crit_sect_;
 
-  Clock* clock_ GUARDED_BY(crit_sect_);
-  int32_t max_bit_rate_ GUARDED_BY(crit_sect_);
-  float user_frame_rate_ GUARDED_BY(crit_sect_);
-  std::unique_ptr<FrameDropper> frame_dropper_ GUARDED_BY(crit_sect_);
-  int video_target_bitrate_ GUARDED_BY(crit_sect_);
-  float incoming_frame_rate_ GUARDED_BY(crit_sect_);
-  int64_t incoming_frame_times_[kFrameCountHistorySize] GUARDED_BY(crit_sect_);
-  std::list<EncodedFrameSample> encoded_frame_samples_ GUARDED_BY(crit_sect_);
-  uint32_t avg_sent_framerate_ GUARDED_BY(crit_sect_);
+  Clock* clock_ RTC_GUARDED_BY(crit_sect_);
+  int32_t max_bit_rate_ RTC_GUARDED_BY(crit_sect_);
+  float user_frame_rate_ RTC_GUARDED_BY(crit_sect_);
+  std::unique_ptr<FrameDropper> frame_dropper_ RTC_GUARDED_BY(crit_sect_);
+  int video_target_bitrate_ RTC_GUARDED_BY(crit_sect_);
+  float incoming_frame_rate_ RTC_GUARDED_BY(crit_sect_);
+  int64_t incoming_frame_times_[kFrameCountHistorySize] RTC_GUARDED_BY(
+      crit_sect_);
+  std::list<EncodedFrameSample> encoded_frame_samples_
+      RTC_GUARDED_BY(crit_sect_);
+  uint32_t avg_sent_framerate_ RTC_GUARDED_BY(crit_sect_);
 };
 }  // namespace media_optimization
 }  // namespace webrtc
diff --git a/webrtc/modules/video_coding/nack_module.h b/webrtc/modules/video_coding/nack_module.h
index 35be4c2..df04a6b 100644
--- a/webrtc/modules/video_coding/nack_module.h
+++ b/webrtc/modules/video_coding/nack_module.h
@@ -59,22 +59,22 @@
     int retries;
   };
   void AddPacketsToNack(uint16_t seq_num_start, uint16_t seq_num_end)
-      EXCLUSIVE_LOCKS_REQUIRED(crit_);
+      RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
 
   // Removes packets from the nack list until the next keyframe. Returns true
   // if packets were removed.
-  bool RemovePacketsUntilKeyFrame() EXCLUSIVE_LOCKS_REQUIRED(crit_);
+  bool RemovePacketsUntilKeyFrame() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
   std::vector<uint16_t> GetNackBatch(NackFilterOptions options)
-      EXCLUSIVE_LOCKS_REQUIRED(crit_);
+      RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
 
   // Update the reordering distribution.
   void UpdateReorderingStatistics(uint16_t seq_num)
-      EXCLUSIVE_LOCKS_REQUIRED(crit_);
+      RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
 
   // Returns how many packets we have to wait in order to receive the packet
   // with probability |probabilty| or higher.
   int WaitNumberOfPackets(float probability) const
-      EXCLUSIVE_LOCKS_REQUIRED(crit_);
+      RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
 
   rtc::CriticalSection crit_;
   Clock* const clock_;
@@ -85,13 +85,13 @@
   // known thread (e.g. see |initialized_|). Those probably do not need
   // synchronized access.
   std::map<uint16_t, NackInfo, DescendingSeqNumComp<uint16_t>> nack_list_
-      GUARDED_BY(crit_);
+      RTC_GUARDED_BY(crit_);
   std::set<uint16_t, DescendingSeqNumComp<uint16_t>> keyframe_list_
-      GUARDED_BY(crit_);
-  video_coding::Histogram reordering_histogram_ GUARDED_BY(crit_);
-  bool initialized_ GUARDED_BY(crit_);
-  int64_t rtt_ms_ GUARDED_BY(crit_);
-  uint16_t newest_seq_num_ GUARDED_BY(crit_);
+      RTC_GUARDED_BY(crit_);
+  video_coding::Histogram reordering_histogram_ RTC_GUARDED_BY(crit_);
+  bool initialized_ RTC_GUARDED_BY(crit_);
+  int64_t rtt_ms_ RTC_GUARDED_BY(crit_);
+  uint16_t newest_seq_num_ RTC_GUARDED_BY(crit_);
 
   // Only touched on the process thread.
   int64_t next_process_time_ms_;
diff --git a/webrtc/modules/video_coding/packet_buffer.h b/webrtc/modules/video_coding/packet_buffer.h
index e0f058a..56e2363 100644
--- a/webrtc/modules/video_coding/packet_buffer.h
+++ b/webrtc/modules/video_coding/packet_buffer.h
@@ -99,16 +99,16 @@
   Clock* const clock_;
 
   // Tries to expand the buffer.
-  bool ExpandBufferSize() EXCLUSIVE_LOCKS_REQUIRED(crit_);
+  bool ExpandBufferSize() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
 
   // Test if all previous packets has arrived for the given sequence number.
   bool PotentialNewFrame(uint16_t seq_num) const
-      EXCLUSIVE_LOCKS_REQUIRED(crit_);
+      RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
 
   // Test if all packets of a frame has arrived, and if so, creates a frame.
   // Returns a vector of received frames.
   std::vector<std::unique_ptr<RtpFrameObject>> FindFrames(uint16_t seq_num)
-      EXCLUSIVE_LOCKS_REQUIRED(crit_);
+      RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
 
   // Copy the bitstream for |frame| to |destination|.
   // Virtual for testing.
@@ -117,46 +117,48 @@
   // Get the packet with sequence number |seq_num|.
   // Virtual for testing.
   virtual VCMPacket* GetPacket(uint16_t seq_num)
-      EXCLUSIVE_LOCKS_REQUIRED(crit_);
+      RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
 
   // Mark all slots used by |frame| as not used.
   // Virtual for testing.
   virtual void ReturnFrame(RtpFrameObject* frame);
 
-  void UpdateMissingPackets(uint16_t seq_num) EXCLUSIVE_LOCKS_REQUIRED(crit_);
+  void UpdateMissingPackets(uint16_t seq_num)
+      RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
 
   rtc::CriticalSection crit_;
 
   // Buffer size_ and max_size_ must always be a power of two.
-  size_t size_ GUARDED_BY(crit_);
+  size_t size_ RTC_GUARDED_BY(crit_);
   const size_t max_size_;
 
   // The fist sequence number currently in the buffer.
-  uint16_t first_seq_num_ GUARDED_BY(crit_);
+  uint16_t first_seq_num_ RTC_GUARDED_BY(crit_);
 
   // If the packet buffer has received its first packet.
-  bool first_packet_received_ GUARDED_BY(crit_);
+  bool first_packet_received_ RTC_GUARDED_BY(crit_);
 
   // If the buffer is cleared to |first_seq_num_|.
-  bool is_cleared_to_first_seq_num_ GUARDED_BY(crit_);
+  bool is_cleared_to_first_seq_num_ RTC_GUARDED_BY(crit_);
 
   // Buffer that holds the inserted packets.
-  std::vector<VCMPacket> data_buffer_ GUARDED_BY(crit_);
+  std::vector<VCMPacket> data_buffer_ RTC_GUARDED_BY(crit_);
 
   // Buffer that holds the information about which slot that is currently in use
   // and information needed to determine the continuity between packets.
-  std::vector<ContinuityInfo> sequence_buffer_ GUARDED_BY(crit_);
+  std::vector<ContinuityInfo> sequence_buffer_ RTC_GUARDED_BY(crit_);
 
   // Called when a received frame is found.
   OnReceivedFrameCallback* const received_frame_callback_;
 
   // Timestamp (not RTP timestamp) of the last received packet/keyframe packet.
-  rtc::Optional<int64_t> last_received_packet_ms_ GUARDED_BY(crit_);
-  rtc::Optional<int64_t> last_received_keyframe_packet_ms_ GUARDED_BY(crit_);
+  rtc::Optional<int64_t> last_received_packet_ms_ RTC_GUARDED_BY(crit_);
+  rtc::Optional<int64_t> last_received_keyframe_packet_ms_
+      RTC_GUARDED_BY(crit_);
 
-  rtc::Optional<uint16_t> newest_inserted_seq_num_ GUARDED_BY(crit_);
+  rtc::Optional<uint16_t> newest_inserted_seq_num_ RTC_GUARDED_BY(crit_);
   std::set<uint16_t, DescendingSeqNumComp<uint16_t>> missing_packets_
-      GUARDED_BY(crit_);
+      RTC_GUARDED_BY(crit_);
 
   mutable volatile int ref_count_ = 0;
 };
diff --git a/webrtc/modules/video_coding/protection_bitrate_calculator.h b/webrtc/modules/video_coding/protection_bitrate_calculator.h
index d2c1499..d649695 100644
--- a/webrtc/modules/video_coding/protection_bitrate_calculator.h
+++ b/webrtc/modules/video_coding/protection_bitrate_calculator.h
@@ -69,8 +69,8 @@
 
   rtc::CriticalSection crit_sect_;
   std::unique_ptr<media_optimization::VCMLossProtectionLogic> loss_prot_logic_
-      GUARDED_BY(crit_sect_);
-  size_t max_payload_size_ GUARDED_BY(crit_sect_);
+      RTC_GUARDED_BY(crit_sect_);
+  size_t max_payload_size_ RTC_GUARDED_BY(crit_sect_);
 
   RTC_DISALLOW_COPY_AND_ASSIGN(ProtectionBitrateCalculator);
 };
diff --git a/webrtc/modules/video_coding/rtp_frame_reference_finder.h b/webrtc/modules/video_coding/rtp_frame_reference_finder.h
index 601e7c4..f309a5e 100644
--- a/webrtc/modules/video_coding/rtp_frame_reference_finder.h
+++ b/webrtc/modules/video_coding/rtp_frame_reference_finder.h
@@ -79,71 +79,73 @@
   // Find the relevant group of pictures and update its "last-picture-id-with
   // padding" sequence number.
   void UpdateLastPictureIdWithPadding(uint16_t seq_num)
-      EXCLUSIVE_LOCKS_REQUIRED(crit_);
+      RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
 
   // Retry stashed frames until no more complete frames are found.
-  void RetryStashedFrames() EXCLUSIVE_LOCKS_REQUIRED(crit_);
+  void RetryStashedFrames() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
 
   FrameDecision ManageFrameInternal(RtpFrameObject* frame)
-      EXCLUSIVE_LOCKS_REQUIRED(crit_);
+      RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
 
   // Find references for generic frames. If |picture_id| is unspecified
   // then packet sequence numbers will be used to determine the references
   // of the frames.
   FrameDecision ManageFrameGeneric(RtpFrameObject* frame, int picture_id)
-      EXCLUSIVE_LOCKS_REQUIRED(crit_);
+      RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
 
   // Find references for Vp8 frames
   FrameDecision ManageFrameVp8(RtpFrameObject* frame)
-      EXCLUSIVE_LOCKS_REQUIRED(crit_);
+      RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
 
   // Updates necessary layer info state used to determine frame references for
   // Vp8.
   void UpdateLayerInfoVp8(RtpFrameObject* frame)
-      EXCLUSIVE_LOCKS_REQUIRED(crit_);
+      RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
 
   // Find references for Vp9 frames
   FrameDecision ManageFrameVp9(RtpFrameObject* frame)
-      EXCLUSIVE_LOCKS_REQUIRED(crit_);
+      RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
 
   // Check if we are missing a frame necessary to determine the references
   // for this frame.
   bool MissingRequiredFrameVp9(uint16_t picture_id, const GofInfo& info)
-      EXCLUSIVE_LOCKS_REQUIRED(crit_);
+      RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
 
   // Updates which frames that have been received. If there is a gap,
   // missing frames will be added to |missing_frames_for_layer_| or
   // if this is an already missing frame then it will be removed.
   void FrameReceivedVp9(uint16_t picture_id, GofInfo* info)
-      EXCLUSIVE_LOCKS_REQUIRED(crit_);
+      RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
 
   // Check if there is a frame with the up-switch flag set in the interval
   // (|pid_ref|, |picture_id|) with temporal layer smaller than |temporal_idx|.
   bool UpSwitchInIntervalVp9(uint16_t picture_id,
                              uint8_t temporal_idx,
-                             uint16_t pid_ref) EXCLUSIVE_LOCKS_REQUIRED(crit_);
+                             uint16_t pid_ref)
+      RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
 
   // Unwrap |frame|s picture id and its references to 16 bits.
-  void UnwrapPictureIds(RtpFrameObject* frame) EXCLUSIVE_LOCKS_REQUIRED(crit_);
+  void UnwrapPictureIds(RtpFrameObject* frame)
+      RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
 
   // Returns true if the frame is old and should be dropped.
   // TODO(philipel): Remove when VP9 PID/TL0 does not jump mid-stream (should be
   //                 around M59).
   bool Vp9PidTl0Fix(const RtpFrameObject& frame,
                     int16_t* picture_id,
-                    int16_t* tl0_pic_idx) EXCLUSIVE_LOCKS_REQUIRED(crit_);
+                    int16_t* tl0_pic_idx) RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
 
   // TODO(philipel): Remove when VP9 PID/TL0 does not jump mid-stream (should be
   //                 around M59).
   bool DetectVp9PicIdJump(int fixed_pid,
                           int fixed_tl0,
                           uint32_t timestamp) const
-      EXCLUSIVE_LOCKS_REQUIRED(crit_);
+      RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
 
   // TODO(philipel): Remove when VP9 PID/TL0 does not jump mid-stream (should be
   //                 around M59).
   bool DetectVp9Tl0PicIdxJump(int fixed_tl0, uint32_t timestamp) const
-      EXCLUSIVE_LOCKS_REQUIRED(crit_);
+      RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
 
   // For every group of pictures, hold two sequence numbers. The first being
   // the sequence number of the last packet of the last completed frame, and
@@ -152,36 +154,37 @@
   std::map<uint16_t,
            std::pair<uint16_t, uint16_t>,
            DescendingSeqNumComp<uint16_t>>
-      last_seq_num_gop_ GUARDED_BY(crit_);
+      last_seq_num_gop_ RTC_GUARDED_BY(crit_);
 
   // Save the last picture id in order to detect when there is a gap in frames
   // that have not yet been fully received.
-  int last_picture_id_ GUARDED_BY(crit_);
+  int last_picture_id_ RTC_GUARDED_BY(crit_);
 
   // Padding packets that have been received but that are not yet continuous
   // with any group of pictures.
   std::set<uint16_t, DescendingSeqNumComp<uint16_t>> stashed_padding_
-      GUARDED_BY(crit_);
+      RTC_GUARDED_BY(crit_);
 
   // The last unwrapped picture id. Used to unwrap the picture id from a length
   // of |kPicIdLength| to 16 bits.
-  int last_unwrap_ GUARDED_BY(crit_);
+  int last_unwrap_ RTC_GUARDED_BY(crit_);
 
   // Frames earlier than the last received frame that have not yet been
   // fully received.
   std::set<uint16_t, DescendingSeqNumComp<uint16_t, kPicIdLength>>
-      not_yet_received_frames_ GUARDED_BY(crit_);
+      not_yet_received_frames_ RTC_GUARDED_BY(crit_);
 
   // Frames that have been fully received but didn't have all the information
   // needed to determine their references.
-  std::deque<std::unique_ptr<RtpFrameObject>> stashed_frames_ GUARDED_BY(crit_);
+  std::deque<std::unique_ptr<RtpFrameObject>> stashed_frames_
+      RTC_GUARDED_BY(crit_);
 
   // Holds the information about the last completed frame for a given temporal
   // layer given a Tl0 picture index.
   std::map<uint8_t,
            std::array<int16_t, kMaxTemporalLayers>,
            DescendingSeqNumComp<uint8_t>>
-      layer_info_ GUARDED_BY(crit_);
+      layer_info_ RTC_GUARDED_BY(crit_);
 
   // Where the current scalability structure is in the
   // |scalability_structures_| array.
@@ -189,36 +192,36 @@
 
   // Holds received scalability structures.
   std::array<GofInfoVP9, kMaxGofSaved> scalability_structures_
-      GUARDED_BY(crit_);
+      RTC_GUARDED_BY(crit_);
 
   // Holds the the Gof information for a given TL0 picture index.
   std::map<uint8_t, GofInfo, DescendingSeqNumComp<uint8_t>> gof_info_
-      GUARDED_BY(crit_);
+      RTC_GUARDED_BY(crit_);
 
   // Keep track of which picture id and which temporal layer that had the
   // up switch flag set.
   std::map<uint16_t, uint8_t, DescendingSeqNumComp<uint16_t, kPicIdLength>>
-      up_switch_ GUARDED_BY(crit_);
+      up_switch_ RTC_GUARDED_BY(crit_);
 
   // For every temporal layer, keep a set of which frames that are missing.
   std::array<std::set<uint16_t, DescendingSeqNumComp<uint16_t, kPicIdLength>>,
              kMaxTemporalLayers>
-      missing_frames_for_layer_ GUARDED_BY(crit_);
+      missing_frames_for_layer_ RTC_GUARDED_BY(crit_);
 
   // How far frames have been cleared by sequence number. A frame will be
   // cleared if it contains a packet with a sequence number older than
   // |cleared_to_seq_num_|.
-  int cleared_to_seq_num_ GUARDED_BY(crit_);
+  int cleared_to_seq_num_ RTC_GUARDED_BY(crit_);
 
   OnCompleteFrameCallback* frame_callback_;
 
   // Unwrapper used to unwrap generic RTP streams. In a generic stream we derive
   // a picture id from the packet sequence number.
-  SeqNumUnwrapper<uint16_t> generic_unwrapper_ GUARDED_BY(crit_);
+  SeqNumUnwrapper<uint16_t> generic_unwrapper_ RTC_GUARDED_BY(crit_);
 
   // Unwrapper used to unwrap VP8/VP9 streams which have their picture id
   // specified.
-  SeqNumUnwrapper<uint16_t, kPicIdLength> unwrapper_ GUARDED_BY(crit_);
+  SeqNumUnwrapper<uint16_t, kPicIdLength> unwrapper_ RTC_GUARDED_BY(crit_);
 };
 
 }  // namespace video_coding
diff --git a/webrtc/modules/video_coding/timing.h b/webrtc/modules/video_coding/timing.h
index 954a006..bbbb65f 100644
--- a/webrtc/modules/video_coding/timing.h
+++ b/webrtc/modules/video_coding/timing.h
@@ -109,38 +109,38 @@
   enum { kDelayMaxChangeMsPerS = 100 };
 
  protected:
-  int RequiredDecodeTimeMs() const EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
+  int RequiredDecodeTimeMs() const RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
   int64_t RenderTimeMsInternal(uint32_t frame_timestamp, int64_t now_ms) const
-      EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
-  int TargetDelayInternal() const EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
+      RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
+  int TargetDelayInternal() const RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
 
  private:
   void UpdateHistograms() const;
 
   rtc::CriticalSection crit_sect_;
   Clock* const clock_;
-  bool master_ GUARDED_BY(crit_sect_);
-  TimestampExtrapolator* ts_extrapolator_ GUARDED_BY(crit_sect_);
-  std::unique_ptr<VCMCodecTimer> codec_timer_ GUARDED_BY(crit_sect_);
-  int render_delay_ms_ GUARDED_BY(crit_sect_);
+  bool master_ RTC_GUARDED_BY(crit_sect_);
+  TimestampExtrapolator* ts_extrapolator_ RTC_GUARDED_BY(crit_sect_);
+  std::unique_ptr<VCMCodecTimer> codec_timer_ RTC_GUARDED_BY(crit_sect_);
+  int render_delay_ms_ RTC_GUARDED_BY(crit_sect_);
   // Best-effort playout delay range for frames from capture to render.
   // The receiver tries to keep the delay between |min_playout_delay_ms_|
   // and |max_playout_delay_ms_| taking the network jitter into account.
   // A special case is where min_playout_delay_ms_ = max_playout_delay_ms_ = 0,
   // in which case the receiver tries to play the frames as they arrive.
-  int min_playout_delay_ms_ GUARDED_BY(crit_sect_);
-  int max_playout_delay_ms_ GUARDED_BY(crit_sect_);
-  int jitter_delay_ms_ GUARDED_BY(crit_sect_);
-  int current_delay_ms_ GUARDED_BY(crit_sect_);
-  int last_decode_ms_ GUARDED_BY(crit_sect_);
-  uint32_t prev_frame_timestamp_ GUARDED_BY(crit_sect_);
-  rtc::Optional<TimingFrameInfo> timing_frame_info_ GUARDED_BY(crit_sect_);
+  int min_playout_delay_ms_ RTC_GUARDED_BY(crit_sect_);
+  int max_playout_delay_ms_ RTC_GUARDED_BY(crit_sect_);
+  int jitter_delay_ms_ RTC_GUARDED_BY(crit_sect_);
+  int current_delay_ms_ RTC_GUARDED_BY(crit_sect_);
+  int last_decode_ms_ RTC_GUARDED_BY(crit_sect_);
+  uint32_t prev_frame_timestamp_ RTC_GUARDED_BY(crit_sect_);
+  rtc::Optional<TimingFrameInfo> timing_frame_info_ RTC_GUARDED_BY(crit_sect_);
 
   // Statistics.
-  size_t num_decoded_frames_ GUARDED_BY(crit_sect_);
-  size_t num_delayed_decoded_frames_ GUARDED_BY(crit_sect_);
-  int64_t first_decoded_frame_ms_ GUARDED_BY(crit_sect_);
-  uint64_t sum_missed_render_deadline_ms_ GUARDED_BY(crit_sect_);
+  size_t num_decoded_frames_ RTC_GUARDED_BY(crit_sect_);
+  size_t num_delayed_decoded_frames_ RTC_GUARDED_BY(crit_sect_);
+  int64_t first_decoded_frame_ms_ RTC_GUARDED_BY(crit_sect_);
+  uint64_t sum_missed_render_deadline_ms_ RTC_GUARDED_BY(crit_sect_);
 };
 }  // namespace webrtc
 
diff --git a/webrtc/modules/video_coding/utility/quality_scaler.h b/webrtc/modules/video_coding/utility/quality_scaler.h
index 25d39cc..abe6d72 100644
--- a/webrtc/modules/video_coding/utility/quality_scaler.h
+++ b/webrtc/modules/video_coding/utility/quality_scaler.h
@@ -71,16 +71,16 @@
   void ReportQPHigh();
   int64_t GetSamplingPeriodMs() const;
 
-  CheckQPTask* check_qp_task_ GUARDED_BY(&task_checker_);
-  AdaptationObserverInterface* const observer_ GUARDED_BY(&task_checker_);
+  CheckQPTask* check_qp_task_ RTC_GUARDED_BY(&task_checker_);
+  AdaptationObserverInterface* const observer_ RTC_GUARDED_BY(&task_checker_);
   rtc::SequencedTaskChecker task_checker_;
 
   const int64_t sampling_period_ms_;
-  bool fast_rampup_ GUARDED_BY(&task_checker_);
-  MovingAverage average_qp_ GUARDED_BY(&task_checker_);
-  MovingAverage framedrop_percent_ GUARDED_BY(&task_checker_);
+  bool fast_rampup_ RTC_GUARDED_BY(&task_checker_);
+  MovingAverage average_qp_ RTC_GUARDED_BY(&task_checker_);
+  MovingAverage framedrop_percent_ RTC_GUARDED_BY(&task_checker_);
 
-  VideoEncoder::QpThresholds thresholds_ GUARDED_BY(&task_checker_);
+  VideoEncoder::QpThresholds thresholds_ RTC_GUARDED_BY(&task_checker_);
 };
 }  // namespace webrtc
 
diff --git a/webrtc/modules/video_coding/video_coding_impl.cc b/webrtc/modules/video_coding/video_coding_impl.cc
index 7ab5314..7551214 100644
--- a/webrtc/modules/video_coding/video_coding_impl.cc
+++ b/webrtc/modules/video_coding/video_coding_impl.cc
@@ -72,7 +72,7 @@
 
  private:
   rtc::CriticalSection cs_;
-  EncodedImageCallback* callback_ GUARDED_BY(cs_);
+  EncodedImageCallback* callback_ RTC_GUARDED_BY(cs_);
 };
 
 class VideoCodingModuleImpl : public VideoCodingModule {
diff --git a/webrtc/modules/video_coding/video_coding_impl.h b/webrtc/modules/video_coding/video_coding_impl.h
index 37d2b2d..3f4d6ab 100644
--- a/webrtc/modules/video_coding/video_coding_impl.h
+++ b/webrtc/modules/video_coding/video_coding_impl.h
@@ -118,18 +118,18 @@
       VideoBitrateAllocator* bitrate_allocator,
       uint32_t target_bitrate_bps);
   void SetEncoderParameters(EncoderParameters params, bool has_internal_source)
-      EXCLUSIVE_LOCKS_REQUIRED(encoder_crit_);
+      RTC_EXCLUSIVE_LOCKS_REQUIRED(encoder_crit_);
 
   Clock* const clock_;
 
   rtc::CriticalSection encoder_crit_;
   VCMGenericEncoder* _encoder;
   media_optimization::MediaOptimization _mediaOpt;
-  VCMEncodedFrameCallback _encodedFrameCallback GUARDED_BY(encoder_crit_);
+  VCMEncodedFrameCallback _encodedFrameCallback RTC_GUARDED_BY(encoder_crit_);
   EncodedImageCallback* const post_encode_callback_;
   VCMSendStatisticsCallback* const send_stats_callback_;
-  VCMCodecDataBase _codecDataBase GUARDED_BY(encoder_crit_);
-  bool frame_dropper_enabled_ GUARDED_BY(encoder_crit_);
+  VCMCodecDataBase _codecDataBase RTC_GUARDED_BY(encoder_crit_);
+  bool frame_dropper_enabled_ RTC_GUARDED_BY(encoder_crit_);
   VCMProcessTimer _sendStatsTimer;
 
   // Must be accessed on the construction thread of VideoSender.
@@ -137,9 +137,9 @@
   rtc::SequencedTaskChecker sequenced_checker_;
 
   rtc::CriticalSection params_crit_;
-  EncoderParameters encoder_params_ GUARDED_BY(params_crit_);
-  bool encoder_has_internal_source_ GUARDED_BY(params_crit_);
-  std::vector<FrameType> next_frame_types_ GUARDED_BY(params_crit_);
+  EncoderParameters encoder_params_ RTC_GUARDED_BY(params_crit_);
+  bool encoder_has_internal_source_ RTC_GUARDED_BY(params_crit_);
+  std::vector<FrameType> next_frame_types_ RTC_GUARDED_BY(params_crit_);
 };
 
 class VideoReceiver : public Module {
@@ -200,7 +200,7 @@
 
  protected:
   int32_t Decode(const webrtc::VCMEncodedFrame& frame)
-      EXCLUSIVE_LOCKS_REQUIRED(receive_crit_);
+      RTC_EXCLUSIVE_LOCKS_REQUIRED(receive_crit_);
   int32_t RequestKeyFrame();
 
  private:
@@ -211,16 +211,18 @@
   VCMTiming* _timing;
   VCMReceiver _receiver;
   VCMDecodedFrameCallback _decodedFrameCallback;
-  VCMFrameTypeCallback* _frameTypeCallback GUARDED_BY(process_crit_);
-  VCMReceiveStatisticsCallback* _receiveStatsCallback GUARDED_BY(process_crit_);
-  VCMPacketRequestCallback* _packetRequestCallback GUARDED_BY(process_crit_);
+  VCMFrameTypeCallback* _frameTypeCallback RTC_GUARDED_BY(process_crit_);
+  VCMReceiveStatisticsCallback* _receiveStatsCallback
+      RTC_GUARDED_BY(process_crit_);
+  VCMPacketRequestCallback* _packetRequestCallback
+      RTC_GUARDED_BY(process_crit_);
 
   VCMFrameBuffer _frameFromFile;
-  bool _scheduleKeyRequest GUARDED_BY(process_crit_);
-  bool drop_frames_until_keyframe_ GUARDED_BY(process_crit_);
-  size_t max_nack_list_size_ GUARDED_BY(process_crit_);
+  bool _scheduleKeyRequest RTC_GUARDED_BY(process_crit_);
+  bool drop_frames_until_keyframe_ RTC_GUARDED_BY(process_crit_);
+  size_t max_nack_list_size_ RTC_GUARDED_BY(process_crit_);
 
-  VCMCodecDataBase _codecDataBase GUARDED_BY(receive_crit_);
+  VCMCodecDataBase _codecDataBase RTC_GUARDED_BY(receive_crit_);
   EncodedImageCallback* pre_decode_image_callback_;
 
   VCMProcessTimer _receiveStatsTimer;