37 #ifndef RTPINTERNALSOURCEDATA_H 39 #define RTPINTERNALSOURCEDATA_H 41 #include "rtpconfig.h" 50 class JRTPLIB_IMPORTEXPORT RTPInternalSourceData :
public RTPSourceData
54 ~RTPInternalSourceData();
56 int ProcessRTPPacket(RTPPacket *rtppack,
const RTPTime &receivetime,
bool *stored, RTPSources *sources);
57 void ProcessSenderInfo(
const RTPNTPTime &ntptime,uint32_t rtptime,uint32_t packetcount,
58 uint32_t octetcount,
const RTPTime &receivetime) { SRprevinf = SRinf; SRinf.Set(ntptime,rtptime,packetcount,octetcount,receivetime); stats.SetLastMessageTime(receivetime); }
59 void ProcessReportBlock(uint8_t fractionlost,int32_t lostpackets,uint32_t exthighseqnr,
60 uint32_t jitter,uint32_t lsr,uint32_t dlsr,
61 const RTPTime &receivetime) { RRprevinf = RRinf; RRinf.Set(fractionlost,lostpackets,exthighseqnr,jitter,lsr,dlsr,receivetime); stats.SetLastMessageTime(receivetime); }
62 void UpdateMessageTime(
const RTPTime &receivetime) { stats.SetLastMessageTime(receivetime); }
63 int ProcessSDESItem(uint8_t sdesid,
const uint8_t *data,
size_t itemlen,
const RTPTime &receivetime,
bool *cnamecollis);
64 #ifdef RTP_SUPPORT_SDESPRIV 65 int ProcessPrivateSDESItem(
const uint8_t *prefix,
size_t prefixlen,
const uint8_t *value,
size_t valuelen,
const RTPTime &receivetime);
66 #endif // RTP_SUPPORT_SDESPRIV 67 int ProcessBYEPacket(
const uint8_t *reason,
size_t reasonlen,
const RTPTime &receivetime);
69 int SetRTPDataAddress(
const RTPAddress *a);
70 int SetRTCPDataAddress(
const RTPAddress *a);
72 void ClearSenderFlag() { issender =
false; }
73 void SentRTPPacket() {
if (!ownssrc)
return; RTPTime t =
RTPTime::CurrentTime(); issender =
true; stats.SetLastRTPPacketTime(t); stats.SetLastMessageTime(t); }
74 void SetOwnSSRC() { ownssrc =
true; validated =
true; }
75 void SetCSRC() { validated =
true; iscsrc =
true; }
76 void ClearNote() { SDESinf.SetNote(0,0); }
78 #ifdef RTP_SUPPORT_PROBATION 81 #endif // RTP_SUPPORT_PROBATION 84 inline int RTPInternalSourceData::SetRTPDataAddress(
const RTPAddress *a)
90 RTPDelete(rtpaddr,GetMemoryManager());
96 RTPAddress *newaddr = a->CreateCopy(GetMemoryManager());
98 return ERR_RTP_OUTOFMEM;
100 if (rtpaddr && a != rtpaddr)
101 RTPDelete(rtpaddr,GetMemoryManager());
108 inline int RTPInternalSourceData::SetRTCPDataAddress(
const RTPAddress *a)
114 RTPDelete(rtcpaddr,GetMemoryManager());
120 RTPAddress *newaddr = a->CreateCopy(GetMemoryManager());
122 return ERR_RTP_OUTOFMEM;
124 if (rtcpaddr && a != rtcpaddr)
125 RTPDelete(rtcpaddr,GetMemoryManager());
128 isrtcpaddrset =
true;
134 #endif // RTPINTERNALSOURCEDATA_H ProbationType
Type of probation to use for new sources.
Definition: rtpsources.h:78
Definition: rtpfaketransmitter.h:64
static RTPTime CurrentTime()
Returns an RTPTime instance representing the current wallclock time.
Definition: rtptimeutilities.h:298