mirror of
https://github.com/aler9/rtsp-simple-server
synced 2025-10-05 15:46:58 +08:00
switch to gortsplib/v4 (#2244)
This commit is contained in:
@@ -4,9 +4,9 @@ import (
|
||||
"bufio"
|
||||
"testing"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/url"
|
||||
"github.com/bluenviron/gortsplib/v4"
|
||||
"github.com/bluenviron/gortsplib/v4/pkg/format"
|
||||
"github.com/bluenviron/gortsplib/v4/pkg/url"
|
||||
"github.com/bluenviron/mediacommon/pkg/formats/mpegts"
|
||||
"github.com/datarhei/gosrt"
|
||||
"github.com/pion/rtp"
|
||||
@@ -82,13 +82,13 @@ func TestSRTSource(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
defer c.Close()
|
||||
|
||||
medias, baseURL, _, err := c.Describe(u)
|
||||
desc, _, err := c.Describe(u)
|
||||
require.NoError(t, err)
|
||||
|
||||
var forma *formats.H264
|
||||
medi := medias.FindFormat(&forma)
|
||||
var forma *format.H264
|
||||
medi := desc.FindFormat(&forma)
|
||||
|
||||
_, err = c.Setup(medi, baseURL, 0, 0)
|
||||
_, err = c.Setup(desc.BaseURL, medi, 0, 0)
|
||||
require.NoError(t, err)
|
||||
|
||||
c.OnPacketRTP(medi, forma, func(pkt *rtp.Packet) {
|
||||
|
Reference in New Issue
Block a user