mirror of
https://github.com/AlexxIT/go2rtc.git
synced 2025-10-23 08:19:54 +08:00
Rename HTTP-FLV
This commit is contained in:
@@ -8,7 +8,6 @@ import (
|
|||||||
|
|
||||||
func Init() {
|
func Init() {
|
||||||
streams.HandleFunc("rtmp", handle)
|
streams.HandleFunc("rtmp", handle)
|
||||||
// RTMPT (flv over HTTP)
|
|
||||||
streams.HandleFunc("http", handle)
|
streams.HandleFunc("http", handle)
|
||||||
streams.HandleFunc("https", handle)
|
streams.HandleFunc("https", handle)
|
||||||
}
|
}
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
package rtmpt
|
package httpflv
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bufio"
|
"bufio"
|
@@ -5,7 +5,7 @@ import (
|
|||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/AlexxIT/go2rtc/pkg/h264"
|
"github.com/AlexxIT/go2rtc/pkg/h264"
|
||||||
"github.com/AlexxIT/go2rtc/pkg/rtmpt"
|
"github.com/AlexxIT/go2rtc/pkg/httpflv"
|
||||||
"github.com/AlexxIT/go2rtc/pkg/streamer"
|
"github.com/AlexxIT/go2rtc/pkg/streamer"
|
||||||
"github.com/deepch/vdk/av"
|
"github.com/deepch/vdk/av"
|
||||||
"github.com/deepch/vdk/codec/aacparser"
|
"github.com/deepch/vdk/codec/aacparser"
|
||||||
@@ -43,7 +43,7 @@ func NewClient(uri string) *Client {
|
|||||||
|
|
||||||
func (c *Client) Dial() (err error) {
|
func (c *Client) Dial() (err error) {
|
||||||
if strings.HasPrefix(c.URI, "http") {
|
if strings.HasPrefix(c.URI, "http") {
|
||||||
c.conn, err = rtmpt.Dial(c.URI)
|
c.conn, err = httpflv.Dial(c.URI)
|
||||||
} else {
|
} else {
|
||||||
c.conn, err = rtmp.Dial(c.URI)
|
c.conn, err = rtmp.Dial(c.URI)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user