#include <sdes.h>
Public Member Functions | |
SDESChunk (const char *name=NULL, u_int32 ssrc=0) | |
SDESChunk (const SDESChunk &sdesChunk) | |
virtual | ~SDESChunk () |
SDESChunk & | operator= (const SDESChunk &sdesChunk) |
virtual cObject * | dup () const |
virtual const char * | className () const |
virtual std::string | info () |
virtual void | writeContents (std::ostream &os) |
virtual void | addSDESItem (SDESItem *item) |
virtual u_int32 | ssrc () |
virtual void | setSSRC (u_int32 ssrc) |
virtual int | length () |
Protected Attributes | |
u_int32 | _ssrc |
int | _length |
|
Default constructor.
|
|
Copy constructor. 00122 : cArray(sdesChunk) { 00123 setName(sdesChunk.name()); 00124 operator=(sdesChunk); 00125 };
|
|
Destructor. 00128 { 00129 };
|
|
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. 00168 { 00169 for (int i = 0; i < items(); i++) { 00170 if (exist(i)) { 00171 SDESItem *compareItem = (SDESItem *)(get(i)); 00172 if (compareItem->type() == sdesItem->type()) { 00173 remove(compareItem); 00174 _length = _length - compareItem->length(); 00175 delete compareItem; 00176 }; 00177 } 00178 }; 00179 00180 //sdesItem->setOwner(this); 00181 add(sdesItem); 00182 _length = _length + (sdesItem->length()); 00183 00184 };
|
|
Returns the class name "SDESChunk". 00145 { 00146 return "SDESChunk"; 00147 };
|
|
Duplicates this SDESChunk by calling the copy constructor. 00140 { 00141 return new SDESChunk(*this); 00142 };
|
|
Writes a short info about this SDESChunk into the given string. 00150 { 00151 std::stringstream out; 00152 out << "SDESChunk.ssrc=" << _ssrc << " items=" << items(); 00153 return out.str(); 00154 };
|
|
Returns the length in bytes of this SDESChunk. 00197 { 00198 return _length; 00199 };
|
|
Operator equal. 00132 { 00133 cArray::operator=(sdesChunk); 00134 _ssrc = sdesChunk._ssrc; 00135 _length = sdesChunk._length; 00136 return *this; 00137 };
|
|
Sets the ssrc identifier this SDESChunk is for. 00192 { 00193 _ssrc = ssrc; 00194 };
|
|
Returns the ssrc identifier this SDESChunk is for. 00187 { 00188 return _ssrc; 00189 };
|
|
Writes a longer info about this SDESChunk into the given stream. 00157 { 00158 os << "SDESChunk:" << endl; 00159 os << " ssrc = " << _ssrc << endl; 00160 for (int i = 0; i < items(); i++) { 00161 if (exist(i)) { 00162 get(i)->writeContents(os); 00163 }; 00164 }; 00165 };
|
|
The length in bytes of this SDESChunk. |
|
The ssrc identifier this SDESChunk is for. |