Make VideoSendStream::UpdateActiveSimulcastLayers not block.
UpdateActiveSimulcastLayers has been blocking WebRtcVideoChannel::SetSend which may be called quite frequently during negotiations. This CL changes UpdateActiveSimulcastLayers to not synchronize with the transport's task queue to wait for the changes to get applied. This synchronization is quite costly, but so too are other remaining things in VideoSendStream, so we should aim to get rid of the `thread_sync_event_` in VideoSendStream. Bug: webrtc:12840, webrtc:12854 Change-Id: Idb48d29b6b8382881c7c1e6f1d0f5e708dbca30f Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/221203 Commit-Queue: Tommi <tommi@webrtc.org> Reviewed-by: Markus Handell <handellm@webrtc.org> Cr-Commit-Position: refs/heads/master@{#34228}
This commit is contained in:
@ -364,11 +364,6 @@ void VideoSendStreamImpl::StartupVideoSendStream() {
|
||||
}
|
||||
|
||||
void VideoSendStreamImpl::Stop() {
|
||||
if (!rtp_transport_queue_->IsCurrent()) {
|
||||
rtp_transport_queue_->PostTask(
|
||||
ToQueuedTask(transport_queue_safety_, [this] { Stop(); }));
|
||||
return;
|
||||
}
|
||||
RTC_DCHECK_RUN_ON(rtp_transport_queue_);
|
||||
RTC_LOG(LS_INFO) << "VideoSendStreamImpl::Stop";
|
||||
if (!rtp_video_sender_->IsActive())
|
||||
|
||||
Reference in New Issue
Block a user