sink hook单独封装

This commit is contained in:
yangjiechina
2024-04-11 15:08:13 +08:00
parent 598311f21f
commit d820efadaf
6 changed files with 97 additions and 64 deletions

View File

@@ -61,7 +61,7 @@ func (s *sessionImpl) OnPlay(app, stream_ string, response chan utils.HookState)
log.Sugar.Infof("rtmp onplay app:%s stream:%s sink:%v conn:%s", app, stream_, sink.Id(), s.conn.RemoteAddr().String())
sink.Play(func() {
stream.HookPlaying(sink, func() {
s.handle = sink
response <- utils.HookStateOK
}, func(state utils.HookState) {