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

Method narrow

track/media.go:208–216  ·  view source on GitHub ↗
(gop int)

Source from the content-addressed store, hash-verified

206}
207
208func (av *Media) narrow(gop int) {
209 if l := av.Size - gop; l > 12 {
210 if log.Trace {
211 av.Trace("resize", zap.Int("before", av.Size), zap.Int("after", av.Size-5))
212 }
213 //缩小缓冲环节省内存
214 av.Reduce(5)
215 }
216}
217
218func (av *Media) AddIDR() {
219 if av.BufferTime > 0 {

Callers 2

FlushMethod · 0.95
computeGOPMethod · 0.80

Calls 2

ReduceMethod · 0.80
TraceMethod · 0.65

Tested by

no test coverage detected