update gortsplib
This commit is contained in:
parent
0c1fa7f6d4
commit
738c953a59
4
go.mod
4
go.mod
|
@ -5,7 +5,7 @@ go 1.18
|
|||
require (
|
||||
code.cloudfoundry.org/bytefmt v0.0.0-20211005130812-5bb3c17173e5
|
||||
github.com/abema/go-mp4 v0.8.0
|
||||
github.com/aler9/gortsplib/v2 v2.0.0-20221219125149-ffe8c87c38a5
|
||||
github.com/aler9/gortsplib/v2 v2.0.0-20221222194042-389252b621c0
|
||||
github.com/asticode/go-astits v1.10.1-0.20220319093903-4abe66a9b757
|
||||
github.com/fsnotify/fsnotify v1.4.9
|
||||
github.com/gin-gonic/gin v1.8.1
|
||||
|
@ -66,3 +66,5 @@ require (
|
|||
)
|
||||
|
||||
replace github.com/orcaman/writerseeker => github.com/aler9/writerseeker v0.0.0-20220601075008-6f0e685b9c82
|
||||
|
||||
replace code.cloudfoundry.org/bytefmt => github.com/cloudfoundry/bytefmt v0.0.0-20211005130812-5bb3c17173e5
|
||||
|
|
8
go.sum
8
go.sum
|
@ -1,19 +1,19 @@
|
|||
code.cloudfoundry.org/bytefmt v0.0.0-20211005130812-5bb3c17173e5 h1:tM5+dn2C9xZw1RzgI6WTQW1rGqdUimKB3RFbyu4h6Hc=
|
||||
code.cloudfoundry.org/bytefmt v0.0.0-20211005130812-5bb3c17173e5/go.mod h1:v4VVB6oBMz/c9fRY6vZrwr5xKRWOH5NPDjQZlPk0Gbs=
|
||||
github.com/abema/go-mp4 v0.8.0 h1:JHYkOvTfBpTnqJHiFFOXe8d6wiFy5MtDnA10fgccNqY=
|
||||
github.com/abema/go-mp4 v0.8.0/go.mod h1:vPl9t5ZK7K0x68jh12/+ECWBCXoWuIDtNgPtU2f04ws=
|
||||
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM=
|
||||
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/v2 v2.0.0-20221219125149-ffe8c87c38a5 h1:iqBRD7ZcFB06zxKZawrbbFZav7UA3oJ7Y3rWnyBq7IY=
|
||||
github.com/aler9/gortsplib/v2 v2.0.0-20221219125149-ffe8c87c38a5/go.mod h1:zJ+fWtakOMN6cKV169EMNVBLPTITArrJKu/fyM+dov8=
|
||||
github.com/aler9/gortsplib/v2 v2.0.0-20221222194042-389252b621c0 h1:1+JkgOOGsj3SDfGRbdo/pLERQ+dORBXEUTvg29iLfDM=
|
||||
github.com/aler9/gortsplib/v2 v2.0.0-20221222194042-389252b621c0/go.mod h1:lMdAxc6daduSzVwh75yQkvH9UHCYHpng/vJ8uXKFzdA=
|
||||
github.com/aler9/writerseeker v0.0.0-20220601075008-6f0e685b9c82 h1:9WgSzBLo3a9ToSVV7sRTBYZ1GGOZUpq4+5H3SN0UZq4=
|
||||
github.com/aler9/writerseeker v0.0.0-20220601075008-6f0e685b9c82/go.mod h1:qsMrZCbeBf/mCLOeF16KDkPu4gktn/pOWyaq1aYQE7U=
|
||||
github.com/asticode/go-astikit v0.20.0 h1:+7N+J4E4lWx2QOkRdOf6DafWJMv6O4RRfgClwQokrH8=
|
||||
github.com/asticode/go-astikit v0.20.0/go.mod h1:h4ly7idim1tNhaVkdVBeXQZEE3L0xblP7fCWbgwipF0=
|
||||
github.com/asticode/go-astits v1.10.1-0.20220319093903-4abe66a9b757 h1:mmwJPTHZbtBZQs9OOIQcN9K+TXaIDy0TVvbdtTzqVF0=
|
||||
github.com/asticode/go-astits v1.10.1-0.20220319093903-4abe66a9b757/go.mod h1:DkOWmBNQpnr9mv24KfZjq4JawCFX1FCqjLVGvO0DygQ=
|
||||
github.com/cloudfoundry/bytefmt v0.0.0-20211005130812-5bb3c17173e5 h1:xB7KkA98BcUdzVcwyZxb5R0FGIHxNPHgZOzkjPEY5gM=
|
||||
github.com/cloudfoundry/bytefmt v0.0.0-20211005130812-5bb3c17173e5/go.mod h1:v4VVB6oBMz/c9fRY6vZrwr5xKRWOH5NPDjQZlPk0Gbs=
|
||||
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
|
||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
|
|
|
@ -14,6 +14,7 @@ import (
|
|||
"github.com/aler9/gortsplib/v2/pkg/base"
|
||||
"github.com/aler9/gortsplib/v2/pkg/headers"
|
||||
"github.com/aler9/gortsplib/v2/pkg/media"
|
||||
"github.com/aler9/gortsplib/v2/pkg/sdp"
|
||||
"github.com/aler9/gortsplib/v2/pkg/url"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
@ -132,7 +133,7 @@ func TestCorePathAutoDeletion(t *testing.T) {
|
|||
require.NoError(t, err)
|
||||
require.Equal(t, base.StatusNotFound, res.StatusCode)
|
||||
} else {
|
||||
u, err := url.Parse("rtsp://localhost:8554/mypath/mediaID=0")
|
||||
u, err := url.Parse("rtsp://localhost:8554/mypath/mediaUUID=xxx")
|
||||
require.NoError(t, err)
|
||||
|
||||
byts, _ := base.Request{
|
||||
|
@ -249,6 +250,8 @@ func main() {
|
|||
require.Equal(t, true, ok)
|
||||
defer p1.Close()
|
||||
|
||||
var control string
|
||||
|
||||
func() {
|
||||
conn, err := net.Dial("tcp", "localhost:8554")
|
||||
require.NoError(t, err)
|
||||
|
@ -273,10 +276,15 @@ func main() {
|
|||
err = res.Read(br)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, base.StatusOK, res.StatusCode)
|
||||
|
||||
var desc sdp.SessionDescription
|
||||
err = desc.Unmarshal(res.Body)
|
||||
require.NoError(t, err)
|
||||
control, _ = desc.MediaDescriptions[0].Attribute("control")
|
||||
}
|
||||
|
||||
if ca == "setup" || ca == "describe and setup" {
|
||||
u, err := url.Parse("rtsp://localhost:8554/ondemand/mediaID=0")
|
||||
u, err := url.Parse("rtsp://localhost:8554/ondemand/" + control)
|
||||
require.NoError(t, err)
|
||||
|
||||
byts, _ := base.Request{
|
||||
|
|
Loading…
Reference in New Issue