Add support rawvideo format
This commit is contained in:
@@ -15,6 +15,7 @@ import (
|
||||
"github.com/AlexxIT/go2rtc/pkg/mpegts"
|
||||
"github.com/AlexxIT/go2rtc/pkg/multipart"
|
||||
"github.com/AlexxIT/go2rtc/pkg/wav"
|
||||
"github.com/AlexxIT/go2rtc/pkg/y4m"
|
||||
)
|
||||
|
||||
func Open(r io.Reader) (core.Producer, error) {
|
||||
@@ -32,6 +33,9 @@ func Open(r io.Reader) (core.Producer, error) {
|
||||
case string(b) == wav.FourCC:
|
||||
return wav.Open(rd)
|
||||
|
||||
case string(b) == y4m.FourCC:
|
||||
return y4m.Open(rd)
|
||||
|
||||
case bytes.HasPrefix(b, []byte{0xFF, 0xD8}):
|
||||
return mjpeg.Open(rd)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user