feat: read ps dump

This commit is contained in:
langhuihui
2024-07-24 09:12:14 +08:00
parent 7bc2c16f80
commit 0fad4c3b8f
41 changed files with 2127 additions and 383 deletions

View File

@@ -24,19 +24,17 @@ var _ = m7s.InstallPlugin[RTMPPlugin](m7s.DefaultYaml(`tcp:
func (p *RTMPPlugin) OnInit() error {
for streamPath, url := range p.GetCommonConf().PullOnStart {
go p.Pull(streamPath, url, &Client{})
go p.Pull(streamPath, url)
}
return nil
}
func (p *RTMPPlugin) OnPull(puller *m7s.Puller) {
p.OnPublish(&puller.Publisher)
func (p *RTMPPlugin) NewPullHandler() m7s.PullHandler {
return &Client{}
}
func (p *RTMPPlugin) OnPublish(puber *m7s.Publisher) {
if remoteURL, ok := p.GetCommonConf().PushList[puber.StreamPath]; ok {
go p.Push(puber.StreamPath, remoteURL, &Client{})
}
func (p *RTMPPlugin) NewPushHandler() m7s.PushHandler {
return &Client{}
}
func (p *RTMPPlugin) OnTCPConnect(conn *net.TCPConn) {