mirror of
https://github.com/aler9/rtsp-simple-server
synced 2025-10-23 23:53:19 +08:00
switch to gortsplib/v4 (#2244)
This commit is contained in:
@@ -6,7 +6,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/abema/go-mp4"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats"
|
||||
"github.com/bluenviron/gortsplib/v4/pkg/format"
|
||||
"github.com/bluenviron/mediacommon/pkg/codecs/h264"
|
||||
"github.com/bluenviron/mediacommon/pkg/codecs/h265"
|
||||
"github.com/bluenviron/mediacommon/pkg/codecs/mpeg4audio"
|
||||
@@ -104,18 +104,18 @@ func TestReadTracks(t *testing.T) {
|
||||
|
||||
for _, ca := range []struct {
|
||||
name string
|
||||
videoTrack formats.Format
|
||||
audioTrack formats.Format
|
||||
videoTrack format.Format
|
||||
audioTrack format.Format
|
||||
}{
|
||||
{
|
||||
"video+audio",
|
||||
&formats.H264{
|
||||
&format.H264{
|
||||
PayloadTyp: 96,
|
||||
SPS: h264SPS,
|
||||
PPS: h264PPS,
|
||||
PacketizationMode: 1,
|
||||
},
|
||||
&formats.MPEG4Audio{
|
||||
&format.MPEG4Audio{
|
||||
PayloadTyp: 96,
|
||||
Config: &mpeg4audio.Config{
|
||||
Type: 2,
|
||||
@@ -129,7 +129,7 @@ func TestReadTracks(t *testing.T) {
|
||||
},
|
||||
{
|
||||
"video",
|
||||
&formats.H264{
|
||||
&format.H264{
|
||||
PayloadTyp: 96,
|
||||
SPS: h264SPS,
|
||||
PPS: h264PPS,
|
||||
@@ -139,13 +139,13 @@ func TestReadTracks(t *testing.T) {
|
||||
},
|
||||
{
|
||||
"metadata without codec id, video+audio",
|
||||
&formats.H264{
|
||||
&format.H264{
|
||||
PayloadTyp: 96,
|
||||
SPS: h264SPS,
|
||||
PPS: h264PPS,
|
||||
PacketizationMode: 1,
|
||||
},
|
||||
&formats.MPEG4Audio{
|
||||
&format.MPEG4Audio{
|
||||
PayloadTyp: 96,
|
||||
Config: &mpeg4audio.Config{
|
||||
Type: 2,
|
||||
@@ -159,7 +159,7 @@ func TestReadTracks(t *testing.T) {
|
||||
},
|
||||
{
|
||||
"metadata without codec id, video only",
|
||||
&formats.H264{
|
||||
&format.H264{
|
||||
PayloadTyp: 96,
|
||||
SPS: h264SPS,
|
||||
PPS: h264PPS,
|
||||
@@ -169,13 +169,13 @@ func TestReadTracks(t *testing.T) {
|
||||
},
|
||||
{
|
||||
"missing metadata, video+audio",
|
||||
&formats.H264{
|
||||
&format.H264{
|
||||
PayloadTyp: 96,
|
||||
SPS: h264SPS,
|
||||
PPS: h264PPS,
|
||||
PacketizationMode: 1,
|
||||
},
|
||||
&formats.MPEG4Audio{
|
||||
&format.MPEG4Audio{
|
||||
PayloadTyp: 96,
|
||||
Config: &mpeg4audio.Config{
|
||||
Type: 2,
|
||||
@@ -190,7 +190,7 @@ func TestReadTracks(t *testing.T) {
|
||||
{
|
||||
"missing metadata, audio",
|
||||
nil,
|
||||
&formats.MPEG4Audio{
|
||||
&format.MPEG4Audio{
|
||||
PayloadTyp: 96,
|
||||
Config: &mpeg4audio.Config{
|
||||
Type: 2,
|
||||
@@ -204,13 +204,13 @@ func TestReadTracks(t *testing.T) {
|
||||
},
|
||||
{
|
||||
"obs studio pre 29.1 h265",
|
||||
&formats.H265{
|
||||
&format.H265{
|
||||
PayloadTyp: 96,
|
||||
VPS: h265VPS,
|
||||
SPS: h265SPS,
|
||||
PPS: h265PPS,
|
||||
},
|
||||
&formats.MPEG4Audio{
|
||||
&format.MPEG4Audio{
|
||||
PayloadTyp: 96,
|
||||
Config: &mpeg4audio.Config{
|
||||
Type: 2,
|
||||
@@ -224,7 +224,7 @@ func TestReadTracks(t *testing.T) {
|
||||
},
|
||||
{
|
||||
"xplit broadcaster",
|
||||
&formats.H265{
|
||||
&format.H265{
|
||||
PayloadTyp: 96,
|
||||
VPS: h265VPS,
|
||||
SPS: h265SPS,
|
||||
@@ -234,7 +234,7 @@ func TestReadTracks(t *testing.T) {
|
||||
},
|
||||
{
|
||||
"obs 30",
|
||||
&formats.H265{
|
||||
&format.H265{
|
||||
PayloadTyp: 96,
|
||||
VPS: h265VPS,
|
||||
SPS: h265SPS,
|
||||
|
||||
Reference in New Issue
Block a user