Add wyoming module

This commit is contained in:
Alex X
2025-04-21 20:30:38 +03:00
parent 7fe23c7bc5
commit 902af5e5d7
12 changed files with 886 additions and 6 deletions
+11 -5
View File
@@ -7,7 +7,7 @@ import (
"github.com/AlexxIT/go2rtc/pkg/core"
)
func (s *Stream) Play(source string) error {
func (s *Stream) Play(urlOrProd any) error {
s.mu.Lock()
for _, producer := range s.producers {
if producer.state == stateInternal && producer.conn != nil {
@@ -16,12 +16,18 @@ func (s *Stream) Play(source string) error {
}
s.mu.Unlock()
if source == "" {
return nil
}
var source string
var src core.Producer
switch urlOrProd.(type) {
case string:
if source = urlOrProd.(string); source == "" {
return nil
}
case core.Producer:
src = urlOrProd.(core.Producer)
}
for _, producer := range s.producers {
if producer.conn == nil {
continue