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

@@ -16,7 +16,7 @@ type sourceManger struct {
m sync.Map
}
func (s *sourceManger) Add(source Source) error {
func (s *sourceManger) add(source Source) error {
_, ok := s.m.LoadOrStore(source.GetID(), source)
if ok {
return fmt.Errorf("the source %s has been exist", source.GetID())