Rewrite mpegts producer and consumer

This commit is contained in:
Alexey Khit
2023-08-19 16:37:52 +03:00
parent 24039218a1
commit f67f6e5b9f
17 changed files with 993 additions and 1030 deletions
+4 -5
View File
@@ -12,7 +12,6 @@ import (
"github.com/AlexxIT/go2rtc/internal/streams"
"github.com/AlexxIT/go2rtc/pkg/core"
"github.com/AlexxIT/go2rtc/pkg/mp4"
"github.com/AlexxIT/go2rtc/pkg/mpegts"
"github.com/AlexxIT/go2rtc/pkg/tcp"
"github.com/rs/zerolog"
)
@@ -79,10 +78,10 @@ func handlerStream(w http.ResponseWriter, r *http.Request) {
Medias: medias,
}
} else {
cons = &mpegts.Consumer{
RemoteAddr: tcp.RemoteAddr(r),
UserAgent: r.UserAgent(),
}
//cons = &mpegts.Consumer{
// RemoteAddr: tcp.RemoteAddr(r),
// UserAgent: r.UserAgent(),
//}
}
if err := stream.AddConsumer(cons); err != nil {