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

Method WriteAVCC

track/aac.go:96–111  ·  view source on GitHub ↗
(ts uint32, frame *util.BLL)

Source from the content-addressed store, hash-verified

94}
95
96func (aac *AAC) WriteAVCC(ts uint32, frame *util.BLL) error {
97 if l := frame.ByteLength; l < 4 {
98 aac.Error("AVCC data too short", zap.Int("len", l))
99 return io.ErrShortWrite
100 }
101 if frame.GetByte(1) == 0 {
102 aac.WriteSequenceHead(frame.ToBytes())
103 frame.Recycle()
104 } else {
105 au := frame.ToBuffers()
106 au[0] = au[0][2:]
107 aac.AppendAuBytes(au...)
108 aac.Audio.WriteAVCC(ts, frame)
109 }
110 return nil
111}
112
113func (aac *AAC) CompleteRTP(value *AVFrame) {
114 l := value.AUList.ByteLength

Callers

nothing calls this directly

Calls 8

WriteSequenceHeadMethod · 0.95
GetByteMethod · 0.80
AppendAuBytesMethod · 0.80
ErrorMethod · 0.65
RecycleMethod · 0.65
WriteAVCCMethod · 0.65
ToBytesMethod · 0.45
ToBuffersMethod · 0.45

Tested by

no test coverage detected