Nous sommes basés sur le travail de Mathias Oppitz
[Oppitz, 02] pour implémenter la couche RTP. Comme nous allons expliquer
ci-après, cette couche permet de construire des trames vidéo et
les envoyés à une destination ou à un groupe multipoint.
La figure 3.20 représente le diagramme de classes de cette couche
protocolaire.
RTPSenderInfo
startTime clockRate timeStampBase
sequenceNumberBase packetsSent
bytesSent
RTPParticipantInfo
: simtime t : int
: uint32 : uint16 : uint32 : uint32
RTPProfile
: SDESChunk * : IN Addr : IN Port : IN Port : int
-sdesChunk - address - rtpPort - rtcpPort -
silentIntervals
+ RTPSenderInfo (uint32 ssrc = 0)
+ processRTPPacket (RTPPacket * packet, simtimet arrivalTime)
+ processReceptionReport (ReceptionReport * report, simtimet
arrivalTime) + senderReport (simtimet now)
+ setStartTime (simtimet startTime) + setClockRate (int
clockRate)
+ setTimeStampBase (uint32 timeStampBase)
+ setSequenceNumberBase (uint16 sequenceNumberBase)
+ toBeDeleted (simtimet now)
RTPSSRCGate
profileName : const char *
maxReceivers : int
ssrcGates : cArray
rtcpPercentage : int
preferredPort : IN Port
mtu : int
autoOutputFileNames : bool
: void : void
: SenderReport * : void
: void : void : void : bool
1..*
- ssrc : uint32
-gateId : int
0..*
RTPApplication
+ RTPSSRCGate (uint ssrc)
+ RTPSSRCGate (const RTPSSRCGate& rtpSSRCGate) : void +
~RTPSSRCGate ()
+ ssrc () : uint32
+ setSSRC () : void
+ gateId () : int
+ setGateId () : void
RTPAVProfile
+ initialize() ()
+ handleMessage (cMessage * msg)
+ handleMessageFromRTP (cMessage * msg)
+ handleMessageFromPayloadSender (cMessage * msg) +
handleMessageFromPayloadReceiver (cMessage * msg) + initializeProfile
(RTPInnerPacket * rinp)
0..1 + createSenderModule (RTPInnerPacket * rinp)
+ deleteSenderModule (RTPInnerPacket * rinp) +
senderModuleControl (RTPInnerPacket * rinp) + dataIn (RTPInnerPacket * rinp)
+ senderModuleInitialized (RTPInnerPacket * rinp) +
senderModuleStatus (RTPInnerPacket * rinp) + dataOut (RTPInnerPacket * rinp)
+ processIncomingPacket (RTPInnerPacket * rinp) +
processOutgoingPacket (RTPInnerPacket * rinp) + findSSRCGate ()
+ newSSRCGate ()
+ initialize () : int
: void : void : void : void : void : void : void : void :
void : void : void : void : void : void : void : RTPSSRCGate *
: RTPSSRCGate *
commonName
profi leName bandwidth deSnationAddress port
fi leName payloadType sessionEnterDelay
transmissionStartDelay transmissionStopDelay
sessionLeaveDelay
: void : void : void : void : SDESChunk *
: void
: ReceptionReport * : SenderReport *
: void : bool : bool : uint32
: void
: IN Addr
: void
: IN Port
: IN Port
: void : void : char *
: void
+ RTPParticipantInfo (uint32 ssrc)
+ processRTPPacket (RTPPacket * packet, simtimet arrivalTime)
+ processSenderReport (SenderReport * report, simtimet
arrivalTime)
+ processReceptionReport (ReceptionReport report, simtimet
arrivalTime) + processSDESChunk (SDESChunk * sdesChunk, simtimet
arrivalTime)
+ sdesChunk ()
+ addSDESItem (SDESItem * sdesItem)
+ receptionReport (simtimet now) + senderReport (simtimet
now) + nextInterval (simtimet now) + toBeDeleted (simtimet now) + isSender
()
+ ssrc ()
+ setSSRC (uint32 ssrc)
+ address ()
+ setAddress (INAddr address) + rctpPort ()
+ rtpPort ()
+ setRTPPort (INPort rtpPort) + setRTCPPort (INPort rtpPort)
+ ssrcToName (iuint32 nt ssrc) + writeContents() ()
: const char * : const char * : int
: IN Addr : INPort : const char * : int
: simtimet : simtimet : simtimet : simtimet
0..1
0..1 1..1
1..1
+ initialize () : void
+activity () : void
RTPPayloadSender
RTPReceiverInfo
1..1
0..1
0..1
0..* 0..1 0..*
RTPEndsystemModule
RTCPEndsystemModule
0..*
commonName profileName bandwidth destinationAddress port
mtu
rtcpPercentage socketFdIn socketFdOut
RTPPayloadReceiver
: std::ifstream
: int
: uint32 : int
: int
: uint32 : uint32 : uint16 : uint16 : SenderStatus : cMessage
*
inputFileStream mtu
ssrc
payloadType clockRate timeStampBase timeStamp sequenceNumberBase
sequenceNumber status
reminderMessage
1..* 1..*
1..1 1..1
: const char * : const char * : int
: IN Addr
: IN Port
: int : int : int : int
+ initialize ()
+ handleMessage (
cMes.ge * msg)
# handleMessageFromProfile (cMessage * msg) #
handleMessageFromRTCP (cMessage * msg) # handleMessageFromUDPLayer (cMessage *
msg) # handleMessageFromApp (cMessage * msg) # enterSession (RTPInterfacePacket
* rifp)
# leaveSession (RTPInterfacePacket * rifp)
+ deleteSenderModule (RTPInterfacePacket * rifp) +
createSenderModule (RTPInterfacePacket * rifp) + senderModuleControl
(RTPInterfacePacket * rifp) + profileInitialized (RTPInterfacePacket * rifp)
+ senderModuleCreated (RTPInterfacePacket * rifp) +
senderModuleDeleted (RTPInterfacePacket * rifp)
+ senderModuleInitialized (RTPInterfacePacket * rifp)
+ senderMosenderModuleStatus (RTPInterfacePacket * rifp) +
dataOut (RTPInterfacePacket * rifp)
+ rtcpInitialized (RTPInterfacePacket * rifp) + sessionLeft
(RTPInterfacePacket * rifp)
+ createProfile ()
+ createServerSocket ()
+ createClientSocket ()
+ socketRet ()
+ connectRet ()
+ readRet (cMessage * sifp)
+ initializeProfile ()
+ initializeRTCP ()
+ reoelveMTU ()
+ ~RTPAVProfilePayload32Receiver ()
+ initialize () : int
# processPacket (RTPPacket * packet) :
void
+ ~RTPPayloadReceiver ()
+ initialize () : void
+ handleMessage (cMessage * msg) : void
# processPacket (RTPPacket * packet) : void
# openOutputFile (const char * fileName) : void
#
closeOutputFile () : void
RTPAVProfilePayload32Receiver
RTPPayloadSender () ~RTPPayloadSender ()
initialize () : void
activity () : void
initializeSenderModule ( RTPInnerPacket *) : void
openSourceFile (const char * fileName) : void
closeSourceFile () : void
play () : void
playUntilTime (simtimet moment) : void
playUntilByte (int position) : void
pause () : void
eekTime (simtimet moment) : void
seekByte (int position) : void
stop () : void
endOfF ile () : void
sendPacket () : bool
: uint16 : uint16 : uint32 : uint32 : uint32 : int
: double : cOutVector : cOutVector : uint32 : int
: uint64 : uint32 : simtime t
: simtime t
: int
: simtime t
: int
sequenceNumberBase highestSequenceNumber
highestSequenceNumberPrior sequenceNumberCycles packetsReceived
packetsReceivedPrior
jitter
jitterOutVector packetLostOutVector clockRate
lastSenderReportRTPTimeStamp lastSenderReportNTPTimeStamp
lastPacketRTPTimeStamp lastPacketArrivalTime lastSenderReportArrivalTime
inactiveIntervals
startOfInactivity
itemsReceived
: int
: IN Addr
: IN Port
: int : int : int : int
: bool : bool
: RTPSenderInfo * : cArray *
: int
: double
: cOutVector *
bandwidth deSnationAddress port
mtu
rtcpPercentage socketFdIn socketFdOut ssrcChosen leaveSession
senderInfo participantInfos packetsCalculated averagePacketSize
rtcpIntervalOutVector
1..1
-queue: cQueue * -lowestAllowedTimeStamp: uint32
: void : void : void
: ReceptionReport * : void
: bool : bool : bool
RT P ReceiverInfo ()
processRTPPacket (RTPPacket * packet, simtimet arrivalTime)
processSenderReport (SenderReport * report, simtimet arrivalTime)
processSDESChunk (SDESChunk * sdesChunk, simtimet arrivalTime) receptionReport
(simtimet now)
nextInterval (simtimet now)
active () valid () toBeDeleted (simtimet now)
: void : void : void : void : void : void : void : void :
void : void : void : void : void : void : void : void : void : void : void :
void : void : void : void : void : void : void : void : int
1..1
: void : void : void : void : void : void : void : void :
void : void : void : void : void : void : void : void : void : void : void :
void
: RTPParticipantInfo* : void
initialize ()
hand leMessageFromUDPLayer (
cMes.ge * msg)
handleMessage (
cMes.ge * msg)
handleMessageFromRTP (cMessage * msg)
handleMessageSelfMessge (cMessage * msg)
initializeRTCP (RTPInnerPacket * rinp)
senderModuleInitialized (RTPInterfacePacket * rifp)
dataOut (RTPInterfacePacket * rifp)
dataIn (RTPInnerPacket * rinp)
leaveSess ion (RTP Interface Packet * rifp)
connectRet ()
readRet (cMessage * sifp)
createServerSocket ()
createClientSocket ()
chooseSSRC () scheduleInterval () createPacket ()
processOutgoingRTPPacket (RTPPacket * packet)
processIncomingRTPPacket (RTPPacket * packet, INAddr address,
INPort port) processIncomingRTCPPacket (RTCPCompoundPacket * packet, IN Addr
address, INPort port) findParticipantInfo (uint32 ssrc)
oelculateAveragePacketSize (int size)
RTPAVProfilePayload32Sender
# initialDelay : double
#framesPerSecond : double
# frameNumber : double
+ initialize () : void
+ activity () : void
# initializeSenderModule () : void
# sendPacket () : bool