7 #ifndef _INCLUDED_MPDATABUF_H // [ 8 #define _INCLUDED_MPDATABUF_H 18 #define MPBUFDATA_FROM_BASE_CONSTRUCTOR(classname, buffer_type, base_classname) \ 19 classname##Ptr( MpBuf *buffer \ 20 , MpBufPool *pHeaderPool=classname::smpDefaultPool) \ 21 : base_classname##Ptr(buffer, pHeaderPool) \ 23 if (mpBuffer != NULL) { \ 24 MPBUF_FROM_BASE_CONSTRUCTOR_INIT(classname, buffer_type) \ 141 :
MpBufPtr(pHeaderPool->getBuffer())
143 if (mpBuffer != NULL) {
171 mpBuffer->setFlowGraph(flowgraph);
172 ((
MpDataBuf*)mpBuffer)->mpData.setFlowGraph(flowgraph);
200 #endif // _INCLUDED_MPDATABUF_H ] #define MPBUF_TYPECHECKED_COPY(classname, buffer_type, base_classname)
Copy object from base type with type check.
Definition: MpBuf.h:407
static void sDestroy(MpBuf *pBuffer)
Destructor for MpDataBuf.
Definition: MpDataBuf.cpp:26
char * getDataWritePtr()
Return pointer to payload data.
Definition: MpDataBuf.cpp:35
static MpBufPool * smpDefaultPool
Default pool for MpDataBuf objects.
Definition: MpDataBuf.h:49
const char * getDataPtr() const
Return pointer to payload data.
Definition: MpDataBuf.cpp:43
MpArrayBufPtr mpData
Payload data.
Definition: MpDataBuf.h:93
MpDataBuf & operator=(const MpBuf &)
Disable assignment operator.
static void sInitClone(MpBuf *pBuffer)
Function that initialize buffer after cloning. It makes clone of mpData.
Definition: MpDataBuf.cpp:72
Flow graph for coordinating the execution of media processing resources.
Definition: MpFlowGraphBase.h:91
#define MPBUF_FROM_BASE_CONSTRUCTOR_INIT(classname, buffer_type)
Definition: MpBuf.h:390
void init()
This is called in place of constructor.
Definition: MpDataBuf.cpp:56
void setFlowGraph(MpFlowGraphBase *flowgraph)
Definition: MpBuf.h:103
Begin of the MpDataBuf type.
Definition: MpBuf.h:49
#define MPBUF_MEMBER_ACCESS_OPERATOR(classname)
Return pointer to buffer.
Definition: MpBuf.h:417
#define MPBUF_CONST_MEMBER_ACCESS_OPERATOR(classname)
Return readonly pointer to buffer.
Definition: MpBuf.h:422
MpDataBuf(const MpBuf &)
Disable copy (and other) constructor.
Smart pointer to MpArrayBuf.
Definition: MpArrayBuf.h:128
Smart pointer to MpBuf.
Definition: MpBuf.h:160
Smart pointer to MpDataBuf.
Definition: MpDataBuf.h:127
void setData(const MpArrayBufPtr &pData)
Set new payload data.
Definition: MpDataBuf.h:63
MpArrayBufPtr getData() const
Get payload data.
Definition: MpDataBuf.h:79
Base class for all media buffers.
Definition: MpBuf.h:74
#define MPBUF_DEFAULT_CONSTRUCTOR(classname)
Default constructor - construct invalid pointer.
Definition: MpBuf.h:387
Pool of buffers.
Definition: MpBufPool.h:32
Stores data in the external buffer.
Definition: MpDataBuf.h:42