MCPcopy Create free account
hub / github.com/pion/rtp / NextSequenceNumber

Method NextSequenceNumber

sequencer.go:38–48  ·  view source on GitHub ↗

NextSequenceNumber increment and returns a new sequence number for building RTP packets

()

Source from the content-addressed store, hash-verified

36// NextSequenceNumber increment and returns a new sequence number for
37// building RTP packets
38func (s *sequencer) NextSequenceNumber() uint16 {
39 s.mutex.Lock()
40 defer s.mutex.Unlock()
41
42 s.sequenceNumber++
43 if s.sequenceNumber == 0 {
44 s.rollOverCount++
45 }
46
47 return s.sequenceNumber
48}
49
50// RollOverCount returns the amount of times the 16bit sequence number
51// has wrapped

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected