mirror of
https://github.com/bluenviron/mediamtx
synced 2025-03-11 06:47:58 +00:00
send status 461 instead of error when multicast is used (#198)
This commit is contained in:
parent
f9125fe986
commit
0484e417ee
2
go.mod
2
go.mod
@ -5,7 +5,7 @@ go 1.15
|
||||
require (
|
||||
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
|
||||
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d // indirect
|
||||
github.com/aler9/gortsplib v0.0.0-20210129115125-ec3002e995d9
|
||||
github.com/aler9/gortsplib v0.0.0-20210203222351-9ecea799f5f0
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/fsnotify/fsnotify v1.4.9
|
||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
|
||||
|
4
go.sum
4
go.sum
@ -2,8 +2,8 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafo
|
||||
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d h1:UQZhZ2O0vMHr2cI+DC1Mbh0TJxzA3RcLoMsFw+aXw7E=
|
||||
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
|
||||
github.com/aler9/gortsplib v0.0.0-20210129115125-ec3002e995d9 h1:7iZ8cyijoHTNnebbkO1DYZYSCujBxEPPY7eD//TGbi8=
|
||||
github.com/aler9/gortsplib v0.0.0-20210129115125-ec3002e995d9/go.mod h1:8P09VjpiPJFyfkVosyF5/TY82jNwkMN165NS/7sc32I=
|
||||
github.com/aler9/gortsplib v0.0.0-20210203222351-9ecea799f5f0 h1:GR21cFNTYj4mNdqIz917WqqDQVarc+kKqElBgHXzoG0=
|
||||
github.com/aler9/gortsplib v0.0.0-20210203222351-9ecea799f5f0/go.mod h1:8P09VjpiPJFyfkVosyF5/TY82jNwkMN165NS/7sc32I=
|
||||
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
|
58
main_test.go
58
main_test.go
@ -314,34 +314,40 @@ func TestPublishRead(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestTCPOnly(t *testing.T) {
|
||||
p, ok := testProgram("protocols: [tcp]\n")
|
||||
require.Equal(t, true, ok)
|
||||
defer p.close()
|
||||
func TestAutomaticProtocol(t *testing.T) {
|
||||
for _, source := range []string{
|
||||
"ffmpeg",
|
||||
} {
|
||||
t.Run(source, func(t *testing.T) {
|
||||
p, ok := testProgram("protocols: [tcp]\n")
|
||||
require.Equal(t, true, ok)
|
||||
defer p.close()
|
||||
|
||||
cnt1, err := newContainer("ffmpeg", "source", []string{
|
||||
"-re",
|
||||
"-stream_loop", "-1",
|
||||
"-i", "emptyvideo.ts",
|
||||
"-c", "copy",
|
||||
"-f", "rtsp",
|
||||
"-rtsp_transport", "tcp",
|
||||
"rtsp://" + ownDockerIP + ":8554/teststream",
|
||||
})
|
||||
require.NoError(t, err)
|
||||
defer cnt1.close()
|
||||
switch source {
|
||||
case "ffmpeg":
|
||||
cnt1, err := newContainer("ffmpeg", "source", []string{
|
||||
"-re",
|
||||
"-stream_loop", "-1",
|
||||
"-i", "emptyvideo.ts",
|
||||
"-c", "copy",
|
||||
"-f", "rtsp",
|
||||
"rtsp://" + ownDockerIP + ":8554/teststream",
|
||||
})
|
||||
require.NoError(t, err)
|
||||
defer cnt1.close()
|
||||
}
|
||||
|
||||
cnt2, err := newContainer("ffmpeg", "dest", []string{
|
||||
"-rtsp_transport", "tcp",
|
||||
"-i", "rtsp://" + ownDockerIP + ":8554/teststream",
|
||||
"-vframes", "1",
|
||||
"-f", "image2",
|
||||
"-y", "/dev/null",
|
||||
})
|
||||
require.NoError(t, err)
|
||||
defer cnt2.close()
|
||||
|
||||
require.Equal(t, 0, cnt2.wait())
|
||||
cnt2, err := newContainer("ffmpeg", "dest", []string{
|
||||
"-i", "rtsp://" + ownDockerIP + ":8554/teststream",
|
||||
"-vframes", "1",
|
||||
"-f", "image2",
|
||||
"-y", "/dev/null",
|
||||
})
|
||||
require.NoError(t, err)
|
||||
defer cnt2.close()
|
||||
require.Equal(t, 0, cnt2.wait())
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestPath(t *testing.T) {
|
||||
|
Loading…
Reference in New Issue
Block a user