mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
TEST: Upgrade pion to v3.2.9. (#3567)
------ Co-authored-by: chundonglinlin <chundonglinlin@163.com>
This commit is contained in:
parent
104cf14d68
commit
df854339ea
1383 changed files with 118469 additions and 41421 deletions
13
trunk/3rdparty/srs-bench/vendor/github.com/pion/rtp/packetizer.go
generated
vendored
13
trunk/3rdparty/srs-bench/vendor/github.com/pion/rtp/packetizer.go
generated
vendored
|
@ -6,17 +6,18 @@ import (
|
|||
|
||||
// Payloader payloads a byte array for use as rtp.Packet payloads
|
||||
type Payloader interface {
|
||||
Payload(mtu int, payload []byte) [][]byte
|
||||
Payload(mtu uint16, payload []byte) [][]byte
|
||||
}
|
||||
|
||||
// Packetizer packetizes a payload
|
||||
type Packetizer interface {
|
||||
Packetize(payload []byte, samples uint32) []*Packet
|
||||
EnableAbsSendTime(value int)
|
||||
SkipSamples(skippedSamples uint32)
|
||||
}
|
||||
|
||||
type packetizer struct {
|
||||
MTU int
|
||||
MTU uint16
|
||||
PayloadType uint8
|
||||
SSRC uint32
|
||||
Payloader Payloader
|
||||
|
@ -30,7 +31,7 @@ type packetizer struct {
|
|||
}
|
||||
|
||||
// NewPacketizer returns a new instance of a Packetizer for a specific payloader
|
||||
func NewPacketizer(mtu int, pt uint8, ssrc uint32, payloader Payloader, sequencer Sequencer, clockRate uint32) Packetizer {
|
||||
func NewPacketizer(mtu uint16, pt uint8, ssrc uint32, payloader Payloader, sequencer Sequencer, clockRate uint32) Packetizer {
|
||||
return &packetizer{
|
||||
MTU: mtu,
|
||||
PayloadType: pt,
|
||||
|
@ -89,3 +90,9 @@ func (p *packetizer) Packetize(payload []byte, samples uint32) []*Packet {
|
|||
|
||||
return packets
|
||||
}
|
||||
|
||||
// SkipSamples causes a gap in sample count between Packetize requests so the
|
||||
// RTP payloads produced have a gap in timestamps
|
||||
func (p *packetizer) SkipSamples(skippedSamples uint32) {
|
||||
p.Timestamp += skippedSamples
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue