Files
monibuca/plugin/cascade/pkg/pull.go
langhuihui 8a9fffb987 refactor: frame converter and mp4 track improvements
- Refactor frame converter implementation
- Update mp4 track to use ICodex
- General refactoring and code improvements

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-28 19:55:37 +08:00

38 lines
640 B
Go

package cascade
import (
"fmt"
"github.com/quic-go/quic-go"
"m7s.live/v5"
"m7s.live/v5/pkg/config"
flv "m7s.live/v5/plugin/flv/pkg"
)
type Puller struct {
flv.Puller
quic.Connection
}
func (p *Puller) GetPullJob() *m7s.PullJob {
return &p.PullJob
}
func NewCascadePuller(config.Pull) m7s.IPuller {
return &Puller{}
}
func (p *Puller) Start() (err error) {
if err = p.PullJob.Publish(); err != nil {
return
}
var stream quic.Stream
stream, err = p.Connection.OpenStream()
if err != nil {
return
}
p.ReadCloser = stream
_, err = fmt.Fprintf(stream, "%s %s\r\n", "PULLFLV", p.PullJob.Publisher.StreamPath)
return
}