8 #ifndef _INCLUDED_MPUDPBUF_H 9 #define _INCLUDED_MPUDPBUF_H 12 #ifdef __pingtel_on_posix__ // [ 13 # include <netinet/in.h> 14 #endif // __pigntel_on_posix__ ] 17 # include <winsock2.h> 67 return mpData->setDataSize(size);
void setUdpPort(unsigned port)
Set source/destination UDP port for this packet.
Definition: MpUdpBuf.h:77
void setIP(const in_addr &ip)
Set source/destination address for this packet.
Definition: MpUdpBuf.h:74
#define MPBUF_TYPECHECKED_COPY(classname, buffer_type, base_classname)
Copy object from base type with type check.
Definition: MpBuf.h:407
unsigned getPacketSize() const
Get size of packet data in bytes.
Definition: MpUdpBuf.h:86
Buffer for raw UDP packet.
Definition: MpUdpBuf.h:37
MpBufPool * UdpPool
Memory pool for raw UDP packets.
Definition: MpMisc.h:77
MpArrayBufPtr mpData
Payload data.
Definition: MpDataBuf.h:93
void init()
This is called in place of constructor.
Definition: MpUdpBuf.cpp:31
#define MPBUFDATA_FROM_BASE_CONSTRUCTOR(classname, buffer_type, base_classname)
This constructor owns MpBuf object.
Definition: MpDataBuf.h:18
unsigned getMaximumPacketSize() const
Get maximum size of data this buffer can bear.
Definition: MpUdpBuf.h:89
MpUdpBuf(const MpBuf &)
Disable copy (and other) constructor.
unsigned mPort
Source/destination UDP-port of this packet.
Definition: MpUdpBuf.h:115
struct __MpGlobals MpMisc
Definition: MpMisc.cpp:101
int profileFlowgraphPoolUsage()
Syslog a histigram of buffers used by flowgraph.
Definition: MpBufPool.cpp:253
unsigned getTimecode() const
Get time code for this packet.
Definition: MpUdpBuf.h:92
Smart pointer to MpUdpBuf.
Definition: MpUdpBuf.h:142
unsigned mTimecode
Definition: MpUdpBuf.h:112
#define MPBUF_MEMBER_ACCESS_OPERATOR(classname)
Return pointer to buffer.
Definition: MpBuf.h:417
MpUdpBuf & operator=(const MpBuf &)
Disable assignment operator.
#define MPBUF_CONST_MEMBER_ACCESS_OPERATOR(classname)
Return readonly pointer to buffer.
Definition: MpBuf.h:422
static MpBufPool * smpDefaultPool
Default pool for this type of buffer.
Definition: MpUdpBuf.h:44
const in_addr & getIP() const
Get source/destination address for this packet.
Definition: MpUdpBuf.h:95
bool setPacketSize(int size)
Set size of packet data in bytes.
Definition: MpUdpBuf.h:61
unsigned getUdpPort() const
Get source/destination UDP port for this packet.
Definition: MpUdpBuf.h:98
Smart pointer to MpDataBuf.
Definition: MpDataBuf.h:127
Base class for all media buffers.
Definition: MpBuf.h:74
bool isValid() const
Can this pointer be dereferenced? Use this function instead of NULL comparison.
Definition: MpBuf.h:365
Begin of the MpUdpBuf type.
Definition: MpBuf.h:54
#define MPBUF_DEFAULT_CONSTRUCTOR(classname)
Default constructor - construct invalid pointer.
Definition: MpBuf.h:387
in_addr mIP
Source/destination IP-addres of this packet.
Definition: MpUdpBuf.h:114
Pool of buffers.
Definition: MpBufPool.h:32
void setTimecode(unsigned timecode)
Set time code for this packet.
Definition: MpUdpBuf.h:71
Stores data in the external buffer.
Definition: MpDataBuf.h:42