From 42b983a6067c52e5ae5fad04c4c121ff326f9c42 Mon Sep 17 00:00:00 2001 From: Harald Alvestrand Date: Tue, 19 Oct 2021 21:50:01 +0000 Subject: [PATCH] Add some RTC_GUARDED_BY statements These seem to have been forgotten when modifying sdp_offer_answer.h. It's nice to be consistent. Bug: none Change-Id: Iffc4acbc48c0052141e029dcff4faebedbb22784 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/235726 Reviewed-by: Niels Moller Commit-Queue: Harald Alvestrand Cr-Commit-Position: refs/heads/main@{#35243} --- pc/sdp_offer_answer.h | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/pc/sdp_offer_answer.h b/pc/sdp_offer_answer.h index c89ffd2e6d..6c116f660d 100644 --- a/pc/sdp_offer_answer.h +++ b/pc/sdp_offer_answer.h @@ -555,6 +555,15 @@ class SdpOfferAnswerHandler : public SdpStateProvider, const std::map& bundle_groups_by_mid); + // Updates the error state, signaling if necessary. + void SetSessionError(SessionError error, const std::string& error_desc); + + // Implements AddIceCandidate without reporting usage, but returns the + // particular success/error value that should be reported (and can be utilized + // for other purposes). + AddIceCandidateResult AddIceCandidateInternal( + const IceCandidateInterface* candidate); + // ================================================================== // Access to pc_ variables cricket::ChannelManager* channel_manager() const; @@ -627,14 +636,16 @@ class SdpOfferAnswerHandler : public SdpStateProvider, bool remote_peer_supports_msid_ RTC_GUARDED_BY(signaling_thread()) = false; bool is_negotiation_needed_ RTC_GUARDED_BY(signaling_thread()) = false; - uint32_t negotiation_needed_event_id_ = 0; + uint32_t negotiation_needed_event_id_ RTC_GUARDED_BY(signaling_thread()) = 0; bool update_negotiation_needed_on_empty_chain_ RTC_GUARDED_BY(signaling_thread()) = false; // If PT demuxing is successfully negotiated one time we will allow PT // demuxing for the rest of the session so that PT-based apps default to PT // demuxing in follow-up O/A exchanges. - bool pt_demuxing_has_been_used_audio_ = false; - bool pt_demuxing_has_been_used_video_ = false; + bool pt_demuxing_has_been_used_audio_ RTC_GUARDED_BY(signaling_thread()) = + false; + bool pt_demuxing_has_been_used_video_ RTC_GUARDED_BY(signaling_thread()) = + false; // In Unified Plan, if we encounter remote SDP that does not contain an a=msid // line we create and use a stream with a random ID for our receivers. This is @@ -643,15 +654,6 @@ class SdpOfferAnswerHandler : public SdpStateProvider, rtc::scoped_refptr missing_msid_default_stream_ RTC_GUARDED_BY(signaling_thread()); - // Updates the error state, signaling if necessary. - void SetSessionError(SessionError error, const std::string& error_desc); - - // Implements AddIceCandidate without reporting usage, but returns the - // particular success/error value that should be reported (and can be utilized - // for other purposes). - AddIceCandidateResult AddIceCandidateInternal( - const IceCandidateInterface* candidate); - SessionError session_error_ RTC_GUARDED_BY(signaling_thread()) = SessionError::kNone; std::string session_error_desc_ RTC_GUARDED_BY(signaling_thread()); @@ -674,7 +676,7 @@ class SdpOfferAnswerHandler : public SdpStateProvider, // Note that one can still choose to override this in a MediaEngine // if one wants too. std::unique_ptr - video_bitrate_allocator_factory_; + video_bitrate_allocator_factory_ RTC_GUARDED_BY(signaling_thread()); rtc::WeakPtrFactory weak_ptr_factory_ RTC_GUARDED_BY(signaling_thread());