#include <RTPInnerPacket.h>
This enumeration is a list of all possibly types of an RTPInnerPacket.
00049 { 00050 RTP_INP_UNDEF, 00051 RTP_INP_INITIALIZE_PROFILE, 00052 RTP_INP_PROFILE_INITIALIZED, 00053 RTP_INP_INITIALIZE_RTCP, 00054 RTP_INP_RTCP_INITIALIZED, 00055 RTP_INP_CREATE_SENDER_MODULE, 00056 RTP_INP_SENDER_MODULE_CREATED, 00057 RTP_INP_DELETE_SENDER_MODULE, 00058 RTP_INP_SENDER_MODULE_DELETED, 00059 RTP_INP_INITIALIZE_SENDER_MODULE, 00060 RTP_INP_SENDER_MODULE_INITIALIZED, 00061 RTP_INP_SENDER_MODULE_CONTROL, 00062 RTP_INP_SENDER_MODULE_STATUS, 00063 RTP_INP_LEAVE_SESSION, 00064 RTP_INP_SESSION_LEFT, 00065 RTP_INP_DATA_OUT, 00066 RTP_INP_DATA_IN 00067 };
RTPInnerPacket::RTPInnerPacket | ( | const char * | name = NULL |
) |
Default constructor
00032 : cPacket(name) { 00033 _type = RTP_INP_UNDEF; 00034 _commonName = NULL; 00035 _mtu = 0; 00036 _bandwidth = 0; 00037 _rtcpPercentage = 0; 00038 _address = IPADDRESS_UNDEF; 00039 _port = IPSuite_PORT_UNDEF; 00040 _ssrc = 0; 00041 _payloadType = 0; 00042 _fileName = NULL; 00043 _clockRate = 0; 00044 _timeStampBase = 0; 00045 _sequenceNumberBase = 0; 00046 };
RTPInnerPacket::RTPInnerPacket | ( | const RTPInnerPacket & | rinp | ) |
RTPInnerPacket::~RTPInnerPacket | ( | ) | [virtual] |
Destructor.
00055 { 00056 if (opp_strcmp(_commonName, "")) 00057 delete _commonName; 00058 if (opp_strcmp(_fileName, "")) 00059 delete _fileName; 00060 };
IN_Addr RTPInnerPacket::address | ( | ) | [virtual] |
int RTPInnerPacket::bandwidth | ( | ) | [virtual] |
Returns the available bandwitdth as stored in this RTPInnerPacket.
00243 { 00244 return _bandwidth; 00245 };
const char * RTPInnerPacket::className | ( | ) | const [virtual] |
int RTPInnerPacket::clockRate | ( | ) | [virtual] |
const char * RTPInnerPacket::commonName | ( | ) | [virtual] |
Returns the CNAME stored in this RTPInnerPacket.
00233 { 00234 return opp_strdup(_commonName); 00235 };
void RTPInnerPacket::createSenderModule | ( | u_int32 | ssrc, | |
int | payloadType, | |||
const char * | fileName | |||
) | [virtual] |
00147 { 00148 _type = RTP_INP_CREATE_SENDER_MODULE; 00149 _ssrc = ssrc; 00150 _payloadType = payloadType; 00151 _fileName = fileName; 00152 };
void RTPInnerPacket::dataIn | ( | RTPPacket * | packet, | |
IN_Addr | address, | |||
IN_Port | port | |||
) | [virtual] |
Capsultes the incoming RTPPacket into this RTPInnerPacket to transport it within the rtp layer.
00220 { 00221 _type = RTP_INP_DATA_IN; 00222 _address = address; 00223 _port = port; 00224 encapsulate(packet); 00225 };
void RTPInnerPacket::dataOut | ( | RTPPacket * | packet | ) | [virtual] |
Capsulates the outgoing RTPPacket into this RTPInnerPacket to transport it within the rtp layer.
00214 { 00215 _type = RTP_INP_DATA_OUT; 00216 encapsulate(packet); 00217 };
void RTPInnerPacket::deleteSenderModule | ( | u_int32 | ssrc | ) | [virtual] |
cObject * RTPInnerPacket::dup | ( | ) | const [virtual] |
Duplicates the RTPInnerPacket by calling the copy constructor.
00082 { 00083 return new RTPInnerPacket(*this); 00084 };
const char * RTPInnerPacket::fileName | ( | ) | [virtual] |
Returns the file name stored in this RTPInnerPacket.
00268 { 00269 return opp_strdup(_fileName); 00270 };
std::string RTPInnerPacket::info | ( | ) | [virtual] |
Writes a short info about this RTPInnerPacket into the given string.
00092 { 00093 std::stringstream out; 00094 out << "RTPInnerPacket: type=" << _type; 00095 return out.str(); 00096 };
void RTPInnerPacket::initializeProfile | ( | int | mtu | ) | [virtual] |
Called by the rtp module after creating the profile module. It informes the profile about the maximum size an rtp packet can have.
00117 { 00118 _type = RTP_INP_INITIALIZE_PROFILE; 00119 _mtu = mtu; 00120 };
void RTPInnerPacket::initializeRTCP | ( | const char * | commonName, | |
int | mtu, | |||
int | bandwidth, | |||
int | rtcpPercentage, | |||
IN_Addr | address, | |||
IN_Port | port | |||
) | [virtual] |
Called by the rtp module to inform the rtcp module about mandatory information for starting the rtp session.
00130 { 00131 _type = RTP_INP_INITIALIZE_RTCP; 00132 _commonName = commonName; 00133 _mtu = mtu; 00134 _bandwidth = bandwidth; 00135 _rtcpPercentage = rtcpPercentage; 00136 _address = address; 00137 _port = port; 00138 };
void RTPInnerPacket::initializeSenderModule | ( | u_int32 | ssrc, | |
const char * | fileName, | |||
int | mtu | |||
) | [virtual] |
void RTPInnerPacket::leaveSession | ( | ) | [virtual] |
Called by the rtp module to inform the rtcp module that the session should be left.
00204 { 00205 _type = RTP_INP_LEAVE_SESSION; 00206 };
int RTPInnerPacket::mtu | ( | ) | [virtual] |
Returns the maximum transmission unit stored in this RTPInnerPacket.
00238 { 00239 return _mtu; 00240 };
RTPInnerPacket & RTPInnerPacket::operator= | ( | const RTPInnerPacket & | rinp | ) |
Assignment operator.
00063 { 00064 cPacket::operator=(rinp); 00065 _type = rinp._type; 00066 _commonName = opp_strdup(rinp._commonName); 00067 _mtu = rinp._mtu; 00068 _bandwidth = rinp._bandwidth; 00069 _rtcpPercentage = rinp._rtcpPercentage; 00070 _address = rinp._address; 00071 _port = rinp._port; 00072 _ssrc = rinp._ssrc; 00073 _payloadType = rinp._payloadType; 00074 _fileName = opp_strdup(rinp._fileName); 00075 _clockRate = rinp._clockRate; 00076 _timeStampBase = rinp._timeStampBase; 00077 _sequenceNumberBase = rinp._sequenceNumberBase; 00078 return *this; 00079 };
int RTPInnerPacket::payloadType | ( | ) | [virtual] |
IN_Port RTPInnerPacket::port | ( | ) | [virtual] |
void RTPInnerPacket::profileInitialized | ( | int | rtcpPercentage, | |
IN_Port | port | |||
) | [virtual] |
Called by the profile module after it has received the initializeProfile() message. It informs the rtp module about the percentage of the available bandwidth to be used by rtcp and the preferred port for this profile.
00123 { 00124 _type = RTP_INP_PROFILE_INITIALIZED; 00125 _rtcpPercentage = rtcpPercentage; 00126 _port = port; 00127 };
void RTPInnerPacket::rtcpInitialized | ( | u_int32 | ssrc | ) | [virtual] |
Called by the rtcp module after it has waited for half an rtcp interval for incoming messages from other session participants. It informs the rtp module which later informs the rtp application about the ssrc identifier
00141 { 00142 _type = RTP_INP_RTCP_INITIALIZED; 00143 _ssrc = ssrc; 00144 };
int RTPInnerPacket::rtcpPercentage | ( | ) | [virtual] |
Returns the percentage of bandwidth for rtcp as stored in this RTPInnerPacket.
00248 { 00249 return _rtcpPercentage; 00250 };
void RTPInnerPacket::senderModuleControl | ( | u_int32 | ssrc, | |
RTPSenderControlMessage * | msg | |||
) | [virtual] |
00190 { 00191 _type = RTP_INP_SENDER_MODULE_CONTROL; 00192 _ssrc = ssrc; 00193 encapsulate(msg); 00194 };
void RTPInnerPacket::senderModuleCreated | ( | u_int32 | ssrc | ) | [virtual] |
void RTPInnerPacket::senderModuleDeleted | ( | u_int32 | ssrc | ) | [virtual] |
void RTPInnerPacket::senderModuleInitialized | ( | u_int32 | ssrc, | |
int | payloadType, | |||
int | clockRate, | |||
int | timeStampBase, | |||
int | sequenceNumberBase | |||
) | [virtual] |
00181 { 00182 _type = RTP_INP_SENDER_MODULE_INITIALIZED; 00183 _ssrc = ssrc; 00184 _payloadType = payloadType; 00185 _clockRate = clockRate; 00186 _timeStampBase = timeStampBase; 00187 _sequenceNumberBase = sequenceNumberBase; 00188 };
void RTPInnerPacket::senderModuleStatus | ( | u_int32 | ssrc, | |
RTPSenderStatusMessage * | msg | |||
) | [virtual] |
00197 { 00198 _type = RTP_INP_SENDER_MODULE_STATUS; 00199 _ssrc = ssrc; 00200 encapsulate(msg); 00201 };
int RTPInnerPacket::sequenceNumberBase | ( | ) | [virtual] |
Returns the rtp sequence number base stored in this RTPInnerPacket.
00288 { 00289 return _sequenceNumberBase; 00290 };
void RTPInnerPacket::sessionLeft | ( | ) | [virtual] |
Called by the rtcp module when the rtcp bye packet has been sent to the network.
00209 { 00210 _type = RTP_INP_SESSION_LEFT; 00211 };
u_int32 RTPInnerPacket::ssrc | ( | ) | [virtual] |
int RTPInnerPacket::timeStampBase | ( | ) | [virtual] |
Returns the rtp time stamp base stored in this RTPInnerPacket.
00283 { 00284 return _timeStampBase; 00285 };
RTPInnerPacket::RTP_INP_TYPE RTPInnerPacket::type | ( | ) | [virtual] |
void RTPInnerPacket::writeContents | ( | std::ostream & | os | ) | const [virtual] |
Writes a longer info about this RTPInnerPacket into the given output stream.
00099 { 00100 os << "RTPInnerPacket:" << endl; 00101 os << " type = " << _type << endl; 00102 os << " commonName = " << _commonName << endl; 00103 os << " mtu = " << _mtu << endl; 00104 os << " bandwidth = " << _bandwidth << endl; 00105 os << " rtcpPercentage = " << _rtcpPercentage << endl; 00106 os << " address = " << _address << endl; 00107 os << " port = " << _port << endl; 00108 os << " ssrc = " << _ssrc << endl; 00109 os << " payloadType = " << _payloadType << endl; 00110 os << " fileName = " << _fileName << endl; 00111 os << " clockRate = " << _clockRate << endl; 00112 os << " timeStampBase = " << _timeStampBase << endl; 00113 os << " sequenceNumberBase = " << _sequenceNumberBase << endl; 00114 };
IN_Addr RTPInnerPacket::_address [private] |
The address stored this RTPInnerPacket.
int RTPInnerPacket::_bandwidth [private] |
The bandwidth stored in this RTPInnerPacket.
int RTPInnerPacket::_clockRate [private] |
The clock rate stored in this RTPInnerPacket.
const char* RTPInnerPacket::_commonName [private] |
The CNAME stored in this RTPInnerPacket.
const char* RTPInnerPacket::_fileName [private] |
The file name stored in this RTPInnerPacket.
int RTPInnerPacket::_mtu [private] |
The mtu stored in this RTPInnerPacket.
int RTPInnerPacket::_payloadType [private] |
The payload type stored in this RTPInnerPacket.
IN_Port RTPInnerPacket::_port [private] |
The port stored this RTPInnerPacket.
int RTPInnerPacket::_rtcpPercentage [private] |
The rtcp percentage stored in this RTPInnerPacket.
int RTPInnerPacket::_sequenceNumberBase [private] |
The rtp sequence number base stored in this RTPInnerPacket.
u_int32 RTPInnerPacket::_ssrc [private] |
The ssrc identifier stored in this RTPInnerPacket.
int RTPInnerPacket::_timeStampBase [private] |
The rtp time stamp base stored in this RTPInnerPacket.
RTP_INP_TYPE RTPInnerPacket::_type [private] |
The type of this RTPInnerPacket.