#include <RTPInnerPacket.h>
Public Types | |
enum | RTP_INP_TYPE { RTP_INP_UNDEF, RTP_INP_INITIALIZE_PROFILE, RTP_INP_PROFILE_INITIALIZED, RTP_INP_INITIALIZE_RTCP, RTP_INP_RTCP_INITIALIZED, RTP_INP_CREATE_SENDER_MODULE, RTP_INP_SENDER_MODULE_CREATED, RTP_INP_DELETE_SENDER_MODULE, RTP_INP_SENDER_MODULE_DELETED, RTP_INP_INITIALIZE_SENDER_MODULE, RTP_INP_SENDER_MODULE_INITIALIZED, RTP_INP_SENDER_MODULE_CONTROL, RTP_INP_SENDER_MODULE_STATUS, RTP_INP_LEAVE_SESSION, RTP_INP_SESSION_LEFT, RTP_INP_DATA_OUT, RTP_INP_DATA_IN } |
Public Member Functions | |
RTPInnerPacket (const char *name=NULL) | |
RTPInnerPacket (const RTPInnerPacket &rinp) | |
virtual | ~RTPInnerPacket () |
RTPInnerPacket & | operator= (const RTPInnerPacket &rinp) |
virtual RTPInnerPacket * | dup () const |
virtual std::string | info () |
virtual void | dump (std::ostream &os) const |
virtual void | initializeProfile (int mtu) |
virtual void | profileInitialized (int rtcpPercentage, int port) |
virtual void | initializeRTCP (const char *commonName, int mtu, int bandwidth, int rtcpPercentage, IPAddress address, int port) |
virtual void | rtcpInitialized (uint32 ssrc) |
virtual void | createSenderModule (uint32 ssrc, int payloadType, const char *fileName) |
virtual void | senderModuleCreated (uint32 ssrc) |
virtual void | deleteSenderModule (uint32 ssrc) |
virtual void | senderModuleDeleted (uint32 ssrc) |
virtual void | initializeSenderModule (uint32 ssrc, const char *fileName, int mtu) |
virtual void | senderModuleInitialized (uint32 ssrc, int payloadType, int clockRate, int timeStampBase, int sequenceNumberBase) |
virtual void | senderModuleControl (uint32 ssrc, RTPSenderControlMessage *msg) |
virtual void | senderModuleStatus (uint32 ssrc, RTPSenderStatusMessage *msg) |
virtual void | leaveSession () |
virtual void | sessionLeft () |
virtual void | dataOut (RTPPacket *packet) |
virtual void | dataIn (RTPPacket *packet, IPAddress address, int port) |
virtual RTP_INP_TYPE | getType () |
virtual const char * | getCommonName () |
virtual int | getMTU () |
virtual int | getBandwidth () |
virtual int | getRtcpPercentage () |
virtual IPAddress | getAddress () |
virtual int | getPort () |
virtual uint32 | getSSRC () |
virtual int | getPayloadType () |
virtual const char * | getFileName () |
virtual int | getClockRate () |
virtual int | getTimeStampBase () |
virtual int | getSequenceNumberBase () |
Protected Attributes | |
RTP_INP_TYPE | _type |
const char * | _commonName |
int | _mtu |
int | _bandwidth |
int | _rtcpPercentage |
IPAddress | _address |
int | _port |
uint32 | _ssrc |
int | _payloadType |
const char * | _fileName |
int | _clockRate |
int | _timeStampBase |
int | _sequenceNumberBase |
This enumeration is a list of all possibly types of an RTPInnerPacket.
00044 { 00045 RTP_INP_UNDEF, 00046 RTP_INP_INITIALIZE_PROFILE, 00047 RTP_INP_PROFILE_INITIALIZED, 00048 RTP_INP_INITIALIZE_RTCP, 00049 RTP_INP_RTCP_INITIALIZED, 00050 RTP_INP_CREATE_SENDER_MODULE, 00051 RTP_INP_SENDER_MODULE_CREATED, 00052 RTP_INP_DELETE_SENDER_MODULE, 00053 RTP_INP_SENDER_MODULE_DELETED, 00054 RTP_INP_INITIALIZE_SENDER_MODULE, 00055 RTP_INP_SENDER_MODULE_INITIALIZED, 00056 RTP_INP_SENDER_MODULE_CONTROL, 00057 RTP_INP_SENDER_MODULE_STATUS, 00058 RTP_INP_LEAVE_SESSION, 00059 RTP_INP_SESSION_LEFT, 00060 RTP_INP_DATA_OUT, 00061 RTP_INP_DATA_IN 00062 };
RTPInnerPacket::RTPInnerPacket | ( | const char * | name = NULL |
) |
Default constructor
Referenced by dup().
00030 : cPacket(name) { 00031 _type = RTP_INP_UNDEF; 00032 _commonName = NULL; 00033 _mtu = 0; 00034 _bandwidth = 0; 00035 _rtcpPercentage = 0; 00036 _address = IPAddress::UNSPECIFIED_ADDRESS; 00037 _port = PORT_UNDEF; 00038 _ssrc = 0; 00039 _payloadType = 0; 00040 _fileName = NULL; 00041 _clockRate = 0; 00042 _timeStampBase = 0; 00043 _sequenceNumberBase = 0; 00044 };
RTPInnerPacket::RTPInnerPacket | ( | const RTPInnerPacket & | rinp | ) |
Copy constructor.
00047 : cPacket() { 00048 setName(rinp.getName()); 00049 operator=(rinp); 00050 };
RTPInnerPacket::~RTPInnerPacket | ( | ) | [virtual] |
Destructor.
00053 { 00054 if (opp_strcmp(_commonName, "")) 00055 delete _commonName; 00056 if (opp_strcmp(_fileName, "")) 00057 delete _fileName; 00058 };
RTPInnerPacket & RTPInnerPacket::operator= | ( | const RTPInnerPacket & | rinp | ) |
Assignment operator.
Referenced by RTPInnerPacket().
00061 { 00062 cPacket::operator=(rinp); 00063 _type = rinp._type; 00064 _commonName = opp_strdup(rinp._commonName); 00065 _mtu = rinp._mtu; 00066 _bandwidth = rinp._bandwidth; 00067 _rtcpPercentage = rinp._rtcpPercentage; 00068 _address = rinp._address; 00069 _port = rinp._port; 00070 _ssrc = rinp._ssrc; 00071 _payloadType = rinp._payloadType; 00072 _fileName = opp_strdup(rinp._fileName); 00073 _clockRate = rinp._clockRate; 00074 _timeStampBase = rinp._timeStampBase; 00075 _sequenceNumberBase = rinp._sequenceNumberBase; 00076 return *this; 00077 };
RTPInnerPacket * RTPInnerPacket::dup | ( | ) | const [virtual] |
Duplicates the RTPInnerPacket by calling the copy constructor.
00080 { 00081 return new RTPInnerPacket(*this); 00082 };
std::string RTPInnerPacket::info | ( | ) | [virtual] |
Writes a short info about this RTPInnerPacket into the given string.
00085 { 00086 std::stringstream out; 00087 out << "RTPInnerPacket: type=" << _type; 00088 return out.str(); 00089 };
void RTPInnerPacket::dump | ( | std::ostream & | os | ) | const [virtual] |
Writes a longer info about this RTPInnerPacket into the given output stream.
00092 { 00093 os << "RTPInnerPacket:" << endl; 00094 os << " type = " << _type << endl; 00095 os << " commonName = " << _commonName << endl; 00096 os << " mtu = " << _mtu << endl; 00097 os << " bandwidth = " << _bandwidth << endl; 00098 os << " rtcpPercentage = " << _rtcpPercentage << endl; 00099 os << " address = " << _address << endl; 00100 os << " port = " << _port << endl; 00101 os << " ssrc = " << _ssrc << endl; 00102 os << " payloadType = " << _payloadType << endl; 00103 os << " fileName = " << _fileName << endl; 00104 os << " clockRate = " << _clockRate << endl; 00105 os << " timeStampBase = " << _timeStampBase << endl; 00106 os << " sequenceNumberBase = " << _sequenceNumberBase << endl; 00107 };
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.
Referenced by RTP::initializeProfile().
00110 { 00111 _type = RTP_INP_INITIALIZE_PROFILE; 00112 _mtu = mtu; 00113 };
void RTPInnerPacket::profileInitialized | ( | int | rtcpPercentage, | |
int | 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.
Referenced by RTPProfile::initializeProfile().
00116 { 00117 _type = RTP_INP_PROFILE_INITIALIZED; 00118 _rtcpPercentage = rtcpPercentage; 00119 _port = port; 00120 };
void RTPInnerPacket::initializeRTCP | ( | const char * | commonName, | |
int | mtu, | |||
int | bandwidth, | |||
int | rtcpPercentage, | |||
IPAddress | address, | |||
int | port | |||
) | [virtual] |
Called by the rtp module to inform the rtcp module about mandatory information for starting the rtp session.
Referenced by RTP::initializeRTCP().
00123 { 00124 _type = RTP_INP_INITIALIZE_RTCP; 00125 _commonName = commonName; 00126 _mtu = mtu; 00127 _bandwidth = bandwidth; 00128 _rtcpPercentage = rtcpPercentage; 00129 _address = address; 00130 _port = port; 00131 };
void RTPInnerPacket::rtcpInitialized | ( | uint32 | 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
Referenced by RTCP::handleSelfMessage().
00134 { 00135 _type = RTP_INP_RTCP_INITIALIZED; 00136 _ssrc = ssrc; 00137 };
void RTPInnerPacket::createSenderModule | ( | uint32 | ssrc, | |
int | payloadType, | |||
const char * | fileName | |||
) | [virtual] |
Referenced by RTP::createSenderModule().
00140 { 00141 _type = RTP_INP_CREATE_SENDER_MODULE; 00142 _ssrc = ssrc; 00143 _payloadType = payloadType; 00144 _fileName = fileName; 00145 };
void RTPInnerPacket::senderModuleCreated | ( | uint32 | ssrc | ) | [virtual] |
Referenced by RTPProfile::createSenderModule().
00148 { 00149 _type = RTP_INP_SENDER_MODULE_CREATED; 00150 _ssrc = ssrc; 00151 };
void RTPInnerPacket::deleteSenderModule | ( | uint32 | ssrc | ) | [virtual] |
Referenced by RTP::deleteSenderModule().
00154 { 00155 _type = RTP_INP_DELETE_SENDER_MODULE; 00156 _ssrc = ssrc; 00157 };
void RTPInnerPacket::senderModuleDeleted | ( | uint32 | ssrc | ) | [virtual] |
Referenced by RTPProfile::deleteSenderModule().
00160 { 00161 _type = RTP_INP_SENDER_MODULE_DELETED; 00162 _ssrc = ssrc; 00163 };
void RTPInnerPacket::initializeSenderModule | ( | uint32 | ssrc, | |
const char * | fileName, | |||
int | mtu | |||
) | [virtual] |
Referenced by RTPProfile::createSenderModule().
00166 { 00167 _type = RTP_INP_INITIALIZE_SENDER_MODULE; 00168 _ssrc = ssrc; 00169 _fileName = fileName; 00170 _mtu = mtu; 00171 };
void RTPInnerPacket::senderModuleInitialized | ( | uint32 | ssrc, | |
int | payloadType, | |||
int | clockRate, | |||
int | timeStampBase, | |||
int | sequenceNumberBase | |||
) | [virtual] |
Referenced by RTPPayloadSender::initializeSenderModule().
00174 { 00175 _type = RTP_INP_SENDER_MODULE_INITIALIZED; 00176 _ssrc = ssrc; 00177 _payloadType = payloadType; 00178 _clockRate = clockRate; 00179 _timeStampBase = timeStampBase; 00180 _sequenceNumberBase = sequenceNumberBase; 00181 };
void RTPInnerPacket::senderModuleControl | ( | uint32 | ssrc, | |
RTPSenderControlMessage * | msg | |||
) | [virtual] |
Referenced by RTP::senderModuleControl().
00183 { 00184 _type = RTP_INP_SENDER_MODULE_CONTROL; 00185 _ssrc = ssrc; 00186 encapsulate(msg); 00187 };
void RTPInnerPacket::senderModuleStatus | ( | uint32 | ssrc, | |
RTPSenderStatusMessage * | msg | |||
) | [virtual] |
Referenced by RTPPayloadSender::endOfFile(), RTPPayloadSender::pause(), RTPPayloadSender::play(), and RTPPayloadSender::stop().
00190 { 00191 _type = RTP_INP_SENDER_MODULE_STATUS; 00192 _ssrc = ssrc; 00193 encapsulate(msg); 00194 };
void RTPInnerPacket::leaveSession | ( | ) | [virtual] |
Called by the rtp module to inform the rtcp module that the session should be left.
Referenced by RTP::leaveSession().
00197 { 00198 _type = RTP_INP_LEAVE_SESSION; 00199 };
void RTPInnerPacket::sessionLeft | ( | ) | [virtual] |
Called by the rtcp module when the rtcp bye packet has been sent to the network.
Referenced by RTCP::createPacket().
00202 { 00203 _type = RTP_INP_SESSION_LEFT; 00204 };
void RTPInnerPacket::dataOut | ( | RTPPacket * | packet | ) | [virtual] |
Capsulates the outgoing RTPPacket into this RTPInnerPacket to transport it within the rtp layer.
Referenced by RTPAVProfilePayload32Sender::sendPacket().
00207 { 00208 _type = RTP_INP_DATA_OUT; 00209 encapsulate(packet); 00210 };
Capsultes the incoming RTPPacket into this RTPInnerPacket to transport it within the rtp layer.
Referenced by RTP::readRet().
00213 { 00214 _type = RTP_INP_DATA_IN; 00215 _address = address; 00216 _port = port; 00217 encapsulate(packet); 00218 };
RTPInnerPacket::RTP_INP_TYPE RTPInnerPacket::getType | ( | ) | [virtual] |
Returns the type of this RTPInnerPacket.
Referenced by RTPPayloadSender::activity(), RTPPayloadReceiver::handleMessage(), RTPProfile::handleMessageFromPayloadSender(), RTP::handleMessageFromProfile(), RTP::handleMessageFromRTCP(), RTPProfile::handleMessageFromRTP(), and RTCP::handleMessageFromRTP().
00221 { 00222 return _type; 00223 };
const char * RTPInnerPacket::getCommonName | ( | ) | [virtual] |
Returns the CNAME stored in this RTPInnerPacket.
Referenced by RTCP::initializeRTCP().
00226 { 00227 return opp_strdup(_commonName); 00228 };
int RTPInnerPacket::getMTU | ( | ) | [virtual] |
Returns the maximum transmission unit stored in this RTPInnerPacket.
Referenced by RTPProfile::initializeProfile(), RTCP::initializeRTCP(), and RTPPayloadSender::initializeSenderModule().
00231 { 00232 return _mtu; 00233 };
int RTPInnerPacket::getBandwidth | ( | ) | [virtual] |
Returns the available bandwitdth as stored in this RTPInnerPacket.
Referenced by RTCP::initializeRTCP().
00236 { 00237 return _bandwidth; 00238 };
int RTPInnerPacket::getRtcpPercentage | ( | ) | [virtual] |
Returns the percentage of bandwidth for rtcp as stored in this RTPInnerPacket.
Referenced by RTCP::initializeRTCP(), and RTP::profileInitialized().
00241 { 00242 return _rtcpPercentage; 00243 };
IPAddress RTPInnerPacket::getAddress | ( | ) | [virtual] |
Returns the address stored in this RTPInnerPacket.
Referenced by RTCP::dataIn(), and RTCP::initializeRTCP().
00246 { 00247 return _address; 00248 };
int RTPInnerPacket::getPort | ( | ) | [virtual] |
Returns the port stored in this RTPInnerPacket.
Referenced by RTCP::dataIn(), RTCP::initializeRTCP(), and RTP::profileInitialized().
00251 { 00252 return _port; 00253 };
uint32 RTPInnerPacket::getSSRC | ( | ) | [virtual] |
Returns the ssrc identifier stored in this RTPInnerPacket.
Referenced by RTPProfile::createSenderModule(), RTPProfile::deleteSenderModule(), RTPPayloadSender::initializeSenderModule(), RTP::rtcpInitialized(), RTP::senderModuleControl(), RTP::senderModuleCreated(), RTP::senderModuleDeleted(), and RTP::senderModuleStatus().
00256 { 00257 return _ssrc; 00258 };
int RTPInnerPacket::getPayloadType | ( | ) | [virtual] |
Returns the payload type stored in this RTPInnerPacket.
Referenced by RTPProfile::createSenderModule().
00266 { 00267 return _payloadType; 00268 };
const char * RTPInnerPacket::getFileName | ( | ) | [virtual] |
Returns the file name stored in this RTPInnerPacket.
Referenced by RTPProfile::createSenderModule(), and RTPPayloadSender::initializeSenderModule().
00261 { 00262 return opp_strdup(_fileName); 00263 };
int RTPInnerPacket::getClockRate | ( | ) | [virtual] |
Returns the rtp clock rate stored in this RTPInnerPacket.
Referenced by RTCP::senderModuleInitialized().
00271 { 00272 return _clockRate; 00273 };
int RTPInnerPacket::getTimeStampBase | ( | ) | [virtual] |
Returns the rtp time stamp base stored in this RTPInnerPacket.
Referenced by RTCP::senderModuleInitialized().
00276 { 00277 return _timeStampBase; 00278 };
int RTPInnerPacket::getSequenceNumberBase | ( | ) | [virtual] |
Returns the rtp sequence number base stored in this RTPInnerPacket.
Referenced by RTCP::senderModuleInitialized().
00281 { 00282 return _sequenceNumberBase; 00283 };
RTP_INP_TYPE RTPInnerPacket::_type [protected] |
The type of this RTPInnerPacket.
Referenced by createSenderModule(), dataIn(), dataOut(), deleteSenderModule(), dump(), getType(), info(), initializeProfile(), initializeRTCP(), initializeSenderModule(), leaveSession(), operator=(), profileInitialized(), rtcpInitialized(), RTPInnerPacket(), senderModuleControl(), senderModuleCreated(), senderModuleDeleted(), senderModuleInitialized(), senderModuleStatus(), and sessionLeft().
const char* RTPInnerPacket::_commonName [protected] |
The CNAME stored in this RTPInnerPacket.
Referenced by dump(), getCommonName(), initializeRTCP(), operator=(), RTPInnerPacket(), and ~RTPInnerPacket().
int RTPInnerPacket::_mtu [protected] |
The mtu stored in this RTPInnerPacket.
Referenced by dump(), getMTU(), initializeProfile(), initializeRTCP(), initializeSenderModule(), operator=(), and RTPInnerPacket().
int RTPInnerPacket::_bandwidth [protected] |
The bandwidth stored in this RTPInnerPacket.
Referenced by dump(), getBandwidth(), initializeRTCP(), operator=(), and RTPInnerPacket().
int RTPInnerPacket::_rtcpPercentage [protected] |
The rtcp percentage stored in this RTPInnerPacket.
Referenced by dump(), getRtcpPercentage(), initializeRTCP(), operator=(), profileInitialized(), and RTPInnerPacket().
IPAddress RTPInnerPacket::_address [protected] |
The address stored this RTPInnerPacket.
Referenced by dataIn(), dump(), getAddress(), initializeRTCP(), operator=(), and RTPInnerPacket().
int RTPInnerPacket::_port [protected] |
The port stored this RTPInnerPacket.
Referenced by dataIn(), dump(), getPort(), initializeRTCP(), operator=(), profileInitialized(), and RTPInnerPacket().
uint32 RTPInnerPacket::_ssrc [protected] |
The ssrc identifier stored in this RTPInnerPacket.
Referenced by createSenderModule(), deleteSenderModule(), dump(), getSSRC(), initializeSenderModule(), operator=(), rtcpInitialized(), RTPInnerPacket(), senderModuleControl(), senderModuleCreated(), senderModuleDeleted(), senderModuleInitialized(), and senderModuleStatus().
int RTPInnerPacket::_payloadType [protected] |
The payload type stored in this RTPInnerPacket.
Referenced by createSenderModule(), dump(), getPayloadType(), operator=(), RTPInnerPacket(), and senderModuleInitialized().
const char* RTPInnerPacket::_fileName [protected] |
The file name stored in this RTPInnerPacket.
Referenced by createSenderModule(), dump(), getFileName(), initializeSenderModule(), operator=(), RTPInnerPacket(), and ~RTPInnerPacket().
int RTPInnerPacket::_clockRate [protected] |
The clock rate stored in this RTPInnerPacket.
Referenced by dump(), getClockRate(), operator=(), RTPInnerPacket(), and senderModuleInitialized().
int RTPInnerPacket::_timeStampBase [protected] |
The rtp time stamp base stored in this RTPInnerPacket.
Referenced by dump(), getTimeStampBase(), operator=(), RTPInnerPacket(), and senderModuleInitialized().
int RTPInnerPacket::_sequenceNumberBase [protected] |
The rtp sequence number base stored in this RTPInnerPacket.
Referenced by dump(), getSequenceNumberBase(), operator=(), RTPInnerPacket(), and senderModuleInitialized().