(b util.IBytes)
| 107 | } |
| 108 | |
| 109 | func (av *Media) GetFromPool(b util.IBytes) (item util.LIBP) { |
| 110 | if b.Reuse() { |
| 111 | item = av.BytesPool.Get(b.Len()) |
| 112 | copy(item.Value, b.Bytes()) |
| 113 | } else { |
| 114 | return av.BytesPool.GetShell(b.Bytes()) |
| 115 | } |
| 116 | return |
| 117 | } |
| 118 | |
| 119 | func (av *Media) GetRTPFromPool() (result *LIRTP) { |
| 120 | result = av.RtpPool.Get() |