install go2rtc on bob

This commit is contained in:
2026-04-04 19:36:14 +02:00
parent f0b56e63d1
commit ccf88187b8
537 changed files with 69213 additions and 0 deletions
@@ -0,0 +1,26 @@
package wyoming
import (
"net"
"net/url"
"github.com/AlexxIT/go2rtc/pkg/core"
)
func Dial(rawURL string) (core.Producer, error) {
u, err := url.Parse(rawURL)
if err != nil {
return nil, err
}
conn, err := net.DialTimeout("tcp", u.Host, core.ConnDialTimeout)
if err != nil {
return nil, err
}
if u.Query().Get("backchannel") != "1" {
return newProducer(conn), nil
} else {
return newBackchannel(conn), nil
}
}