#include <sdes.h>
Public Member Functions | |
SDESChunk (const char *name=NULL, uint32 ssrc=0) | |
SDESChunk (const SDESChunk &sdesChunk) | |
virtual | ~SDESChunk () |
SDESChunk & | operator= (const SDESChunk &sdesChunk) |
virtual SDESChunk * | dup () const |
virtual std::string | info () |
virtual void | dump (std::ostream &os) |
virtual void | addSDESItem (SDESItem *item) |
virtual uint32 | getSSRC () |
virtual void | setSSRC (uint32 ssrc) |
virtual int | getLength () |
Protected Attributes | |
uint32 | _ssrc |
int | _length |
The class SDESChunk is used for storing SDESItem objects for one rtp end system.
Definition at line 131 of file sdes.h.
SDESChunk::SDESChunk | ( | const char * | name = NULL , |
|
uint32 | ssrc = 0 | |||
) |
SDESChunk::SDESChunk | ( | const SDESChunk & | sdesChunk | ) |
void SDESChunk::addSDESItem | ( | SDESItem * | item | ) | [virtual] |
Adds an SDESItem to this SDESChunk. If there is already an SDESItem of the same type in this SDESChunk it is replaced by the new one.
Definition at line 155 of file sdes.cc.
Referenced by RTPParticipantInfo::addSDESItem().
{ for (int i = 0; i < size(); i++) { if (exist(i)) { SDESItem *compareItem = (SDESItem *)(get(i)); if (compareItem->getType() == sdesItem->getType()) { remove(compareItem); _length = _length - compareItem->getLength(); delete compareItem; }; } }; //sdesItem->setOwner(this); add(sdesItem); _length = _length + (sdesItem->getLength()); };
void SDESChunk::dump | ( | std::ostream & | os | ) | [virtual] |
SDESChunk * SDESChunk::dup | ( | ) | const [virtual] |
int SDESChunk::getLength | ( | ) | [virtual] |
Returns the length in bytes of this SDESChunk.
Definition at line 184 of file sdes.cc.
Referenced by RTCPSDESPacket::addSDESChunk().
{ return _length; };
uint32 SDESChunk::getSSRC | ( | ) | [virtual] |
Returns the ssrc identifier this SDESChunk is for.
Definition at line 174 of file sdes.cc.
Referenced by RTPParticipantInfo::getSSRC(), and RTCP::processIncomingRTCPPacket().
{ return _ssrc; };
std::string SDESChunk::info | ( | ) | [virtual] |
Operator equal.
Definition at line 124 of file sdes.cc.
Referenced by SDESChunk().
{ cArray::operator=(sdesChunk); _ssrc = sdesChunk._ssrc; _length = sdesChunk._length; return *this; };
void SDESChunk::setSSRC | ( | uint32 | ssrc | ) | [virtual] |
Sets the ssrc identifier this SDESChunk is for.
Definition at line 179 of file sdes.cc.
Referenced by RTPParticipantInfo::setSSRC().
{ _ssrc = ssrc; };
int SDESChunk::_length [protected] |
The length in bytes of this SDESChunk.
Definition at line 201 of file sdes.h.
Referenced by addSDESItem(), getLength(), operator=(), and SDESChunk().
uint32 SDESChunk::_ssrc [protected] |
The ssrc identifier this SDESChunk is for.
Definition at line 196 of file sdes.h.
Referenced by dump(), getSSRC(), info(), operator=(), SDESChunk(), and setSSRC().