支持GB28181三种推流

This commit is contained in:
yangjiechina
2024-05-03 22:50:45 +08:00
parent 43fd14b219
commit b4487b95cb
38 changed files with 2634 additions and 362 deletions

View File

@@ -42,6 +42,10 @@ type MemoryPool interface {
Clear()
Empty() bool
Capacity() int
Size() int
}
func NewMemoryPool(capacity int) MemoryPool {
@@ -221,3 +225,12 @@ func (m *memoryPool) Empty() bool {
utils.Assert(!m.mark)
return m.blockQueue.Size() < 1
}
func (m *memoryPool) Capacity() int {
return m.capacity
}
func (m *memoryPool) Size() int {
head, tail := m.Data()
return len(head) + len(tail)
}