Add thread safety annotations for some more PeerConnection members (part 2)

Plus all the annotations that were necessary to make things compile
again.

Bug: webrtc:9987
Change-Id: I7bd9793eb2d474f2ac7ce9e1ed590e67cc2e0a93
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128881
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27255}
This commit is contained in:
Karl Wiberg
2019-03-22 14:27:22 +01:00
committed by Commit Bot
parent fb3be3948d
commit 1e1e102380

View File

@ -512,7 +512,8 @@ class PeerConnection : public PeerConnectionInternal,
rtc::scoped_refptr<RtpReceiverInternal> receiver,
const std::vector<std::string>& stream_ids,
std::vector<rtc::scoped_refptr<MediaStreamInterface>>* added_streams,
std::vector<rtc::scoped_refptr<MediaStreamInterface>>* removed_streams);
std::vector<rtc::scoped_refptr<MediaStreamInterface>>* removed_streams)
RTC_RUN_ON(signaling_thread());
// Runs the algorithm **process the removal of a remote track** specified in
// the WebRTC specification.
@ -526,12 +527,14 @@ class PeerConnection : public PeerConnectionInternal,
rtc::scoped_refptr<RtpTransceiverProxyWithInternal<RtpTransceiver>>
transceiver,
std::vector<rtc::scoped_refptr<RtpTransceiverInterface>>* remove_list,
std::vector<rtc::scoped_refptr<MediaStreamInterface>>* removed_streams);
std::vector<rtc::scoped_refptr<MediaStreamInterface>>* removed_streams)
RTC_RUN_ON(signaling_thread());
void RemoveRemoteStreamsIfEmpty(
const std::vector<rtc::scoped_refptr<MediaStreamInterface>>&
remote_streams,
std::vector<rtc::scoped_refptr<MediaStreamInterface>>* removed_streams);
std::vector<rtc::scoped_refptr<MediaStreamInterface>>* removed_streams)
RTC_RUN_ON(signaling_thread());
void OnNegotiationNeeded();
@ -1112,11 +1115,14 @@ class PeerConnection : public PeerConnectionInternal,
const std::string rtcp_cname_;
// Streams added via AddStream.
rtc::scoped_refptr<StreamCollection> local_streams_;
const rtc::scoped_refptr<StreamCollection> local_streams_
RTC_GUARDED_BY(signaling_thread());
// Streams created as a result of SetRemoteDescription.
rtc::scoped_refptr<StreamCollection> remote_streams_;
const rtc::scoped_refptr<StreamCollection> remote_streams_
RTC_GUARDED_BY(signaling_thread());
std::vector<std::unique_ptr<MediaStreamObserver>> stream_observers_;
std::vector<std::unique_ptr<MediaStreamObserver>> stream_observers_
RTC_GUARDED_BY(signaling_thread());
// These lists store sender info seen in local/remote descriptions.
std::vector<RtpSenderInfo> remote_audio_sender_infos_;