1
0
mirror of https://gitlab.crans.org/nounous/ghostream.git synced 2025-06-30 15:51:14 +02:00

Put webrtc SDP inside Quality struct

This commit is contained in:
Alexandre Iooss
2020-10-19 21:45:23 +02:00
parent e848d92a1a
commit e1f83a32df
8 changed files with 71 additions and 85 deletions

View File

@ -10,7 +10,6 @@ import (
"strings"
"github.com/markbates/pkger"
"github.com/pion/webrtc/v3"
"gitlab.crans.org/nounous/ghostream/messaging"
)
@ -33,13 +32,6 @@ type Options struct {
var (
cfg *Options
// WebRTC session description channels
remoteSdpChan chan struct {
StreamID string
RemoteDescription webrtc.SessionDescription
}
localSdpChan chan webrtc.SessionDescription
// Preload templates
templates *template.Template
@ -78,13 +70,8 @@ func loadTemplates() error {
}
// Serve HTTP server
func Serve(s *messaging.Streams, rSdpChan chan struct {
StreamID string
RemoteDescription webrtc.SessionDescription
}, lSdpChan chan webrtc.SessionDescription, c *Options) {
func Serve(s *messaging.Streams, c *Options) {
streams = s
remoteSdpChan = rSdpChan
localSdpChan = lSdpChan
cfg = c
if !cfg.Enabled {