Remove playout delay lock.

Now update the playout delay and related stats on the worker thread.

This was previously reviewed here:
https://webrtc-review.googlesource.com/c/src/+/172929/

With the exception of reducing unnecessarily broad
lock scope in one function in rtp_rtcp_impl.cc
and added comments in rtp_streams_synchronizer.h

Bug: webrtc:11489
Change-Id: I77807b5da2accfe774255d9409542d358f288993
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174200
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31193}
This commit is contained in:
Tommi
2020-05-08 20:59:05 +02:00
committed by Commit Bot
parent 33d81a05eb
commit c623495fd1
4 changed files with 52 additions and 33 deletions

View File

@ -774,8 +774,10 @@ std::vector<rtcp::TmmbItem> ModuleRtpRtcpImpl::BoundingSet(bool* tmmbr_owner) {
}
void ModuleRtpRtcpImpl::set_rtt_ms(int64_t rtt_ms) {
rtc::CritScope cs(&critical_section_rtt_);
rtt_ms_ = rtt_ms;
{
rtc::CritScope cs(&critical_section_rtt_);
rtt_ms_ = rtt_ms;
}
if (rtp_sender_) {
rtp_sender_->packet_history.SetRtt(rtt_ms);
}