SDESItem Class Reference

#include <RTCP.hh>


Public Member Functions

 SDESItem (unsigned char tag, unsigned char const *value)
unsigned char const * data () const
unsigned totalSize () const

Private Attributes

unsigned char fData [2+0xFF]


Detailed Description

Definition at line 31 of file RTCP.hh.


Constructor & Destructor Documentation

SDESItem::SDESItem ( unsigned char  tag,
unsigned char const *  value 
)

Definition at line 895 of file RTCP.cpp.

References fData.

00895                                                                 {
00896   unsigned length = strlen((char const*)value);
00897   if (length > 511) length = 511;
00898 
00899   fData[0] = tag;
00900   fData[1] = (unsigned char)length;
00901   memmove(&fData[2], value, length);
00902 
00903   // Pad the trailing bytes to a 4-byte boundary:
00904   while ((length)%4 > 0) fData[2 + length++] = '\0';
00905 }


Member Function Documentation

unsigned char const* SDESItem::data (  )  const [inline]

Definition at line 35 of file RTCP.hh.

References fData.

Referenced by RTCPInstance::addSDES().

00035 {return fData;}

unsigned SDESItem::totalSize (  )  const

Definition at line 907 of file RTCP.cpp.

References fData.

Referenced by RTCPInstance::addSDES().

00907                                    {
00908   return 2 + (unsigned)fData[1];
00909 }


Field Documentation

unsigned char SDESItem::fData[2+0xFF] [private]

Definition at line 39 of file RTCP.hh.

Referenced by data(), SDESItem(), and totalSize().


The documentation for this class was generated from the following files:
Generated on Tue Oct 7 15:40:10 2008 for live by  doxygen 1.5.2