switch to v5 (#890)

* switch from v4 to v5

* remove deprecated entities

* remove "2" suffix from entities

* rename TransportProtocol into Protocol
This commit is contained in:
Alessandro Ros
2025-09-16 11:46:52 +02:00
committed by GitHub
parent f8649f6cf1
commit ec81d388d1
173 changed files with 805 additions and 2615 deletions

View File

@@ -6,10 +6,10 @@ package main
import (
"log"
"github.com/bluenviron/gortsplib/v4"
"github.com/bluenviron/gortsplib/v4/pkg/base"
"github.com/bluenviron/gortsplib/v4/pkg/format"
"github.com/bluenviron/gortsplib/v4/pkg/format/rtph264"
"github.com/bluenviron/gortsplib/v5"
"github.com/bluenviron/gortsplib/v5/pkg/base"
"github.com/bluenviron/gortsplib/v5/pkg/format"
"github.com/bluenviron/gortsplib/v5/pkg/format/rtph264"
"github.com/bluenviron/mediacommon/v2/pkg/codecs/h264"
"github.com/pion/rtp"
)
@@ -35,7 +35,7 @@ func main() {
}
// connect to the server
err = c.Start2()
err = c.Start()
if err != nil {
panic(err)
}
@@ -87,7 +87,7 @@ func main() {
// called when a RTP packet arrives
c.OnPacketRTP(medi, forma, func(pkt *rtp.Packet) {
// decode timestamp
pts, ok := c.PacketPTS2(medi, pkt)
pts, ok := c.PacketPTS(medi, pkt)
if !ok {
log.Printf("waiting for timestamp")
return