replace new() with initialize() (#490)

This commit is contained in:
Alessandro Ros
2023-12-26 12:48:35 +01:00
committed by GitHub
parent e77b281395
commit 2d0c530d97
37 changed files with 464 additions and 521 deletions

View File

@@ -15,9 +15,7 @@ type server struct {
stream *gortsplib.ServerStream
}
func newServer() *server {
s := &server{}
func (s *server) initialize() {
// configure the server
s.s = &gortsplib.Server{
Handler: s,
@@ -28,8 +26,6 @@ func newServer() *server {
MulticastRTPPort: 8002,
MulticastRTCPPort: 8003,
}
return s
}
// called when a connection is opened.