BIG rewrite stream info

This commit is contained in:
Alex X
2024-06-15 16:46:03 +03:00
parent ecfe802065
commit 96504e2fb0
88 changed files with 1043 additions and 854 deletions
+10 -3
View File
@@ -8,11 +8,10 @@ import (
"net/url"
"time"
"github.com/AlexxIT/go2rtc/pkg/core"
"github.com/AlexxIT/go2rtc/pkg/mpegts"
)
func Dial(rawURL string) (core.Producer, error) {
func Dial(rawURL string) (*mpegts.Producer, error) {
u, err := url.Parse(rawURL)
if err != nil {
return nil, err
@@ -32,7 +31,15 @@ func Dial(rawURL string) (core.Producer, error) {
return nil, err
}
return mpegts.Open(r)
prod, err := mpegts.Open(r)
if err != nil {
return nil, err
}
prod.FormatName = "gopro"
prod.RemoteAddr = u.Host
return prod, nil
}
type listener struct {