sipxmedialib
Version 3.3
|
Stores data in the external buffer. More...
#include <MpDataBuf.h>
Public Member Functions | |
Manipulators | |
void | setData (const MpArrayBufPtr &pData) |
Set new payload data. More... | |
Accessors | |
char * | getDataWritePtr () |
Return pointer to payload data. More... | |
const char * | getDataPtr () const |
Return pointer to payload data. More... | |
MpArrayBufPtr | getData () const |
Get payload data. More... | |
Public Member Functions inherited from MpBuf | |
void | attach () |
Increments reference counter. More... | |
void | detach () |
Decrements reference counter and free buffer if needed. More... | |
void | setFlowGraph (MpFlowGraphBase *flowgraph) |
MP_BUFFERS_TREE | getType () const |
Get buffer type. More... | |
MpBufPool * | getBufferPool () const |
Get parent pool of this buffer. More... | |
Static Public Attributes | |
static MpBufPool * | smpDefaultPool = NULL |
Default pool for MpDataBuf objects. More... | |
Protected Member Functions | |
void | init () |
This is called in place of constructor. More... | |
Static Protected Member Functions | |
static void | sDestroy (MpBuf *pBuffer) |
Destructor for MpDataBuf. More... | |
static void | sInitClone (MpBuf *pBuffer) |
Function that initialize buffer after cloning. It makes clone of mpData. More... | |
Static Protected Member Functions inherited from MpBuf | |
static void | sInitClone (MpBuf *pBuffer) |
Function that initialize buffer after cloning. It adjusts reference counters. More... | |
Protected Attributes | |
MpArrayBufPtr | mpData |
Payload data. More... | |
Protected Attributes inherited from MpBuf | |
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 | |
MpDataBuf (const MpBuf &) | |
Disable copy (and other) constructor. More... | |
MpDataBuf & | operator= (const MpBuf &) |
Disable assignment operator. More... | |
Friends | |
class | MpDataBufPtr |
Stores data in the external buffer.
This struct could be used if you want to store data separate from header. This approach may be useful when you need to share data between several headers. For example, you may want to pass raw audio data to RTP packet without copying.
Disable copy (and other) constructor.
This struct will be initialized by init() member.
|
inline |
Set new payload data.
char * getDataWritePtr | ( | ) |
Return pointer to payload data.
const char * getDataPtr | ( | ) | const |
Return pointer to payload data.
|
inline |
Get payload data.
|
protected |
This is called in place of constructor.
|
staticprotected |
Function that initialize buffer after cloning. It makes clone of mpData.
Disable assignment operator.
Buffers may be copied. But do we need this?
|
friend |
|
protected |
Payload data.