|
INET Framework for OMNeT++/OMNEST
|
00001 /*************************************************************************** 00002 RTPProfile.h - description 00003 ------------------- 00004 (C) 2007 Ahmed Ayadi <ahmed.ayadi@sophia.inria.fr> 00005 (C) 2001 Matthias Oppitz <Matthias.Oppitz@gmx.de> 00006 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00022 #ifndef __INET_RTPPROFILE_H 00023 #define __INET_RTPPROFILE_H 00024 00025 #include "INETDefs.h" 00026 #include "RTPInnerPacket.h" 00027 00028 00040 class INET_API RTPProfile : public cSimpleModule 00041 { 00042 protected: 00043 // helper class to store the association between an ssrc identifier 00044 // and the gate which leads to the RTPPayloadReceiver module. 00045 // Note: in the original, this used to be a hundred lines, as RTPSSRCGate.cc/h, 00046 // but even this class is an overkill --Andras 00047 class SSRCGate : public cNamedObject //FIXME why is it a namedObject? 00048 { 00049 protected: 00050 uint32 ssrc; 00051 int gateId; 00052 public: 00053 SSRCGate(uint32 ssrc=0) {this->ssrc = ssrc; gateId = 0;} 00054 uint32 getSSRC() {return ssrc;} 00055 void setSSRC(uint32 ssrc) {this->ssrc = ssrc;} 00056 int getGateId() {return gateId;} 00057 void setGateId(int gateId) {this->gateId = gateId;} 00058 }; 00059 00060 public: 00061 RTPProfile(); 00062 00063 protected: 00067 virtual void initialize(); 00068 00069 virtual ~RTPProfile(); 00070 00074 virtual void handleMessage(cMessage *msg); 00075 00079 virtual void handleMessageFromRTP(cMessage *msg); 00080 00084 virtual void handleMessageFromPayloadSender(cMessage *msg); 00085 00089 virtual void handleMessageFromPayloadReceiver(cMessage *msg); 00090 00094 virtual void initializeProfile(RTPInnerPacket *rinp); 00095 00104 virtual void createSenderModule(RTPInnerPacket *rinp); 00105 00110 virtual void deleteSenderModule(RTPInnerPacket *rinp); 00111 00116 virtual void senderModuleControl(RTPInnerPacket *rinp); 00117 00123 virtual void dataIn(RTPInnerPacket *rinp); 00124 00131 virtual void senderModuleInitialized(RTPInnerPacket *rinp); 00132 00138 virtual void senderModuleStatus(RTPInnerPacket *rinp); 00139 00144 virtual void dataOut(RTPInnerPacket *rinp); 00145 00154 virtual void processIncomingPacket(RTPInnerPacket *rinp); 00155 00160 virtual void processOutgoingPacket(RTPInnerPacket *rinp); 00161 00166 virtual SSRCGate *findSSRCGate(uint32 ssrc); 00167 00171 virtual SSRCGate *newSSRCGate(uint32 ssrc); 00172 00177 const char *_profileName; 00178 00184 int _maxReceivers; 00185 00190 cArray *_ssrcGates; 00191 00195 int _rtcpPercentage; 00196 00200 int _preferredPort; 00201 00205 int _mtu; 00206 00212 bool _autoOutputFileNames; 00213 }; 00214 00215 #endif 00216