mirror of
https://gitlab.crans.org/nounous/ghostream.git
synced 2024-12-22 19:42:20 +00:00
Don't hardcode SRT API value
This commit is contained in:
parent
8520fedf87
commit
8c2a7f73d7
@ -1,14 +1,15 @@
|
|||||||
package srt
|
package srt
|
||||||
|
|
||||||
|
// #include <srt/srt.h>
|
||||||
|
import "C"
|
||||||
import (
|
import (
|
||||||
|
"github.com/haivision/srtgo"
|
||||||
"gitlab.crans.org/nounous/ghostream/auth"
|
"gitlab.crans.org/nounous/ghostream/auth"
|
||||||
"gitlab.crans.org/nounous/ghostream/auth/bypass"
|
"gitlab.crans.org/nounous/ghostream/auth/bypass"
|
||||||
"log"
|
"log"
|
||||||
"net"
|
"net"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/haivision/srtgo"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Options holds web package configuration
|
// Options holds web package configuration
|
||||||
@ -68,7 +69,7 @@ func Serve(cfg *Options, authBackend auth.Backend, forwardingChannel chan Packet
|
|||||||
break // FIXME: should not break here
|
break // FIXME: should not break here
|
||||||
}
|
}
|
||||||
|
|
||||||
streamId, err := s.GetSockOptString(46) // SRTO_STREAMID
|
streamId, err := s.GetSockOptString(C.SRTO_STREAMID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println("Error while fetching stream key:", err)
|
log.Println("Error while fetching stream key:", err)
|
||||||
s.Close()
|
s.Close()
|
||||||
|
Loading…
Reference in New Issue
Block a user