mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 15:16:51 +08:00
rename OnPacketLost2 into OnPacketsLost (#736)
This commit is contained in:
@@ -12,7 +12,6 @@ import (
|
||||
"github.com/bluenviron/gortsplib/v4/internal/rtplossdetector"
|
||||
"github.com/bluenviron/gortsplib/v4/internal/rtpreorderer"
|
||||
"github.com/bluenviron/gortsplib/v4/pkg/format"
|
||||
"github.com/bluenviron/gortsplib/v4/pkg/liberrors"
|
||||
)
|
||||
|
||||
type serverSessionFormat struct {
|
||||
@@ -115,11 +114,10 @@ func (sf *serverSessionFormat) handlePacketRTP(pkt *rtp.Packet, now time.Time) {
|
||||
func (sf *serverSessionFormat) onPacketRTPLost(lost uint64) {
|
||||
atomic.AddUint64(sf.rtpPacketsLost, lost)
|
||||
|
||||
if h, ok := sf.sm.ss.s.Handler.(ServerHandlerOnPacketLost); ok {
|
||||
h.OnPacketLost(&ServerHandlerOnPacketLostCtx{
|
||||
if h, ok := sf.sm.ss.s.Handler.(ServerHandlerOnPacketsLost); ok {
|
||||
h.OnPacketsLost(&ServerHandlerOnPacketsLostCtx{
|
||||
Session: sf.sm.ss,
|
||||
Lost: lost,
|
||||
Error: liberrors.ErrServerRTPPacketsLost{Lost: uint(lost)}, //nolint:staticcheck
|
||||
})
|
||||
} else {
|
||||
log.Printf("%d RTP %s lost",
|
||||
|
Reference in New Issue
Block a user