Allow RTP module thread checking to know PacketRouter status.
Since https://webrtc-review.googlesource.com/c/src/+/228433 both audio and video now only call Get/SetRtpState while not registered to the packet router. We can thus remove the lock around packet sequencer and just use a thread checker. Bug: webrtc:11340 Change-Id: Ie6865cc96c36208700c31a75747ff4dd992ce68d Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/228435 Commit-Queue: Erik Språng <sprang@webrtc.org> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Cr-Commit-Position: refs/heads/master@{#34755}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
05a9e5abd3
commit
b6bbdeb24d
@ -68,6 +68,10 @@ void PacketRouter::AddSendRtpModule(RtpRtcpInterface* rtp_module,
|
||||
void PacketRouter::AddSendRtpModuleToMap(RtpRtcpInterface* rtp_module,
|
||||
uint32_t ssrc) {
|
||||
RTC_DCHECK(send_modules_map_.find(ssrc) == send_modules_map_.end());
|
||||
|
||||
// Signal to module that the pacer thread is attached and can send packets.
|
||||
rtp_module->OnPacketSendingThreadSwitched();
|
||||
|
||||
// Always keep the audio modules at the back of the list, so that when we
|
||||
// iterate over the modules in order to find one that can send padding we
|
||||
// will prioritize video. This is important to make sure they are counted
|
||||
@ -102,6 +106,7 @@ void PacketRouter::RemoveSendRtpModule(RtpRtcpInterface* rtp_module) {
|
||||
if (last_send_module_ == rtp_module) {
|
||||
last_send_module_ = nullptr;
|
||||
}
|
||||
rtp_module->OnPacketSendingThreadSwitched();
|
||||
}
|
||||
|
||||
void PacketRouter::AddReceiveRtpModule(RtcpFeedbackSenderInterface* rtcp_sender,
|
||||
|
||||
Reference in New Issue
Block a user