MCPcopy Create free account
hub / github.com/Monibuca/engine / CompleteRTP

Method CompleteRTP

track/opus.go:43–54  ·  view source on GitHub ↗
(value *AVFrame)

Source from the content-addressed store, hash-verified

41}
42
43func (opus *Opus) CompleteRTP(value *AVFrame) {
44 if value.AUList.ByteLength > RTPMTU {
45 var packets [][][]byte
46 r := value.AUList.Next.Value.NewReader()
47 for bufs := r.ReadN(RTPMTU); len(bufs) > 0; bufs = r.ReadN(RTPMTU) {
48 packets = append(packets, bufs)
49 }
50 opus.PacketizeRTP(packets...)
51 } else {
52 opus.Audio.CompleteRTP(value)
53 }
54}

Callers

nothing calls this directly

Calls 4

PacketizeRTPMethod · 0.80
ReadNMethod · 0.65
CompleteRTPMethod · 0.65
NewReaderMethod · 0.45

Tested by

no test coverage detected