mirror of
https://gitlab.crans.org/nounous/ghostream.git
synced 2025-06-27 19:12:07 +02:00
Use reference to Stream
This commit is contained in:
@ -44,7 +44,7 @@ var (
|
||||
templates *template.Template
|
||||
|
||||
// Streams to get statistics
|
||||
streams map[string]stream.Stream
|
||||
streams map[string]*stream.Stream
|
||||
)
|
||||
|
||||
// Load templates with pkger
|
||||
@ -78,7 +78,7 @@ func loadTemplates() error {
|
||||
}
|
||||
|
||||
// Serve HTTP server
|
||||
func Serve(s map[string]stream.Stream, rSdpChan chan struct {
|
||||
func Serve(s map[string]*stream.Stream, rSdpChan chan struct {
|
||||
StreamID string
|
||||
RemoteDescription webrtc.SessionDescription
|
||||
}, lSdpChan chan webrtc.SessionDescription, c *Options) {
|
||||
|
@ -11,7 +11,7 @@ import (
|
||||
// TestHTTPServe tries to serve a real HTTP server and load some pages
|
||||
func TestHTTPServe(t *testing.T) {
|
||||
// Init streams messaging
|
||||
streams := make(map[string]stream.Stream)
|
||||
streams := make(map[string]*stream.Stream)
|
||||
|
||||
// Create a disabled web server
|
||||
go Serve(streams, nil, nil, &Options{Enabled: false, ListenAddress: "127.0.0.1:8081"})
|
||||
|
Reference in New Issue
Block a user