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

Method WriteAVCC

common/frame.go:122–137  ·  view source on GitHub ↗
(ts uint32, frame *util.BLL)

Source from the content-addressed store, hash-verified

120}
121
122func (av *AVFrame) WriteAVCC(ts uint32, frame *util.BLL) {
123 if ts == 0 {
124 ts = 1
125 }
126 av.Timestamp = time.Duration(ts) * time.Millisecond
127 av.BytesIn += frame.ByteLength
128 for {
129 item := frame.Shift()
130 if item == nil {
131 break
132 }
133 av.AVCC.Push(item)
134 }
135 // frame.Transfer(&av.AVCC)
136 // frame.ByteLength = 0
137}
138
139// Reset 重置数据,复用内存
140func (av *AVFrame) Reset() {

Callers

nothing calls this directly

Calls 2

ShiftMethod · 0.65
PushMethod · 0.65

Tested by

no test coverage detected