Add bubble protocol support
- Register bubble stream handler using go2rtc pkg/bubble - Add default port 80 for bubble scheme
This commit is contained in:
@@ -11,7 +11,7 @@ import (
|
|||||||
|
|
||||||
var defaultPorts = map[string]int{
|
var defaultPorts = map[string]int{
|
||||||
"rtsp": 554, "rtsps": 322, "http": 80, "https": 443,
|
"rtsp": 554, "rtsps": 322, "http": 80, "https": 443,
|
||||||
"rtmp": 1935, "mms": 554, "rtp": 5004,
|
"rtmp": 1935, "mms": 554, "rtp": 5004, "bubble": 80,
|
||||||
}
|
}
|
||||||
|
|
||||||
type StreamParams struct {
|
type StreamParams struct {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/AlexxIT/go2rtc/pkg/bubble"
|
||||||
"github.com/AlexxIT/go2rtc/pkg/core"
|
"github.com/AlexxIT/go2rtc/pkg/core"
|
||||||
"github.com/AlexxIT/go2rtc/pkg/rtsp"
|
"github.com/AlexxIT/go2rtc/pkg/rtsp"
|
||||||
)
|
)
|
||||||
@@ -28,6 +29,13 @@ func init() {
|
|||||||
RegisterSource("rtsp", rtspHandler)
|
RegisterSource("rtsp", rtspHandler)
|
||||||
RegisterSource("rtsps", rtspHandler)
|
RegisterSource("rtsps", rtspHandler)
|
||||||
RegisterSource("rtspx", rtspHandler)
|
RegisterSource("rtspx", rtspHandler)
|
||||||
|
RegisterSource("bubble", bubbleHandler)
|
||||||
|
}
|
||||||
|
|
||||||
|
// bubbleHandler -- Dial handles TCP connect, HTTP handshake, XML parsing, and auth.
|
||||||
|
// ex. "bubble://admin:pass@192.168.1.100:80/bubble/live?ch=0&stream=0"
|
||||||
|
func bubbleHandler(rawURL string) (core.Producer, error) {
|
||||||
|
return bubble.Dial(rawURL)
|
||||||
}
|
}
|
||||||
|
|
||||||
// rtspHandler -- Dial + Describe. Proves: port open, RTSP responds, auth OK, SDP received.
|
// rtspHandler -- Dial + Describe. Proves: port open, RTSP responds, auth OK, SDP received.
|
||||||
|
|||||||
Reference in New Issue
Block a user