server: use one IP per stream; expose multicast parameters in configuration

This commit is contained in:
aler9
2021-06-19 18:48:32 +02:00
parent 2cff0d51d3
commit 63e2864a67
9 changed files with 210 additions and 89 deletions

View File

@@ -137,9 +137,12 @@ func (sh *serverHandler) OnFrame(ctx *gortsplib.ServerHandlerOnFrameCtx) {
func main() {
// configure server
s := &gortsplib.Server{
Handler: &serverHandler{},
UDPRTPAddress: ":8000",
UDPRTCPAddress: ":8001",
Handler: &serverHandler{},
UDPRTPAddress: ":8000",
UDPRTCPAddress: ":8001",
MulticastIPRange: "244.1.0.0/16",
MulticastRTPPort: 8002,
MulticastRTCPPort: 8003,
}
// start server and wait until a fatal error