支持GB28181三种推流

This commit is contained in:
yangjiechina
2024-05-03 22:50:45 +08:00
parent 43fd14b219
commit b4487b95cb
38 changed files with 2634 additions and 362 deletions

View File

@@ -25,8 +25,6 @@ type ISink interface {
Protocol() Protocol
ProtocolStr() string
// State 获取Sink状态, 调用前外部必须手动加锁
State() SessionState
@@ -133,10 +131,6 @@ func (s *SinkImpl) Protocol() Protocol {
return s.Protocol_
}
func (s *SinkImpl) ProtocolStr() string {
return streamTypeToStr(s.Protocol_)
}
func (s *SinkImpl) Lock() {
s.lock.Lock()
}
@@ -213,5 +207,5 @@ func (s *SinkImpl) Close() {
}
func (s *SinkImpl) PrintInfo() string {
return fmt.Sprintf("%s-%v source:%s", s.ProtocolStr(), s.Id_, s.SourceId_)
return fmt.Sprintf("%s-%v source:%s", s.Protocol().ToString(), s.Id_, s.SourceId_)
}