Add support HTTP JPEG and MJPEG sources

This commit is contained in:
Alexey Khit
2022-12-01 13:01:48 +03:00
parent 684878b4b1
commit a16d8acc30
18 changed files with 421 additions and 106 deletions

View File

@@ -8,8 +8,6 @@ import (
func Init() {
streams.HandleFunc("rtmp", handle)
streams.HandleFunc("http", handle)
streams.HandleFunc("https", handle)
}
func handle(url string) (streamer.Producer, error) {
@@ -17,5 +15,8 @@ func handle(url string) (streamer.Producer, error) {
if err := conn.Dial(); err != nil {
return nil, err
}
if err := conn.Describe(); err != nil {
return nil, err
}
return conn, nil
}