deprecate rtpav1.Decoder.Decode, rtph264.Decoder.Decode, rtph265.Decoder.Decode

This commit is contained in:
aler9
2023-08-14 13:22:26 +02:00
committed by Alessandro Ros
parent 482b047999
commit 8857e25353
13 changed files with 46 additions and 35 deletions

View File

@@ -101,7 +101,7 @@ func main() {
saveCount := 0
c.OnPacketRTP(medi, forma, func(pkt *rtp.Packet) {
// extract access units from RTP packets
au, _, err := rtpDec.Decode(pkt)
au, _, err := rtpDec.DecodeUntilMarker(pkt)
if err != nil {
if err != rtph264.ErrNonStartingPacketAndNoPrevious && err != rtph264.ErrMorePacketsNeeded {
log.Printf("ERR: %v", err)

View File

@@ -65,7 +65,6 @@ func main() {
// called when a RTP packet arrives
c.OnPacketRTP(medi, forma, func(pkt *rtp.Packet) {
// extract access unit from RTP packets
// DecodeUntilMarker is necessary for the DTS extractor to work
au, pts, err := rtpDec.DecodeUntilMarker(pkt)
if err != nil {
if err != rtph264.ErrNonStartingPacketAndNoPrevious && err != rtph264.ErrMorePacketsNeeded {

View File

@@ -77,7 +77,7 @@ func main() {
// called when a RTP packet arrives
c.OnPacketRTP(medi, forma, func(pkt *rtp.Packet) {
// extract access units from RTP packets
au, pts, err := rtpDec.Decode(pkt)
au, pts, err := rtpDec.DecodeUntilMarker(pkt)
if err != nil {
if err != rtph264.ErrNonStartingPacketAndNoPrevious && err != rtph264.ErrMorePacketsNeeded {
log.Printf("ERR: %v", err)

View File

@@ -59,7 +59,7 @@ func main() {
// called when a RTP packet arrives
c.OnPacketRTP(medi, forma, func(pkt *rtp.Packet) {
// extract access units from RTP packets
au, pts, err := rtpDec.Decode(pkt)
au, pts, err := rtpDec.DecodeUntilMarker(pkt)
if err != nil {
if err != rtph265.ErrNonStartingPacketAndNoPrevious && err != rtph265.ErrMorePacketsNeeded {
log.Printf("ERR: %v", err)