mirror of
				https://github.com/langhuihui/monibuca.git
				synced 2025-10-31 18:22:34 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			25 lines
		
	
	
		
			410 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			410 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| 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")
 | |
| }
 | 
