allow setting additional properties of streams through description.Stream

This commit is contained in:
aler9
2023-08-16 19:02:49 +02:00
committed by Alessandro Ros
parent 4e000eb2dd
commit cdbecb1f5d
54 changed files with 943 additions and 893 deletions

View File

@@ -6,7 +6,7 @@ import (
"github.com/bluenviron/gortsplib/v4"
"github.com/bluenviron/gortsplib/v4/pkg/base"
"github.com/bluenviron/gortsplib/v4/pkg/media"
"github.com/bluenviron/gortsplib/v4/pkg/description"
)
type server struct {
@@ -99,10 +99,10 @@ func (s *server) OnPlay(ctx *gortsplib.ServerHandlerOnPlayCtx) (*base.Response,
}, nil
}
func (s *server) setStreamReady(medias media.Medias) *gortsplib.ServerStream {
func (s *server) setStreamReady(desc *description.Session) *gortsplib.ServerStream {
s.mutex.Lock()
defer s.mutex.Unlock()
s.stream = gortsplib.NewServerStream(s.s, medias)
s.stream = gortsplib.NewServerStream(s.s, desc)
return s.stream
}