rename files

This commit is contained in:
aler9
2022-12-13 18:07:38 +01:00
parent 38b24b8e26
commit f62da20a99
3 changed files with 0 additions and 0 deletions

45
serversessionformat.go Normal file
View File

@@ -0,0 +1,45 @@
package gortsplib
import (
"fmt"
"time"
"github.com/pion/rtp"
"github.com/aler9/gortsplib/v2/pkg/format"
"github.com/aler9/gortsplib/v2/pkg/rtcpreceiver"
"github.com/aler9/gortsplib/v2/pkg/rtpreorderer"
)
type serverSessionFormat struct {
sm *serverSessionMedia
format format.Format
udpReorderer *rtpreorderer.Reorderer
udpRTCPReceiver *rtcpreceiver.RTCPReceiver
onPacketRTP func(*rtp.Packet)
}
func newServerSessionFormat(sm *serverSessionMedia, forma format.Format) *serverSessionFormat {
return &serverSessionFormat{
sm: sm,
format: forma,
onPacketRTP: func(*rtp.Packet) {},
}
}
func (st *serverSessionFormat) readRTPUDP(pkt *rtp.Packet, now time.Time) {
packets, missing := st.udpReorderer.Process(pkt)
if missing != 0 {
onDecodeError(st.sm.ss, fmt.Errorf("%d RTP packet(s) lost", missing))
// do not return
}
for _, pkt := range packets {
st.udpRTCPReceiver.ProcessPacket(pkt, now, st.format.PTSEqualsDTS(pkt))
st.onPacketRTP(pkt)
}
}
func (st *serverSessionFormat) readRTPTCP(pkt *rtp.Packet) {
st.onPacketRTP(pkt)
}