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

Method WriteRTPFrame

track/g711.go:60–68  ·  view source on GitHub ↗
(rtpItem *LIRTP)

Source from the content-addressed store, hash-verified

58}
59
60func (g711 *G711) WriteRTPFrame(rtpItem *LIRTP) {
61 frame := &rtpItem.Value
62 g711.Value.RTP.Push(rtpItem)
63 if g711.SampleRate != 90000 {
64 g711.generateTimestamp(uint32(uint64(frame.Timestamp) * 90000 / uint64(g711.SampleRate)))
65 }
66 g711.AppendAuBytes(frame.Payload)
67 g711.Flush()
68}
69
70func (g711 *G711) CompleteRTP(value *AVFrame) {
71 if value.AUList.ByteLength > RTPMTU {

Callers

nothing calls this directly

Calls 4

AppendAuBytesMethod · 0.80
PushMethod · 0.65
generateTimestampMethod · 0.65
FlushMethod · 0.65

Tested by

no test coverage detected