refactor: description use sync.Map

This commit is contained in:
langhuihui
2024-10-08 20:32:12 +08:00
parent 9cb27f654e
commit f2f65478ad
29 changed files with 233 additions and 197 deletions

View File

@@ -88,11 +88,11 @@ func (s *Sender) sendRTP(pack *mrtp.RTPData, channel int) (err error) {
}
func (s *Sender) Send() (err error) {
s.Stream.AddTask(m7s.CreatePlayTask(s.Subscriber, func(audio *mrtp.Audio) error {
go m7s.PlayBlock(s.Subscriber, func(audio *mrtp.Audio) error {
return s.sendRTP(&audio.RTPData, s.AudioChannelID)
}, func(video *mrtp.Video) error {
return s.sendRTP(&video.RTPData, s.VideoChannelID)
}))
})
for err == nil {
_, _, err = s.NetConnection.Receive(true)
}