#include <RTCPPacket.h>
Public Member Functions | |
RTCPCompoundPacket (const char *name=NULL) | |
RTCPCompoundPacket (const RTCPCompoundPacket &rtcpCompoundPacket) | |
virtual | ~RTCPCompoundPacket () |
RTCPCompoundPacket & | operator= (const RTCPCompoundPacket &rtcpCompoundPacket) |
virtual RTCPCompoundPacket * | dup () const |
virtual std::string | info () |
virtual void | dump (std::ostream &os) const |
virtual void | addRTCPPacket (RTCPPacket *rtcpPacket) |
virtual cArray * | getRtcpPackets () |
Protected Attributes | |
cArray * | _rtcpPackets |
An rtcp compound packet acts as container for rtcp packets, which are transmitted in an RTCPCompoundPacket. Every RTCPCompoundPacket must consist at least one RTCPSenderReportPacketof RTCPReceiverReportPacket and one RTCPSDESPacket. This class doesn't check if these requirements are met.
Definition at line 431 of file RTCPPacket.h.
RTCPCompoundPacket::RTCPCompoundPacket | ( | const char * | name = NULL |
) |
Default constructor.
Definition at line 398 of file RTCPPacket.cc.
Referenced by dup().
: cPacket(name) { _rtcpPackets = new cArray("RTCPPackets"); // an empty rtcp compound packet has length 0 bytes setByteLength(0); };
RTCPCompoundPacket::RTCPCompoundPacket | ( | const RTCPCompoundPacket & | rtcpCompoundPacket | ) |
Copy constructor.
Definition at line 405 of file RTCPPacket.cc.
: cPacket() { setName(rtcpCompoundPacket.getName()); operator=(rtcpCompoundPacket); };
RTCPCompoundPacket::~RTCPCompoundPacket | ( | ) | [virtual] |
void RTCPCompoundPacket::addRTCPPacket | ( | RTCPPacket * | rtcpPacket | ) | [virtual] |
Adds an RTCPPacket to this RTCPCompoundPacket.
Definition at line 446 of file RTCPPacket.cc.
Referenced by RTCP::createPacket().
{ //rtcpPacket->setOwner(_rtcpPackets); _rtcpPackets->add(rtcpPacket); // the size of the rtcp compound packet increases // by the size of the added rtcp packet addByteLength(rtcpPacket->getByteLength()); };
void RTCPCompoundPacket::dump | ( | std::ostream & | os | ) | const [virtual] |
Writes a longer info about this RTCPCompoundPacket into the given stream.
Definition at line 436 of file RTCPPacket.cc.
{ os << "RTCPCompoundPacket:" << endl; for (int i = 0; i < _rtcpPackets->size(); i++) { if (_rtcpPackets->exist(i)) { //FIXME _rtcpPackets->get(i)->dump(os); } } };
RTCPCompoundPacket * RTCPCompoundPacket::dup | ( | ) | const [virtual] |
Duplicates the RTCPCompoundPacket by calling the copy constructor.
Definition at line 424 of file RTCPPacket.cc.
{ return new RTCPCompoundPacket(*this); };
cArray * RTCPCompoundPacket::getRtcpPackets | ( | ) | [virtual] |
Returns a copy of the cArray in which the rtcp packets are stored.
Definition at line 455 of file RTCPPacket.cc.
Referenced by RTCP::processIncomingRTCPPacket().
{ return new cArray(*_rtcpPackets); }
std::string RTCPCompoundPacket::info | ( | ) | [virtual] |
Writes a short info about this RTCPCompoundPacket into the given string.
Definition at line 429 of file RTCPPacket.cc.
{ std::stringstream out; out << "RTCPCompoundPacket: number of rtcp packets=" << _rtcpPackets->size(); return out.str(); };
RTCPCompoundPacket & RTCPCompoundPacket::operator= | ( | const RTCPCompoundPacket & | rtcpCompoundPacket | ) |
Assignment operator.
Definition at line 416 of file RTCPPacket.cc.
Referenced by RTCPCompoundPacket().
{ cPacket::operator=(rtcpCompoundPacket); setByteLength(rtcpCompoundPacket.getByteLength()); _rtcpPackets = new cArray(*(rtcpCompoundPacket._rtcpPackets)); return *this; };
cArray* RTCPCompoundPacket::_rtcpPackets [protected] |
The cArray in which the rtcp packets are stored.
Definition at line 486 of file RTCPPacket.h.
Referenced by addRTCPPacket(), dump(), getRtcpPackets(), info(), operator=(), RTCPCompoundPacket(), and ~RTCPCompoundPacket().