#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 |
RTCPCompoundPacket::RTCPCompoundPacket | ( | const char * | name = NULL |
) |
Default constructor.
Referenced by dup().
00398 : cPacket(name) { 00399 _rtcpPackets = new cArray("RTCPPackets"); 00400 // an empty rtcp compound packet has length 0 bytes 00401 setByteLength(0); 00402 };
RTCPCompoundPacket::RTCPCompoundPacket | ( | const RTCPCompoundPacket & | rtcpCompoundPacket | ) |
Copy constructor.
00405 : cPacket() { 00406 setName(rtcpCompoundPacket.getName()); 00407 operator=(rtcpCompoundPacket); 00408 };
RTCPCompoundPacket::~RTCPCompoundPacket | ( | ) | [virtual] |
RTCPCompoundPacket & RTCPCompoundPacket::operator= | ( | const RTCPCompoundPacket & | rtcpCompoundPacket | ) |
Assignment operator.
Referenced by RTCPCompoundPacket().
00416 { 00417 cPacket::operator=(rtcpCompoundPacket); 00418 setByteLength(rtcpCompoundPacket.getByteLength()); 00419 _rtcpPackets = new cArray(*(rtcpCompoundPacket._rtcpPackets)); 00420 return *this; 00421 };
RTCPCompoundPacket * RTCPCompoundPacket::dup | ( | ) | const [virtual] |
Duplicates the RTCPCompoundPacket by calling the copy constructor.
00424 { 00425 return new RTCPCompoundPacket(*this); 00426 };
std::string RTCPCompoundPacket::info | ( | ) | [virtual] |
Writes a short info about this RTCPCompoundPacket into the given string.
00429 { 00430 std::stringstream out; 00431 out << "RTCPCompoundPacket: number of rtcp packets=" << _rtcpPackets->size(); 00432 return out.str(); 00433 };
void RTCPCompoundPacket::dump | ( | std::ostream & | os | ) | const [virtual] |
Writes a longer info about this RTCPCompoundPacket into the given stream.
00436 { 00437 os << "RTCPCompoundPacket:" << endl; 00438 for (int i = 0; i < _rtcpPackets->size(); i++) { 00439 if (_rtcpPackets->exist(i)) { 00440 //FIXME _rtcpPackets->get(i)->dump(os); 00441 } 00442 } 00443 };
void RTCPCompoundPacket::addRTCPPacket | ( | RTCPPacket * | rtcpPacket | ) | [virtual] |
Adds an RTCPPacket to this RTCPCompoundPacket.
Referenced by RTCP::createPacket().
00446 { 00447 //rtcpPacket->setOwner(_rtcpPackets); 00448 _rtcpPackets->add(rtcpPacket); 00449 // the size of the rtcp compound packet increases 00450 // by the size of the added rtcp packet 00451 addByteLength(rtcpPacket->getByteLength()); 00452 };
cArray * RTCPCompoundPacket::getRtcpPackets | ( | ) | [virtual] |
Returns a copy of the cArray in which the rtcp packets are stored.
Referenced by RTCP::processIncomingRTCPPacket().
00455 { 00456 return new cArray(*_rtcpPackets); 00457 }
cArray* RTCPCompoundPacket::_rtcpPackets [protected] |
The cArray in which the rtcp packets are stored.
Referenced by addRTCPPacket(), dump(), getRtcpPackets(), info(), operator=(), RTCPCompoundPacket(), and ~RTCPCompoundPacket().