mirror of
https://github.com/aler9/rtsp-simple-server
synced 2025-12-24 11:51:18 +08:00
26 lines
486 B
Go
26 lines
486 B
Go
package rtp
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/bluenviron/gortsplib/v5/pkg/format"
|
|
"github.com/bluenviron/gortsplib/v5/pkg/rtpreceiver"
|
|
"github.com/pion/rtcp"
|
|
)
|
|
|
|
type rtpFormat struct {
|
|
desc format.Format
|
|
|
|
rtpReceiver *rtpreceiver.Receiver
|
|
}
|
|
|
|
func (f *rtpFormat) initialize() {
|
|
f.rtpReceiver = &rtpreceiver.Receiver{
|
|
ClockRate: f.desc.ClockRate(),
|
|
UnrealiableTransport: true,
|
|
Period: 10 * time.Second,
|
|
WritePacketRTCP: func(_ rtcp.Packet) {
|
|
},
|
|
}
|
|
}
|