Remove synchronization from VideoSendStream construction.
* Make VideoSendStream and VideoSendStreamImpl construction non-blocking. * Move ownership of the rtp video sender to VideoSendStream. * Most state is constructed in initializer lists. * More state is now const (including VideoSendStreamImpl ptr) * Adding thread checks to classes that appear to have had a race before E.g. RtpTransportControllerSend. The change in threading now actually fixes an issue we weren't aware of. * Moved from using weak_ptr to safety flag and made some PostTask calls cancellable that could potentially have been problematic. Initalizing the flag without thread synchronization is also simpler. This should speed up renegotiation significantly when there are multiple channels. A follow-up change will improve SetSend as well which is another costly step during renegotiation. Bug: webrtc:12840 Change-Id: If4b28da5a085643ce132c7cfcf80a62cd1a625c5 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/221105 Commit-Queue: Tommi <tommi@webrtc.org> Reviewed-by: Markus Handell <handellm@webrtc.org> Cr-Commit-Position: refs/heads/master@{#34224}
This commit is contained in:
@ -651,7 +651,8 @@ void ModuleRtpRtcpImpl2::SetRemoteSSRC(const uint32_t ssrc) {
|
||||
}
|
||||
|
||||
RtpSendRates ModuleRtpRtcpImpl2::GetSendRates() const {
|
||||
RTC_DCHECK_RUN_ON(worker_queue_);
|
||||
// Typically called on the `rtp_transport_queue_` owned by an
|
||||
// RtpTransportControllerSendInterface instance.
|
||||
return rtp_sender_->packet_sender.GetSendRates();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user