37 #ifndef RTPINTERNALSOURCEDATA_H
39 #define RTPINTERNALSOURCEDATA_H
41 #include "rtpconfig.h"
51 ~RTPInternalSourceData();
53 int ProcessRTPPacket(
RTPPacket *rtppack,
const RTPTime &receivetime,
bool *stored);
54 void ProcessSenderInfo(
const RTPNTPTime &ntptime,uint32_t rtptime,uint32_t packetcount,
55 uint32_t octetcount,
const RTPTime &receivetime) { SRprevinf = SRinf; SRinf.Set(ntptime,rtptime,packetcount,octetcount,receivetime); stats.SetLastMessageTime(receivetime); }
56 void ProcessReportBlock(uint8_t fractionlost,int32_t lostpackets,uint32_t exthighseqnr,
57 uint32_t jitter,uint32_t lsr,uint32_t dlsr,
58 const RTPTime &receivetime) { RRprevinf = RRinf; RRinf.Set(fractionlost,lostpackets,exthighseqnr,jitter,lsr,dlsr,receivetime); stats.SetLastMessageTime(receivetime); }
59 void UpdateMessageTime(
const RTPTime &receivetime) { stats.SetLastMessageTime(receivetime); }
60 int ProcessSDESItem(uint8_t sdesid,
const uint8_t *data,
size_t itemlen,
const RTPTime &receivetime,
bool *cnamecollis);
61 #ifdef RTP_SUPPORT_SDESPRIV
62 int ProcessPrivateSDESItem(
const uint8_t *prefix,
size_t prefixlen,
const uint8_t *value,
size_t valuelen,
const RTPTime &receivetime);
63 #endif // RTP_SUPPORT_SDESPRIV
64 int ProcessBYEPacket(
const uint8_t *reason,
size_t reasonlen,
const RTPTime &receivetime);
69 void ClearSenderFlag() { issender =
false; }
70 void SentRTPPacket() {
if (!ownssrc)
return;
RTPTime t =
RTPTime::CurrentTime(); issender =
true; stats.SetLastRTPPacketTime(t); stats.SetLastMessageTime(t); }
71 void SetOwnSSRC() { ownssrc =
true; validated =
true; }
72 void SetCSRC() { validated =
true; iscsrc =
true; }
73 void ClearNote() { SDESinf.
SetNote(0,0); }
75 #ifdef RTP_SUPPORT_PROBATION
78 #endif // RTP_SUPPORT_PROBATION
81 inline int RTPInternalSourceData::SetRTPDataAddress(
const RTPAddress *a)
87 RTPDelete(rtpaddr,GetMemoryManager());
95 return ERR_RTP_OUTOFMEM;
97 if (rtpaddr && a != rtpaddr)
98 RTPDelete(rtpaddr,GetMemoryManager());
105 inline int RTPInternalSourceData::SetRTCPDataAddress(
const RTPAddress *a)
111 RTPDelete(rtcpaddr,GetMemoryManager());
119 return ERR_RTP_OUTOFMEM;
121 if (rtcpaddr && a != rtcpaddr)
122 RTPDelete(rtcpaddr,GetMemoryManager());
125 isrtcpaddrset =
true;
129 #endif // RTPINTERNALSOURCEDATA_H