refactor: gb28181仅支持多端口推流, 提升代码健壮性

This commit is contained in:
ydajiang
2025-08-08 17:14:33 +08:00
parent cac5e91471
commit ca52588bae
31 changed files with 415 additions and 684 deletions

View File

@@ -195,6 +195,13 @@ func StartIdleTimer(source Source) *time.Timer {
return idleTimer
}
func CloseSource(id string) {
source := SourceManager.Find(id)
if source != nil {
source.Close()
}
}
// LoopEvent 循环读取事件
func LoopEvent(source Source) {
source.StartTimers(source)