#include <RTCPPacket.h>
Public Member Functions | |
RTCPCompoundPacket (const char *name=NULL) | |
RTCPCompoundPacket (const RTCPCompoundPacket &rtcpCompoundPacket) | |
virtual | ~RTCPCompoundPacket () |
RTCPCompoundPacket & | operator= (const RTCPCompoundPacket &rtcpCompoundPacket) |
virtual cObject * | dup () const |
virtual const char * | className () const |
virtual std::string | info () |
virtual void | writeContents (std::ostream &os) const |
virtual void | addRTCPPacket (RTCPPacket *rtcpPacket) |
virtual cArray * | rtcpPackets () |
Private Attributes | |
cArray * | _rtcpPackets |
RTCPCompoundPacket::RTCPCompoundPacket | ( | const char * | name = NULL |
) |
Default constructor.
00426 : cPacket(name) { 00427 _rtcpPackets = new cArray("RTCPPackets"); 00428 // an empty rtcp compound packet has length 0 bytes 00429 setLength(0); 00430 };
RTCPCompoundPacket::RTCPCompoundPacket | ( | const RTCPCompoundPacket & | rtcpCompoundPacket | ) |
Copy constructor.
00433 : cPacket() { 00434 setName(rtcpCompoundPacket.name()); 00435 operator=(rtcpCompoundPacket); 00436 };
RTCPCompoundPacket::~RTCPCompoundPacket | ( | ) | [virtual] |
void RTCPCompoundPacket::addRTCPPacket | ( | RTCPPacket * | rtcpPacket | ) | [virtual] |
Adds an RTCPPacket to this RTCPCompoundPacket.
00479 { 00480 //rtcpPacket->setOwner(_rtcpPackets); 00481 _rtcpPackets->add(rtcpPacket); 00482 // the size of the rtcp compound packet increases 00483 // by the size of the added rtcp packet 00484 addLength(rtcpPacket->length()); 00485 };
const char * RTCPCompoundPacket::className | ( | ) | const [virtual] |
cObject * RTCPCompoundPacket::dup | ( | ) | const [virtual] |
Duplicates the RTCPCompoundPacket by calling the copy constructor.
00452 { 00453 return new RTCPCompoundPacket(*this); 00454 };
std::string RTCPCompoundPacket::info | ( | ) | [virtual] |
Writes a short info about this RTCPCompoundPacket into the given string.
00462 { 00463 std::stringstream out; 00464 out << "RTCPCompoundPacket: number of rtcp packets=" << _rtcpPackets->items(); 00465 return out.str(); 00466 };
RTCPCompoundPacket & RTCPCompoundPacket::operator= | ( | const RTCPCompoundPacket & | rtcpCompoundPacket | ) |
Assignment operator.
00444 { 00445 cPacket::operator=(rtcpCompoundPacket); 00446 setLength(rtcpCompoundPacket.length()); 00447 _rtcpPackets = new cArray(*(rtcpCompoundPacket._rtcpPackets)); 00448 return *this; 00449 };
cArray * RTCPCompoundPacket::rtcpPackets | ( | ) | [virtual] |
Returns a copy of the cArray in which the rtcp packets are stored.
00488 { 00489 return new cArray(*_rtcpPackets); 00490 }
void RTCPCompoundPacket::writeContents | ( | std::ostream & | os | ) | const [virtual] |
Writes a longer info about this RTCPCompoundPacket into the given stream.
00469 { 00470 os << "RTCPCompoundPacket:" << endl; 00471 for (int i = 0; i < _rtcpPackets->items(); i++) { 00472 if (_rtcpPackets->exist(i)) { 00473 _rtcpPackets->get(i)->writeContents(os); 00474 } 00475 } 00476 };
cArray* RTCPCompoundPacket::_rtcpPackets [private] |
The cArray in which the rtcp packets are stored.