#include <RTPSenderInfo.h>
Inheritance diagram for RTPSenderInfo:

Public Member Functions | |
| RTPSenderInfo (u_int32 ssrc=0) | |
| RTPSenderInfo (const RTPSenderInfo &senderInfo) | |
| virtual | ~RTPSenderInfo () |
| RTPSenderInfo & | operator= (const RTPSenderInfo &senderInfo) |
| virtual cObject * | dup () const |
| virtual const char * | className () const |
| virtual void | processRTPPacket (RTPPacket *packet, simtime_t arrivalTime) |
| virtual void | processReceptionReport (ReceptionReport *report, simtime_t arrivalTime) |
| virtual SenderReport * | senderReport (simtime_t now) |
| virtual void | setStartTime (simtime_t startTime) |
| virtual void | setClockRate (int clockRate) |
| virtual void | setTimeStampBase (u_int32 timeStampBase) |
| virtual void | setSequenceNumberBase (u_int16 sequenceNumberBase) |
| virtual bool | toBeDeleted (simtime_t now) |
Private Attributes | |
| simtime_t | _startTime |
| int | _clockRate |
| u_int32 | _timeStampBase |
| u_int16 | _sequenceNumberBase |
| u_int32 | _packetsSent |
| u_int32 | _bytesSent |
|
|
Default constructor. 00031 : RTPParticipantInfo(ssrc) { 00032 _startTime = 0.0; 00033 _clockRate = 0; 00034 _timeStampBase = 0; 00035 _sequenceNumberBase = 0; 00036 _packetsSent = 0; 00037 _bytesSent = 0; 00038 00039 };
|
|
|
Copy constructor. 00042 : RTPParticipantInfo() { 00043 setName(senderInfo.name()); 00044 operator=(senderInfo); 00045 };
|
|
|
Destructor. 00048 {
00049
00050 };
|
|
|
Returns the class name "RTPSenderInfo". Reimplemented from RTPParticipantInfo. 00070 {
00071 return "RTPSenderInfo";
00072 };
|
|
|
Duplicates this RTPSenderInfo by calling the copy constructor. Reimplemented from RTPParticipantInfo. 00065 {
00066 return new RTPSenderInfo(*this);
00067 };
|
|
|
Assignment operator. 00053 {
00054 RTPParticipantInfo::operator=(senderInfo);
00055 _startTime = senderInfo._startTime;
00056 _clockRate = senderInfo._clockRate;
00057 _timeStampBase = senderInfo._timeStampBase;
00058 _sequenceNumberBase = senderInfo._sequenceNumberBase;
00059 _packetsSent = senderInfo._packetsSent;
00060 _bytesSent = senderInfo._bytesSent;
00061 return *this;
00062 };
|
|
||||||||||||
|
Processes an incoming ReceptionReport for this sender. Reimplemented from RTPParticipantInfo. 00086 {
00087 delete report;
00088 };
|
|
||||||||||||
|
Stores information about this outgoing RTPPacket. Reimplemented from RTPParticipantInfo. 00075 {
00076 _packetsSent++;
00077 _bytesSent = _bytesSent + packet->payloadLength();
00078
00079 // call corresponding method of superclass
00080 // for setting _silentIntervals
00081 // it deletes the packet !!!
00082 RTPParticipantInfo::processRTPPacket(packet, arrivalTime);
00083 };
|
|
|
Returns a SenderReport for this rtp endsystem. If it hasn't sent rtp data packets during the last 2 rtcp intervals, it returns NULL. Reimplemented from RTPParticipantInfo. 00091 {
00092 if (isSender()) {
00093 SenderReport *senderReport = new SenderReport("SenderReport");
00094 // ntp time stamp is 64 bit integer
00095
00096 u_int64 ntpSeconds = (u_int64)now;
00097 u_int64 ntpFraction = (u_int64)((now - (simtime_t)ntpSeconds) * 65536.0 * 65536.0);
00098
00099 senderReport->setNTPTimeStamp((u_int64)(ntpSeconds << 32) + ntpFraction);
00100 senderReport->setRTPTimeStamp((now - _startTime) * _clockRate);
00101 senderReport->setPacketCount(_packetsSent);
00102 senderReport->setByteCount(_bytesSent);
00103 return senderReport;
00104 }
00105 else {
00106 return NULL;
00107 };
00108 };
|
|
|
Sets the clock rate (in ticks per second) this sender increases the rtp time stamp. 00116 {
00117 _clockRate = clockRate;
00118 };
|
|
|
Sets the initial sequence number. 00126 {
00127 _sequenceNumberBase = sequenceNumberBase;
00128 };
|
|
|
Sets the time (simTime) when this endsystem has started sending rtp packets. 00111 {
00112 _startTime = startTime;
00113 };
|
|
|
Sets the initial rtp time stamp. 00121 {
00122 _timeStampBase = timeStampBase;
00123 };
|
|
|
A sender info shall never be deleted! Reimplemented from RTPParticipantInfo. 00131 {
00132 return false;
00133 }
|
|
|
The number of data bytes this sender has sent. |
|
|
The clock rate this sender increases the rtp time stamp. |
|
|
The number of rtp data packets this sender has sent. |
|
|
The initial sequence number. |
|
|
The time when the transmission was started. |
|
|
The initial rtp time stamp. |
1.4.1