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

Method GetShell

util/pool.go:307–315  ·  view source on GitHub ↗

获取来自真实内存的切片的——假内存块,即只回收外壳

(b []byte)

Source from the content-addressed store, hash-verified

305
306// 获取来自真实内存的切片的——假内存块,即只回收外壳
307func (p BytesPool) GetShell(b []byte) (item LIBP) {
308 if len(p) == 0 {
309 return &ListItem[Buffer]{Value: b}
310 }
311 item = p[0].PoolShift()
312 item.Value = b
313 item.reset = true
314 return
315}
316
317func (p BytesPool) Get(size int) (item LIBP) {
318 for i := 1; i < len(p); i++ {

Callers 11

WriteAVCCMethod · 0.80
WriteADTSMethod · 0.80
WriteRTPFrameMethod · 0.80
CompleteAVCCMethod · 0.80
WriteRTPFrameMethod · 0.80
CompleteAVCCMethod · 0.80
GetFromPoolMethod · 0.80
AppendAuBytesMethod · 0.80
CompleteAVCCMethod · 0.80
WriteRTPFrameMethod · 0.80
CompleteAVCCMethod · 0.80

Calls 1

PoolShiftMethod · 0.80

Tested by

no test coverage detected