feat: rtsp client

This commit is contained in:
langhuihui
2024-07-02 13:29:07 +08:00
parent bbe1d785ce
commit 87dc204fc0
15 changed files with 137 additions and 74 deletions

24
example/rtsp-pull/main.go Normal file
View File

@@ -0,0 +1,24 @@
package main
import (
"context"
"flag"
"time"
"m7s.live/m7s/v5"
_ "m7s.live/m7s/v5/plugin/debug"
_ "m7s.live/m7s/v5/plugin/hdl"
_ "m7s.live/m7s/v5/plugin/rtsp"
)
func main() {
ctx := context.Background()
var multi bool
flag.BoolVar(&multi, "multi", false, "debug")
flag.Parse()
if multi {
go m7s.Run(ctx, "config1.yaml")
}
time.Sleep(time.Second)
m7s.NewServer().Run(ctx, "config2.yaml")
}