154 transmitters[0] = rtptrans;
166 if (rawpack->
IsRTP())
191 bool ownpacket =
false;
195 for (i = 0; !ownpacket && i < numtrans; i++)
197 if (rtptrans[i]->ComesFromThisTransmitter(senderaddress))
206 if (acceptownpackets)
245 bool ownpacket =
false;
249 for (i = 0; !ownpacket && i < numtrans; i++)
251 if (rtptrans[i]->ComesFromThisTransmitter(senderaddress))
258 if (acceptownpackets)
304 bool prevsender = srcdat->
IsSender();
305 bool prevactive = srcdat->
IsActive();
312 for (
int i = 0;
i < numCSRCs;
i++)
318 if ((status = srcdat->
ProcessRTPPacket(rtppack, receivetime, stored,
this)) < 0)
324 if (!prevsender && srcdat->
IsSender())
326 if (!prevactive && srcdat->
IsActive())
340 for (i = 0; i < num; i++)
366 bool gotownssrc = ((
owndata == 0) ?
false :
true);
388 bool gotinfo =
false;
393 for (i = 0; i < num; i++)
418 bool gotinfo =
false;
424 for (i = 0; i < num; i++)
453 bool updated =
false;
467 #ifdef RTP_SUPPORT_SDESPRIV 472 receivetime, senderaddress);
476 #endif // RTP_SUPPORT_SDESPRIV 495 for (i = 0; i < num; i++)
557 while (!found &&
sourcelist.HasCurrentElement())
576 while (!found &&
sourcelist.HasCurrentElement())
595 while (!found &&
sourcelist.HasCurrentElement())
653 srcdat->
ProcessSenderInfo(ntptime, rtptime, packetcount, octetcount, receivetime);
677 srcdat->
ProcessReportBlock(fractionlost, lostpackets, exthighseqnr, jitter, lsr, dlsr, receivetime);
692 bool created, cnamecollis;
731 status = srcdat->
ProcessSDESItem(sdesid, (
const uint8_t *) itemdata, itemlength, receivetime, &cnamecollis);
732 if (!prevactive && srcdat->
IsActive())
747 #ifdef RTP_SUPPORT_SDESPRIV 771 #endif //RTP_SUPPORT_SDESPRIV 792 if (prevactive && !srcdat->
IsActive())
810 if ((status =
sourcelist.AddElement(ssrc, srcdat2)) < 0)
850 *newsource = created;
879 int newtotalcount = 0;
880 int newsendercount = 0;
881 int newactivecount = 0;
883 checktime -= timeoutdelay;
892 if ((srcdat !=
owndata) && (lastmsgtime < checktime))
925 int newtotalcount = 0;
926 int newsendercount = 0;
927 int newactivecount = 0;
929 checktime -= timeoutdelay;
944 if (lastrtppacktime < checktime)
962 int newtotalcount = 0;
963 int newsendercount = 0;
964 int newactivecount = 0;
966 checktime -= timeoutdelay;
977 if ((srcdat !=
owndata) && (checktime > byetime))
1017 int newtotalcount = 0;
1018 int newsendercount = 0;
1019 int newactivecount = 0;
1021 checktime -= timeoutdelay;
1027 std::size_t notelen;
1034 if (checktime > notetime)
1057 int newtotalcount = 0;
1058 int newsendercount = 0;
1059 int newactivecount = 0;
1060 RTPTime senderchecktime = curtime;
1061 RTPTime byechecktime = curtime;
1062 RTPTime generaltchecktime = curtime;
1063 RTPTime notechecktime = curtime;
1064 senderchecktime -= sendertimeout;
1065 byechecktime -= byetimeout;
1066 generaltchecktime -= generaltimeout;
1067 notechecktime -= notetimeout;
1073 bool deleted, issender, isactive;
1074 bool byetimeout, normaltimeout, notetimeout;
1076 std::size_t notelen;
1082 normaltimeout =
false;
1083 notetimeout =
false;
1090 if (notechecktime > notetime)
1101 if ((srcdat !=
owndata) && (byechecktime > byetime))
1113 if ((srcdat !=
owndata) && (lastmsgtime < generaltchecktime))
1117 normaltimeout =
true;
1129 if (lastrtppacktime < senderchecktime)
1170 bool isset, otherisset;
1194 if (senderaddress != 0)
1235 if (senderaddress != 0)
uint8_t GetFractionLost(int index) const
#define RTCP_SDES_ID_EMAIL
#define ERR_RTP_SOURCES_DONTHAVEOWNSSRC
RTPTime GetReceiveTime() const
int ProcessRTPPacket(RTPPacket *rtppack, const RTPTime &receivetime, const RTPAddress *senderaddress, bool *stored)
#define RTCP_SDES_ID_LOCATION
#define ERR_RTP_SOURCES_ALREADYHAVEOWNSSRC
uint32_t GetJitter(int index) const
RTPTime INF_GetLastMessageTime() const
int ProcessBYE(uint32_t ssrc, std::size_t reasonlength, const void *reasondata, const RTPTime &receivetime, const RTPAddress *senderaddress)
std::size_t GetPRIVValueLength() const
virtual void OnRTCPSenderReport(RTPSourceData *srcdat)
uint32_t GetLSR(int index) const
int ProcessRTCPCompoundPacket(RTCPCompoundPacket *rtcpcomppack, const RTPTime &receivetime, const RTPAddress *senderaddress)
int SetRTCPDataAddress(const RTPAddress *a)
#define ERR_RTP_PACKET_INVALIDPACKET
RTCPPacket * GetNextPacket()
virtual void OnRTCPSDESItem(RTPSourceData *srcdat, RTCPSDESPacket::ItemType t, const void *itemdata, std::size_t itemlength)
virtual void OnAPPPacket(RTCPAPPPacket *apppacket, const RTPTime &receivetime, const RTPAddress *senderaddress)
bool GotoPreviousSource()
int ProcessBYEPacket(const uint8_t *reason, std::size_t reasonlen, const RTPTime &receivetime)
virtual void OnNoteTimeout(RTPSourceData *srcdat)
int GetReceptionReportCount() const
void MultipleTimeouts(const RTPTime &curtime, const RTPTime &sendertimeout, const RTPTime &byetimeout, const RTPTime &generaltimeout, const RTPTime ¬etimeout)
std::size_t GetItemLength() const
bool IsRTCPAddressSet() const
uint32_t GetSSRC(int index) const
#define ERR_RTP_SOURCES_ILLEGALSDESTYPE
RTPTime INF_GetLastSDESNoteTime() const
uint8_t * GetReasonData()
std::size_t GetPRIVPrefixLength() const
RTPSourceData * GetCurrentSourceInfo()
#define RTCP_SDES_ID_NOTE
uint32_t GetExtendedHighestSequenceNumber(int index) const
const RTPAddress * GetRTPDataAddress() const
uint32_t GetSSRC(int index) const
uint32_t GetChunkSSRC() const
std::size_t GetReasonLength() const
RTPTime GetBYETime() const
void SenderTimeout(const RTPTime &curtime, const RTPTime &timeoutdelay)
void Timeout(const RTPTime &curtime, const RTPTime &timeoutdelay)
virtual void OnRTCPCompoundPacket(RTCPCompoundPacket *pack, const RTPTime &receivetime, const RTPAddress *senderaddress)
RTPInternalSourceData * owndata
int ProcessRTCPReportBlock(uint32_t ssrc, uint8_t fractionlost, int32_t lostpackets, uint32_t exthighseqnr, uint32_t jitter, uint32_t lsr, uint32_t dlsr, const RTPTime &receivetime, const RTPAddress *senderaddress)
int GetReceptionReportCount() const
int ProcessRawPacket(RTPRawPacket *rawpack, RTPTransmitter *trans, bool acceptownpackets)
const RTPAddress * GetRTCPDataAddress() const
uint32_t GetSenderSSRC() const
RTPPacket * GetNextPacket()
int ProcessSDESPrivateItem(uint32_t ssrc, std::size_t prefixlen, const void *prefixdata, std::size_t valuelen, const void *valuedata, const RTPTime &receivetime, const RTPAddress *senderaddress)
bool GotoFirstSourceWithData()
virtual void OnBYEPacket(RTPSourceData *srcdat)
RTPSourceData * GetSourceInfo(uint32_t ssrc)
bool CheckCollision(RTPInternalSourceData *srcdat, const RTPAddress *senderaddress, bool isrtp)
virtual void OnRTPPacket(RTPPacket *pack, const RTPTime &receivetime, const RTPAddress *senderaddress)
uint8_t * GetPRIVPrefixData()
uint32_t GetSSRC(int index) const
int GetCreationError() const
uint32_t GetJitter(int index) const
bool IsSameAddress(const RTPAddress *addr) const
int CreateOwnSSRC(uint32_t ssrc)
void UpdateMessageTime(const RTPTime &receivetime)
uint8_t GetFractionLost(int index) const
virtual void OnCNAMECollision(RTPSourceData *srcdat, const RTPAddress *senderaddress, const uint8_t *cname, std::size_t cnamelength)
RTPKeyHashTable< const uint32_t, RTPInternalSourceData *, RTPSources_GetHashIndex, RTPSOURCES_HASHSIZE > sourcelist
uint32_t GetSenderPacketCount() const
bool GotoNextSourceWithData()
int32_t GetLostPacketCount(int index) const
bool GotoPreviousSourceWithData()
int ProcessRTPPacket(RTPPacket *rtppack, const RTPTime &receivetime, bool *stored, RTPSources *sources)
int ObtainSourceDataInstance(uint32_t ssrc, RTPInternalSourceData **srcdat, bool *created)
void ProcessSenderInfo(const RTPNTPTime &ntptime, uint32_t rtptime, uint32_t packetcount, uint32_t octetcount, const RTPTime &receivetime)
ItemType GetItemType() const
#define RTCP_SDES_ID_TOOL
virtual void OnBYETimeout(RTPSourceData *srcdat)
#define ERR_RTP_SOURCES_SSRCEXISTS
int ProcessSDESNormalItem(uint32_t ssrc, RTCPSDESPacket::ItemType t, std::size_t itemlength, const void *itemdata, const RTPTime &receivetime, const RTPAddress *senderaddress)
int32_t GetLostPacketCount(int index) const
bool IsKnownFormat() const
#define RTCP_SDES_ID_CNAME
virtual void OnUnknownPacketType(RTCPPacket *rtcppack, const RTPTime &receivetime, const RTPAddress *senderaddress)
bool IsRTPAddressSet() const
void NoteTimeout(const RTPTime &curtime, const RTPTime &timeoutdelay)
friend class RTPInternalSourceData
uint32_t GetExtendedHighestSequenceNumber(int index) const
RTPNTPTime GetNTPTimestamp() const
virtual void OnTimeout(RTPSourceData *srcdat)
uint32_t GetSenderSSRC() const
virtual void OnSSRCCollision(RTPSourceData *srcdat, const RTPAddress *senderaddress, bool isrtp)
const RTPAddress & GetSenderAddress() const
virtual void OnRemoveSource(RTPSourceData *srcdat)
virtual void OnRTCPReceiverReport(RTPSourceData *srcdat)
int GetRTCPSourceData(uint32_t ssrc, const RTPAddress *senderaddress, RTPInternalSourceData **srcdat, bool *newsource)
#define RTCP_SDES_ID_NAME
PacketType GetPacketType() const
void BYETimeout(const RTPTime &curtime, const RTPTime &timeoutdelay)
int ProcessSDESItem(uint8_t sdesid, const uint8_t *data, std::size_t itemlen, const RTPTime &receivetime, bool *cnamecollis)
virtual void OnRTCPSDESPrivateItem(RTPSourceData *srcdat, const void *prefixdata, std::size_t prefixlen, const void *valuedata, std::size_t valuelen)
uint32_t GetRTPTimestamp() const
virtual void OnNewSource(RTPSourceData *srcdat)
#define RTCP_SDES_ID_PHONE
uint32_t GetSenderOctetCount() const
virtual void OnUnknownPacketFormat(RTCPPacket *rtcppack, const RTPTime &receivetime, const RTPAddress *senderaddress)
bool GotEntry(uint32_t ssrc)
int ProcessRTCPSenderInfo(uint32_t ssrc, const RTPNTPTime &ntptime, uint32_t rtptime, uint32_t packetcount, uint32_t octetcount, const RTPTime &receivetime, const RTPAddress *senderaddress)
uint8_t * GetPRIVValueData()
#define ERR_RTP_RTCPCOMPOUND_INVALIDPACKET
uint32_t GetLSR(int index) const
RTPPacket * GetNextPacket()
bool IsFromSameHost(const RTPAddress *addr) const
int UpdateReceiveTime(uint32_t ssrc, const RTPTime &receivetime, const RTPAddress *senderaddress)
uint8_t * SDES_GetNote(std::size_t *len) const
uint32_t GetDLSR(int index) const
uint32_t GetCSRC(int num) const
RTPTime INF_GetLastRTPPacketTime() const
uint32_t GetDLSR(int index) const
int ProcessPrivateSDESItem(const uint8_t *prefix, std::size_t prefixlen, const uint8_t *value, std::size_t valuelen, const RTPTime &receivetime)
void ProcessReportBlock(uint8_t fractionlost, int32_t lostpackets, uint32_t exthighseqnr, uint32_t jitter, uint32_t lsr, uint32_t dlsr, const RTPTime &receivetime)
int SetRTPDataAddress(const RTPAddress *a)