Move have_pending_rtp_data_channel_ to sdp_offer_answer

Also use accessors for the last few member variable references
in PeerConnection.

This completes removing the variable accesses from SdpOfferAnswerHandler
to PeerConnection.

Bug: webrtc:11995
Change-Id: I70c78b43035c15f20559f7a6a5b50c3a613fe907
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186200
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32272}
This commit is contained in:
Harald Alvestrand
2020-09-30 22:17:18 +00:00
committed by Commit Bot
parent c06e374a55
commit 75b9ab6751
4 changed files with 19 additions and 18 deletions

View File

@ -130,6 +130,10 @@ class SdpOfferAnswerHandler {
bool HasNewIceCredentials();
bool IceRestartPending(const std::string& content_name) const;
void UpdateNegotiationNeeded();
void SetHavePendingRtpDataChannel() {
RTC_DCHECK_RUN_ON(signaling_thread());
have_pending_rtp_data_channel_ = true;
}
// Returns the media section in the given session description that is
// associated with the RtpTransceiver. Returns null if none found or this
@ -362,6 +366,10 @@ class SdpOfferAnswerHandler {
rtc::scoped_refptr<MediaStreamInterface> missing_msid_default_stream_
RTC_GUARDED_BY(signaling_thread());
// Used when rolling back RTP data channels.
bool have_pending_rtp_data_channel_ RTC_GUARDED_BY(signaling_thread()) =
false;
rtc::WeakPtrFactory<SdpOfferAnswerHandler> weak_ptr_factory_
RTC_GUARDED_BY(signaling_thread());
};