#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 class is used for communication between submodules of the rtp layer module.
Definition at line 35 of file RTPInnerPacket.h.
This enumeration is a list of all possibly types of an RTPInnerPacket.
Definition at line 44 of file RTPInnerPacket.h.
{ 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 };
RTPInnerPacket::RTPInnerPacket | ( | const char * | name = NULL |
) |
Default constructor
Definition at line 30 of file RTPInnerPacket.cc.
Referenced by dup().
: cPacket(name) { _type = RTP_INP_UNDEF; _commonName = NULL; _mtu = 0; _bandwidth = 0; _rtcpPercentage = 0; _address = IPAddress::UNSPECIFIED_ADDRESS; _port = PORT_UNDEF; _ssrc = 0; _payloadType = 0; _fileName = NULL; _clockRate = 0; _timeStampBase = 0; _sequenceNumberBase = 0; }
RTPInnerPacket::RTPInnerPacket | ( | const RTPInnerPacket & | rinp | ) |
Copy constructor.
Definition at line 48 of file RTPInnerPacket.cc.
: cPacket() { setName(rinp.getName()); operator=(rinp); }
RTPInnerPacket::~RTPInnerPacket | ( | ) | [virtual] |
Destructor.
Definition at line 55 of file RTPInnerPacket.cc.
{ if (opp_strcmp(_commonName, "")) delete _commonName; if (opp_strcmp(_fileName, "")) delete _fileName; }
void RTPInnerPacket::createSenderModule | ( | uint32 | ssrc, | |
int | payloadType, | |||
const char * | fileName | |||
) | [virtual] |
Definition at line 151 of file RTPInnerPacket.cc.
Referenced by RTP::createSenderModule().
{ _type = RTP_INP_CREATE_SENDER_MODULE; _ssrc = ssrc; _payloadType = payloadType; _fileName = fileName; }
Capsultes the incoming RTPPacket into this RTPInnerPacket to transport it within the rtp layer.
Definition at line 235 of file RTPInnerPacket.cc.
Referenced by RTP::readRet().
void RTPInnerPacket::dataOut | ( | RTPPacket * | packet | ) | [virtual] |
Capsulates the outgoing RTPPacket into this RTPInnerPacket to transport it within the rtp layer.
Definition at line 228 of file RTPInnerPacket.cc.
Referenced by RTPAVProfilePayload32Sender::sendPacket().
{ _type = RTP_INP_DATA_OUT; encapsulate(packet); }
void RTPInnerPacket::deleteSenderModule | ( | uint32 | ssrc | ) | [virtual] |
Definition at line 167 of file RTPInnerPacket.cc.
Referenced by RTP::deleteSenderModule().
void RTPInnerPacket::dump | ( | std::ostream & | os | ) | const [virtual] |
Writes a longer info about this RTPInnerPacket into the given output stream.
Definition at line 98 of file RTPInnerPacket.cc.
{ os << "RTPInnerPacket:" << endl; os << " type = " << _type << endl; os << " commonName = " << _commonName << endl; os << " mtu = " << _mtu << endl; os << " bandwidth = " << _bandwidth << endl; os << " rtcpPercentage = " << _rtcpPercentage << endl; os << " address = " << _address << endl; os << " port = " << _port << endl; os << " ssrc = " << _ssrc << endl; os << " payloadType = " << _payloadType << endl; os << " fileName = " << _fileName << endl; os << " clockRate = " << _clockRate << endl; os << " timeStampBase = " << _timeStampBase << endl; os << " sequenceNumberBase = " << _sequenceNumberBase << endl; }
RTPInnerPacket * RTPInnerPacket::dup | ( | ) | const [virtual] |
Duplicates the RTPInnerPacket by calling the copy constructor.
Definition at line 84 of file RTPInnerPacket.cc.
{ return new RTPInnerPacket(*this); }
IPAddress RTPInnerPacket::getAddress | ( | ) | [virtual] |
Returns the address stored in this RTPInnerPacket.
Definition at line 274 of file RTPInnerPacket.cc.
Referenced by RTCP::dataIn(), and RTCP::initializeRTCP().
{ return _address; }
int RTPInnerPacket::getBandwidth | ( | ) | [virtual] |
Returns the available bandwitdth as stored in this RTPInnerPacket.
Definition at line 262 of file RTPInnerPacket.cc.
Referenced by RTCP::initializeRTCP().
{ return _bandwidth; }
int RTPInnerPacket::getClockRate | ( | ) | [virtual] |
Returns the rtp clock rate stored in this RTPInnerPacket.
Definition at line 304 of file RTPInnerPacket.cc.
Referenced by RTCP::senderModuleInitialized().
{ return _clockRate; }
const char * RTPInnerPacket::getCommonName | ( | ) | [virtual] |
Returns the CNAME stored in this RTPInnerPacket.
Definition at line 250 of file RTPInnerPacket.cc.
Referenced by RTCP::initializeRTCP().
{ return opp_strdup(_commonName); }
const char * RTPInnerPacket::getFileName | ( | ) | [virtual] |
Returns the file name stored in this RTPInnerPacket.
Definition at line 292 of file RTPInnerPacket.cc.
Referenced by RTPProfile::createSenderModule(), and RTPPayloadSender::initializeSenderModule().
{ return opp_strdup(_fileName); }
int RTPInnerPacket::getMTU | ( | ) | [virtual] |
Returns the maximum transmission unit stored in this RTPInnerPacket.
Definition at line 256 of file RTPInnerPacket.cc.
Referenced by RTPProfile::initializeProfile(), RTCP::initializeRTCP(), and RTPPayloadSender::initializeSenderModule().
{ return _mtu; }
int RTPInnerPacket::getPayloadType | ( | ) | [virtual] |
Returns the payload type stored in this RTPInnerPacket.
Definition at line 298 of file RTPInnerPacket.cc.
Referenced by RTPProfile::createSenderModule().
{ return _payloadType; }
int RTPInnerPacket::getPort | ( | ) | [virtual] |
Returns the port stored in this RTPInnerPacket.
Definition at line 280 of file RTPInnerPacket.cc.
Referenced by RTCP::dataIn(), RTCP::initializeRTCP(), and RTP::profileInitialized().
{ return _port; }
int RTPInnerPacket::getRtcpPercentage | ( | ) | [virtual] |
Returns the percentage of bandwidth for rtcp as stored in this RTPInnerPacket.
Definition at line 268 of file RTPInnerPacket.cc.
Referenced by RTCP::initializeRTCP(), and RTP::profileInitialized().
{ return _rtcpPercentage; }
int RTPInnerPacket::getSequenceNumberBase | ( | ) | [virtual] |
Returns the rtp sequence number base stored in this RTPInnerPacket.
Definition at line 316 of file RTPInnerPacket.cc.
Referenced by RTCP::senderModuleInitialized().
{ return _sequenceNumberBase; }
uint32 RTPInnerPacket::getSSRC | ( | ) | [virtual] |
Returns the ssrc identifier stored in this RTPInnerPacket.
Definition at line 286 of file RTPInnerPacket.cc.
Referenced by RTPProfile::createSenderModule(), RTPProfile::deleteSenderModule(), RTPPayloadSender::initializeSenderModule(), RTP::rtcpInitialized(), RTP::senderModuleControl(), RTP::senderModuleCreated(), RTP::senderModuleDeleted(), and RTP::senderModuleStatus().
{ return _ssrc; }
int RTPInnerPacket::getTimeStampBase | ( | ) | [virtual] |
Returns the rtp time stamp base stored in this RTPInnerPacket.
Definition at line 310 of file RTPInnerPacket.cc.
Referenced by RTCP::senderModuleInitialized().
{ return _timeStampBase; }
RTPInnerPacket::RTP_INP_TYPE RTPInnerPacket::getType | ( | ) | [virtual] |
Returns the type of this RTPInnerPacket.
Definition at line 244 of file RTPInnerPacket.cc.
Referenced by RTPPayloadSender::activity(), RTPPayloadReceiver::handleMessage(), RTPProfile::handleMessageFromPayloadSender(), RTP::handleMessageFromProfile(), RTP::handleMessageFromRTCP(), RTPProfile::handleMessageFromRTP(), and RTCP::handleMessageFromRTP().
{ return _type; }
std::string RTPInnerPacket::info | ( | ) | [virtual] |
Writes a short info about this RTPInnerPacket into the given string.
Definition at line 90 of file RTPInnerPacket.cc.
{ std::stringstream out; out << "RTPInnerPacket: type=" << _type; return out.str(); }
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.
Definition at line 117 of file RTPInnerPacket.cc.
Referenced by RTP::initializeProfile().
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.
Definition at line 132 of file RTPInnerPacket.cc.
Referenced by RTP::initializeRTCP().
{ _type = RTP_INP_INITIALIZE_RTCP; _commonName = commonName; _mtu = mtu; _bandwidth = bandwidth; _rtcpPercentage = rtcpPercentage; _address = address; _port = port; }
void RTPInnerPacket::initializeSenderModule | ( | uint32 | ssrc, | |
const char * | fileName, | |||
int | mtu | |||
) | [virtual] |
Definition at line 181 of file RTPInnerPacket.cc.
Referenced by RTPProfile::createSenderModule().
void RTPInnerPacket::leaveSession | ( | ) | [virtual] |
Called by the rtp module to inform the rtcp module that the session should be left.
Definition at line 216 of file RTPInnerPacket.cc.
Referenced by RTP::leaveSession().
{ _type = RTP_INP_LEAVE_SESSION; }
RTPInnerPacket & RTPInnerPacket::operator= | ( | const RTPInnerPacket & | rinp | ) |
Assignment operator.
Definition at line 64 of file RTPInnerPacket.cc.
Referenced by RTPInnerPacket().
{ cPacket::operator=(rinp); _type = rinp._type; _commonName = opp_strdup(rinp._commonName); _mtu = rinp._mtu; _bandwidth = rinp._bandwidth; _rtcpPercentage = rinp._rtcpPercentage; _address = rinp._address; _port = rinp._port; _ssrc = rinp._ssrc; _payloadType = rinp._payloadType; _fileName = opp_strdup(rinp._fileName); _clockRate = rinp._clockRate; _timeStampBase = rinp._timeStampBase; _sequenceNumberBase = rinp._sequenceNumberBase; return *this; }
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.
Definition at line 124 of file RTPInnerPacket.cc.
Referenced by RTPProfile::initializeProfile().
{ _type = RTP_INP_PROFILE_INITIALIZED; _rtcpPercentage = rtcpPercentage; _port = port; }
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
Definition at line 144 of file RTPInnerPacket.cc.
Referenced by RTCP::handleSelfMessage().
void RTPInnerPacket::senderModuleControl | ( | uint32 | ssrc, | |
RTPSenderControlMessage * | msg | |||
) | [virtual] |
Definition at line 200 of file RTPInnerPacket.cc.
Referenced by RTP::senderModuleControl().
void RTPInnerPacket::senderModuleCreated | ( | uint32 | ssrc | ) | [virtual] |
Definition at line 160 of file RTPInnerPacket.cc.
Referenced by RTPProfile::createSenderModule().
void RTPInnerPacket::senderModuleDeleted | ( | uint32 | ssrc | ) | [virtual] |
Definition at line 174 of file RTPInnerPacket.cc.
Referenced by RTPProfile::deleteSenderModule().
void RTPInnerPacket::senderModuleInitialized | ( | uint32 | ssrc, | |
int | payloadType, | |||
int | clockRate, | |||
int | timeStampBase, | |||
int | sequenceNumberBase | |||
) | [virtual] |
Definition at line 190 of file RTPInnerPacket.cc.
Referenced by RTPPayloadSender::initializeSenderModule().
{ _type = RTP_INP_SENDER_MODULE_INITIALIZED; _ssrc = ssrc; _payloadType = payloadType; _clockRate = clockRate; _timeStampBase = timeStampBase; _sequenceNumberBase = sequenceNumberBase; }
void RTPInnerPacket::senderModuleStatus | ( | uint32 | ssrc, | |
RTPSenderStatusMessage * | msg | |||
) | [virtual] |
Definition at line 208 of file RTPInnerPacket.cc.
Referenced by RTPPayloadSender::endOfFile(), RTPPayloadSender::pause(), RTPPayloadSender::play(), and RTPPayloadSender::stop().
void RTPInnerPacket::sessionLeft | ( | ) | [virtual] |
Called by the rtcp module when the rtcp bye packet has been sent to the network.
Definition at line 222 of file RTPInnerPacket.cc.
Referenced by RTCP::createPacket().
{ _type = RTP_INP_SESSION_LEFT; }
IPAddress RTPInnerPacket::_address [protected] |
The address stored this RTPInnerPacket.
Definition at line 257 of file RTPInnerPacket.h.
Referenced by dataIn(), dump(), getAddress(), initializeRTCP(), operator=(), and RTPInnerPacket().
int RTPInnerPacket::_bandwidth [protected] |
The bandwidth stored in this RTPInnerPacket.
Definition at line 247 of file RTPInnerPacket.h.
Referenced by dump(), getBandwidth(), initializeRTCP(), operator=(), and RTPInnerPacket().
int RTPInnerPacket::_clockRate [protected] |
The clock rate stored in this RTPInnerPacket.
Definition at line 282 of file RTPInnerPacket.h.
Referenced by dump(), getClockRate(), operator=(), RTPInnerPacket(), and senderModuleInitialized().
const char* RTPInnerPacket::_commonName [protected] |
The CNAME stored in this RTPInnerPacket.
Definition at line 237 of file RTPInnerPacket.h.
Referenced by dump(), getCommonName(), initializeRTCP(), operator=(), RTPInnerPacket(), and ~RTPInnerPacket().
const char* RTPInnerPacket::_fileName [protected] |
The file name stored in this RTPInnerPacket.
Definition at line 277 of file RTPInnerPacket.h.
Referenced by createSenderModule(), dump(), getFileName(), initializeSenderModule(), operator=(), RTPInnerPacket(), and ~RTPInnerPacket().
int RTPInnerPacket::_mtu [protected] |
The mtu stored in this RTPInnerPacket.
Definition at line 242 of file RTPInnerPacket.h.
Referenced by dump(), getMTU(), initializeProfile(), initializeRTCP(), initializeSenderModule(), operator=(), and RTPInnerPacket().
int RTPInnerPacket::_payloadType [protected] |
The payload type stored in this RTPInnerPacket.
Definition at line 272 of file RTPInnerPacket.h.
Referenced by createSenderModule(), dump(), getPayloadType(), operator=(), RTPInnerPacket(), and senderModuleInitialized().
int RTPInnerPacket::_port [protected] |
The port stored this RTPInnerPacket.
Definition at line 262 of file RTPInnerPacket.h.
Referenced by dataIn(), dump(), getPort(), initializeRTCP(), operator=(), profileInitialized(), and RTPInnerPacket().
int RTPInnerPacket::_rtcpPercentage [protected] |
The rtcp percentage stored in this RTPInnerPacket.
Definition at line 252 of file RTPInnerPacket.h.
Referenced by dump(), getRtcpPercentage(), initializeRTCP(), operator=(), profileInitialized(), and RTPInnerPacket().
int RTPInnerPacket::_sequenceNumberBase [protected] |
The rtp sequence number base stored in this RTPInnerPacket.
Definition at line 292 of file RTPInnerPacket.h.
Referenced by dump(), getSequenceNumberBase(), operator=(), RTPInnerPacket(), and senderModuleInitialized().
uint32 RTPInnerPacket::_ssrc [protected] |
The ssrc identifier stored in this RTPInnerPacket.
Definition at line 267 of file RTPInnerPacket.h.
Referenced by createSenderModule(), deleteSenderModule(), dump(), getSSRC(), initializeSenderModule(), operator=(), rtcpInitialized(), RTPInnerPacket(), senderModuleControl(), senderModuleCreated(), senderModuleDeleted(), senderModuleInitialized(), and senderModuleStatus().
int RTPInnerPacket::_timeStampBase [protected] |
The rtp time stamp base stored in this RTPInnerPacket.
Definition at line 287 of file RTPInnerPacket.h.
Referenced by dump(), getTimeStampBase(), operator=(), RTPInnerPacket(), and senderModuleInitialized().
RTP_INP_TYPE RTPInnerPacket::_type [protected] |
The type of this RTPInnerPacket.
Definition at line 232 of file RTPInnerPacket.h.
Referenced by createSenderModule(), dataIn(), dataOut(), deleteSenderModule(), dump(), getType(), info(), initializeProfile(), initializeRTCP(), initializeSenderModule(), leaveSession(), operator=(), profileInitialized(), rtcpInitialized(), RTPInnerPacket(), senderModuleControl(), senderModuleCreated(), senderModuleDeleted(), senderModuleInitialized(), senderModuleStatus(), and sessionLeft().