INET Framework for OMNeT++/OMNEST
|
The class RTPProfile is a module which handles RTPPayloadSender and RTPPayloadReceiver modules. More...
#include <RTPProfile.h>
Classes | |
class | SSRCGate |
Public Member Functions | |
RTPProfile () | |
Protected Types | |
typedef std::map< uint32, SSRCGate * > | SSRCGateMap |
Stores information to which gate rtp data packets from a ssrc must be forwarded. More... | |
Protected Member Functions | |
virtual void | initialize () override |
Initializes variables. More... | |
virtual | ~RTPProfile () |
virtual void | handleMessage (cMessage *msg) override |
Creates and removes payload sender and receiver modules on demand. More... | |
virtual void | handleMessageFromRTP (cMessage *msg) |
Handles messages received from the rtp module. More... | |
virtual void | handleMessageFromPayloadSender (cMessage *msg) |
Handles messages coming from the sender module. More... | |
virtual void | handleMessageFromPayloadReceiver (cMessage *msg) |
Handles messages coming from a receiver module. More... | |
virtual void | initializeProfile (RTPInnerPacket *rinp) |
Initialization message received from rtp module. More... | |
virtual void | createSenderModule (RTPInnerPacket *rinp) |
This method is called when the application issued the creation of an rtp payload sender module to transmit data. More... | |
virtual void | deleteSenderModule (RTPInnerPacket *rinp) |
When a sender module is no longer needed it can be deleted by the profile module. More... | |
virtual void | senderModuleControl (RTPInnerPacket *rinp) |
The profile module forwards sender control messages to the sender module. More... | |
virtual void | dataIn (RTPInnerPacket *rinp) |
Handles incoming data packets: If there isn't a receiver module for this sender it creates one. More... | |
virtual void | senderModuleInitialized (RTPInnerPacket *rinp) |
The sender module returns a senderModuleInitialized message after being initialized. More... | |
virtual void | senderModuleStatus (RTPInnerPacket *rinp) |
After having received a sender module control message the sender module returns a sender status message to inform the application what it's doing at the moment. More... | |
virtual void | dataOut (RTPInnerPacket *rinp) |
Handles outgoing data packets: Calls processOutgoingPacket and forwards the packet to the rtp module. More... | |
virtual void | processIncomingPacket (RTPInnerPacket *rinp) |
Every time a rtp packet is received it it pre-processed by this method to remove profile specific extension which are not handled by the payload receiver module. More... | |
virtual void | processOutgoingPacket (RTPInnerPacket *rinp) |
Simular to the procedure for incoming packets, this adds profile specific extensions to outgoing rtp packets. More... | |
virtual SSRCGate * | findSSRCGate (uint32 ssrc) |
Finds the gate of the receiver module for rtp data packets from this ssrc. More... | |
virtual SSRCGate * | newSSRCGate (uint32 ssrc) |
Creates a new association ssrc/gateId for this ssrc. More... | |
Protected Attributes | |
const char * | _profileName = nullptr |
The name of this profile. More... | |
int | _maxReceivers = 0 |
The maximum number of incoming data streams this profile module can handle. More... | |
SSRCGateMap | _ssrcGates |
int | _rtcpPercentage = 0 |
The percentage of the available bandwidth to be used for rtcp. More... | |
int | _preferredPort = -1 |
The rtp port this profile uses if no port is given. More... | |
int | _mtu = 0 |
The maximum size an RTPPacket can have. More... | |
bool | _autoOutputFileNames = false |
If this is set true the RTPProfile automatically sets the output file name for payload receiver modules so the user is not bothered to set them manually during simulation runtime. More... | |
The class RTPProfile is a module which handles RTPPayloadSender and RTPPayloadReceiver modules.
It creates them dynamically on demand. This class offers all functionality for the above tasks, subclasses just need to set variables like profile name, rtcp percentage and preferred port in their initialize() method. The dynamically created sender and receiver modules must have have following class names: RTP<profileName>Payload<payloadType>Sender RTP<profileName>Payload<payloadType>Receiver
|
protected |
Stores information to which gate rtp data packets from a ssrc must be forwarded.
|
protectedvirtual |
|
protectedvirtual |
This method is called when the application issued the creation of an rtp payload sender module to transmit data.
It creates a new sender module and connects it. The profile module informs the rtp module of having finished this task. Then it initializes the newly create sender module with a inititalizeSenderModule message.
Referenced by handleMessageFromRTP().
|
protectedvirtual |
Handles incoming data packets: If there isn't a receiver module for this sender it creates one.
The data packet is forwarded to the receiver module after calling processIncomingPacket.
Referenced by handleMessageFromRTP().
|
protectedvirtual |
Handles outgoing data packets: Calls processOutgoingPacket and forwards the packet to the rtp module.
Referenced by handleMessageFromPayloadSender().
|
protectedvirtual |
When a sender module is no longer needed it can be deleted by the profile module.
Referenced by handleMessageFromRTP().
|
protectedvirtual |
|
overrideprotectedvirtual |
Creates and removes payload sender and receiver modules on demand.
|
protectedvirtual |
Handles messages coming from a receiver module.
Referenced by handleMessage().
|
protectedvirtual |
Handles messages coming from the sender module.
Referenced by handleMessage().
|
protectedvirtual |
Handles messages received from the rtp module.
Referenced by handleMessage().
|
overrideprotectedvirtual |
Initializes variables.
Must be overwritten by subclasses.
Reimplemented in inet::rtp::RTPAVProfile.
Referenced by inet::rtp::RTPAVProfile::initialize().
|
protectedvirtual |
Initialization message received from rtp module.
Referenced by handleMessageFromRTP().
|
protectedvirtual |
Creates a new association ssrc/gateId for this ssrc.
Referenced by dataIn().
|
protectedvirtual |
Every time a rtp packet is received it it pre-processed by this method to remove profile specific extension which are not handled by the payload receiver module.
In this implementation the packet isn't changed. Important: This method works with RTPInnerPacket. So the rtp packet must be decapsulated, changed and encapsulated again.
Referenced by dataIn().
|
protectedvirtual |
Simular to the procedure for incoming packets, this adds profile specific extensions to outgoing rtp packets.
Referenced by dataOut().
|
protectedvirtual |
The profile module forwards sender control messages to the sender module.
Referenced by handleMessageFromRTP().
|
protectedvirtual |
The sender module returns a senderModuleInitialized message after being initialized.
The profile module forwards this message to the rtp module which delivers it to its destination, the rtcp module.
Referenced by handleMessageFromPayloadSender().
|
protectedvirtual |
After having received a sender module control message the sender module returns a sender status message to inform the application what it's doing at the moment.
Referenced by handleMessageFromPayloadSender().
|
protected |
If this is set true the RTPProfile automatically sets the output file name for payload receiver modules so the user is not bothered to set them manually during simulation runtime.
Referenced by dataIn(), and initialize().
|
protected |
The maximum number of incoming data streams this profile module can handle.
It is set to the gate size of "payloadReceiverOut", "payloadReceiverIn".
Referenced by handleMessage(), initialize(), and newSSRCGate().
|
protected |
The maximum size an RTPPacket can have.
Referenced by createSenderModule(), and initializeProfile().
|
protected |
The rtp port this profile uses if no port is given.
Referenced by inet::rtp::RTPAVProfile::initialize(), initialize(), and initializeProfile().
|
protected |
The name of this profile.
Needed for dynamic creating of sender and receiver modules.
Referenced by createSenderModule(), dataIn(), inet::rtp::RTPAVProfile::initialize(), and initialize().
|
protected |
The percentage of the available bandwidth to be used for rtcp.
Referenced by inet::rtp::RTPAVProfile::initialize(), initialize(), and initializeProfile().
|
protected |
Referenced by findSSRCGate(), initialize(), newSSRCGate(), and ~RTPProfile().