10 #ifndef _INCLUDED_MPBUFPOOL_H // [ 11 #define _INCLUDED_MPBUFPOOL_H 15 #include <os/OsMutex.h> 16 #include <utl/UtlString.h> 41 MpBufPool(
unsigned blockSize,
unsigned numBlocks,
const UtlString& poolName);
129 #endif // _INCLUDED_MPBUFPOOL_H ] MpBufList * mpFreeList
Definition: MpBufPool.h:115
unsigned mNumGets
Definition: MpBufPool.h:121
unsigned mNumFree
For statistics.
Definition: MpBufPool.h:123
unsigned mBlockSize
Requested size of each block in pool (in bytes).
Definition: MpBufPool.h:109
int scanBufPool(MpFlowGraphBase *pFG)
Scan for orphan buffers.
Definition: MpBufPool.cpp:235
unsigned mNumBlocks
Number of blocks in pool.
Definition: MpBufPool.h:111
unsigned getBlockSize() const
Return size of the one block in the pool (in bytes).
Definition: MpBufPool.h:69
unsigned mBlockSpan
Actual size of each block. >= mBlockSize for alignment.
Definition: MpBufPool.h:110
Class for internal MpBufPool use.
Definition: MpBufPool.cpp:52
int getBufferNumber(MpBuf *pBuf) const
Return number of the buffer in the pool. Use this for debug output.
Definition: MpBufPool.cpp:218
char * mpPoolData
Definition: MpBufPool.h:113
Flow graph for coordinating the execution of media processing resources.
Definition: MpFlowGraphBase.h:91
int getFreeBufferCount()
Return the number of free buffers.
Definition: MpBufPool.cpp:223
OsMutex mMutex
Mutex to avoid concurrent access to the pool.
Definition: MpBufPool.h:117
UtlString mPoolName
label or name for debug
Definition: MpBufPool.h:108
void releaseBuffer(MpBuf *pBuffer)
Bring this buffer back to pool.
Definition: MpBufPool.cpp:193
MpBufPool(unsigned blockSize, unsigned numBlocks, const UtlString &poolName)
Creates pool with numBlocks in it. Each block have size blockSize.
Definition: MpBufPool.cpp:93
int profileFlowgraphPoolUsage()
Syslog a histigram of buffers used by flowgraph.
Definition: MpBufPool.cpp:253
MpBuf * getBuffer()
Get free block from pool.
Definition: MpBufPool.cpp:150
void * getPoolDataEnd()
Return pointer to the byte after end of the pool data.
Definition: MpBufPool.h:101
unsigned getNumBlocks() const
Return number of blocks in the pool.
Definition: MpBufPool.h:72
const UtlString & getName()
Get the name label for this pool.
Definition: MpBufPool.cpp:300
char * getNextBlock(char *pBlock)
Return pointer to the block, next to this.
Definition: MpBufPool.h:104
unsigned mNumFrees
For statistics.
Definition: MpBufPool.h:122
virtual ~MpBufPool()
Destroys pool.
Definition: MpBufPool.cpp:130
Base class for all media buffers.
Definition: MpBuf.h:74
unsigned mMinFree
For statistics.
Definition: MpBufPool.h:124
void appendFreeList(MpBuf *pBuf)
Definition: MpBufPool.cpp:310
Pool of buffers.
Definition: MpBufPool.h:32
unsigned mPoolBytes
Size of all pool in bytes.
Definition: MpBufPool.h:112