sipxmedialib
Version 3.3
|
Base class for all media buffers. More...
#include <MpBuf.h>
Public Member Functions | |
Manipulators | |
void | attach () |
Increments reference counter. More... | |
void | detach () |
Decrements reference counter and free buffer if needed. More... | |
Accessors | |
void | setFlowGraph (MpFlowGraphBase *flowgraph) |
MP_BUFFERS_TREE | getType () const |
Get buffer type. More... | |
MpBufPool * | getBufferPool () const |
Get parent pool of this buffer. More... | |
Static Protected Member Functions | |
static void | sInitClone (MpBuf *pBuffer) |
Function that initialize buffer after cloning. It adjusts reference counters. More... | |
Protected Attributes | |
MP_BUFFERS_TREE | mType |
Buffer class type. Used for type safety. More... | |
int | mRefCounter |
Reference counter for use with MpBufPtr. More... | |
MpBufPool * | mpPool |
Parent memory pool. More... | |
MpFlowGraphBase * | mpFlowGraph |
Debug pointer to flowgraph in which this buf is used. More... | |
void(* | mpDestroy )(MpBuf *) |
void(* | mpInitClone )(MpBuf *) |
Private Member Functions | |
MpBuf (const MpBuf &) | |
Disable copy (and other) constructor. More... | |
MpBuf & | operator= (const MpBuf &) |
Disable assignment operator. More... | |
Friends | |
class | MpBufPtr |
class | MpBufPool |
Base class for all media buffers.
This class designed to be used with memory pool MpBufPool and smart pointer MpBufPoolPtr. It seems to be useless without them.
This struct itself does not provide any data storage. It contain only reference counter and pointer to parent pool. To store data in this pool use MpArrayBuf. To store store data in the other pool use MpDataBuf or one of its children.
Disable copy (and other) constructor.
This struct will be initialized by init() member.
void attach | ( | ) |
Increments reference counter.
void detach | ( | ) |
Decrements reference counter and free buffer if needed.
|
inline |
|
inline |
Get buffer type.
|
inline |
Get parent pool of this buffer.
|
staticprotected |
Function that initialize buffer after cloning. It adjusts reference counters.
Disable assignment operator.
Buffers may be copied. But do we need this?
|
friend |
|
friend |
|
protected |
Buffer class type. Used for type safety.
|
protected |
Reference counter for use with MpBufPtr.
|
protected |
Parent memory pool.
|
protected |
Debug pointer to flowgraph in which this buf is used.
|
protected |
Pointer to deinitialization method. Used as virtual destructor.
|
protected |
Pointer to function that initialize buffer after cloning.