ccRTP 2.1.2
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
iqueue.h
Go to the documentation of this file.
1 // Copyright (C) 2001-2015 Federico Montesino Pouzols <fedemp@altern.org>.
2 //
3 // This program is free software; you can redistribute it and/or modify
4 // it under the terms of the GNU General Public License as published by
5 // the Free Software Foundation; either version 2 of the License, or
6 // (at your option) any later version.
7 //
8 // This program is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 // GNU General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public License
14 // along with GNU ccRTP. If not, see <http://www.gnu.org/licenses/>.
15 //
16 // As a special exception, you may use this file as part of a free software
17 // library without restriction. Specifically, if other files instantiate
18 // templates or use macros or inline functions from this file, or you compile
19 // this file and link it with other files to produce an executable, this
20 // file does not by itself cause the resulting executable to be covered by
21 // the GNU General Public License. This exception does not however
22 // invalidate any other reasons why the executable file might be covered by
23 // the GNU General Public License.
24 //
25 // This exception applies only to the code released under the name GNU
26 // ccRTP. If you copy code from other releases into a copy of GNU
27 // ccRTP, as the General Public License permits, the exception does
28 // not apply to the code that you add in this way. To avoid misleading
29 // anyone as to the status of such modified files, you must delete
30 // this exception notice from them.
31 //
32 // If you write modifications of your own for GNU ccRTP, it is your choice
33 // whether to permit this exception to apply to your modifications.
34 // If you do not wish that, delete this exception notice.
35 //
36 
43 #ifndef CCXX_RTP_IQUEUE_H_
44 #define CCXX_RTP_IQUEUE_H_
45 
46 #include <ccrtp/queuebase.h>
47 #include <ccrtp/CryptoContext.h>
48 
49 #include <list>
50 
51 NAMESPACE_COMMONCPP
52 
68 {
69 public:
70  inline void
71  setMembersCount(uint32 n)
72  { members = n; }
73 
74  inline void
76  { members++; }
77 
78  inline void
80  { members--; }
81 
82  inline uint32
84  { return members; }
85 
86  inline void
87  setSendersCount(uint32 n)
88  { activeSenders = n; }
89 
90  inline void
92  { activeSenders++; }
93 
94  inline void
96  { activeSenders--; }
97 
98  inline uint32
100  { return activeSenders; }
101 
102 protected:
104  members(0),
105  activeSenders(0)
106  { }
107 
108  inline virtual ~Members()
109  { }
110 
111 private:
113  uint32 members;
116 };
117 
125 {
126 public:
133  inline void*
134  getLink(const SyncSource& source) const
135  { return source.getLink(); }
136 
137  inline void
138  setLink(SyncSource& source, void* link)
139  { source.setLink(link); }
140 
141  inline void
143  { source.setParticipant(p); }
144 
145  inline void
147  { source.setState(ns); }
148 
149  inline void
150  setSender(SyncSource& source, bool active)
151  { source.setSender(active); }
152 
153  inline void
154  setDataTransportPort(SyncSource& source, tpport_t p)
155  { source.setDataTransportPort(p); }
156 
157  inline void
158  setControlTransportPort(SyncSource& source, tpport_t p)
159  { source.setControlTransportPort(p); }
160 
161  inline void
162  setNetworkAddress(SyncSource& source, InetAddress addr)
163  { source.setNetworkAddress(addr); }
164 
165 protected:
167  { }
168 
169  inline virtual ~SyncSourceHandler()
170  { }
171 };
172 
180 {
181 public:
182  inline void
184  const std::string& val)
185  { part->setSDESItem(item,val); }
186 
187  inline void
188  setPRIVPrefix(Participant* part, const std::string val)
189  { part->setPRIVPrefix(val); }
190 
191 protected:
193  { }
194 
195  inline virtual ~ParticipantHandler()
196  { }
197 };
198 
206 {
207 public:
208  inline void
210  { app.addParticipant(part); }
211 
212  inline void
215  { app.removeParticipant(pl); }
216 
217 protected:
219  { }
220 
221  inline virtual ~ApplicationHandler()
222  { }
223 };
224 
233 {
234 public:
236  {
237  ConflictingTransportAddress(InetAddress na,
238  tpport_t dtp, tpport_t ctp);
239 
241  { next = nc; }
242 
243  inline const InetAddress& getNetworkAddress( ) const
244  { return networkAddress; }
245 
246  inline tpport_t getDataTransportPort() const
247  { return dataTransportPort; }
248 
249  inline tpport_t getControlTransportPort() const
250  { return controlTransportPort; }
251 
252  InetAddress networkAddress;
256  // arrival time of last data or control packet.
257  timeval lastPacketTime;
258  };
259 
264  ConflictingTransportAddress* searchDataConflict(InetAddress na,
265  tpport_t dtp);
270  ConflictingTransportAddress* searchControlConflict(InetAddress na,
271  tpport_t ctp);
272 
274  { SysTime::gettimeofday(&(ca.lastPacketTime),NULL); }
275 
276  void addConflict(const InetAddress& na, tpport_t dtp, tpport_t ctp);
277 
278 protected:
280  { firstConflict = lastConflict = NULL; }
281 
282  inline virtual ~ConflictHandler()
283  { }
284 
286 };
287 
299  public SyncSourceHandler,
300  public ParticipantHandler,
301  public ApplicationHandler,
302  public ConflictHandler,
303  private Members
304 {
305 public:
307  { return defaultMembersHashSize; }
308 
309 protected:
310 
324  MembershipBookkeeping(uint32 initialSize = defaultMembersHashSize);
325 
330  inline virtual
332  { endMembers(); }
333 
334  struct SyncSourceLink;
335 
336  inline SyncSourceLink* getLink(const SyncSource& source) const
337  { return static_cast<SyncSourceLink*>(SyncSourceHandler::getLink(source)); }
342  inline bool isMine(const SyncSource& source) const
343  { return getLink(source)->getMembership() == this; }
344 
352  {
354  struct timeval& recv_ts,
355  uint32 shifted_ts,
356  IncomingRTPPktLink* sp,
357  IncomingRTPPktLink* sn,
359  IncomingRTPPktLink* n) :
360  packet(pkt),
361  sourceLink(sLink),
362  prev(p), next(n),
363  srcPrev(sp), srcNext(sn),
364  receptionTime(recv_ts),
365  shiftedTimestamp(shifted_ts)
366  { }
367 
369  { }
370 
372  { return sourceLink; }
373 
374  inline void setSourceLink(SyncSourceLink* src)
375  { sourceLink = src; }
376 
377  inline IncomingRTPPktLink* getNext() const
378  { return next; }
379 
380  inline void setNext(IncomingRTPPktLink* nl)
381  { next = nl; }
382 
383  inline IncomingRTPPktLink* getPrev() const
384  { return prev; }
385 
386  inline void setPrev(IncomingRTPPktLink* pl)
387  { prev = pl; }
388 
390  { return srcNext; }
391 
393  { srcNext = sn; }
394 
396  { return srcPrev; }
397 
399  { srcPrev = sp; }
400 
401  inline IncomingRTPPkt* getPacket() const
402  { return packet; }
403 
404  inline void setPacket(IncomingRTPPkt* pkt)
405  { packet = pkt; }
406 
414  inline void setRecvTime(const timeval &t)
415  { receptionTime = t; }
416 
420  inline timeval getRecvTime() const
421  { return receptionTime; }
422 
431  inline uint32 getTimestamp() const
432  { return shiftedTimestamp; }
433 
434  inline void setTimestamp(uint32 ts)
435  { shiftedTimestamp = ts;}
436 
437  // the packet this link refers to.
439  // the synchronization source this packet comes from.
441  // global incoming packet queue links.
443  // source specific incoming packet queue links.
445  // time this packet was received at
446  struct timeval receptionTime;
447  // timestamp of the packet in host order and after
448  // substracting the initial timestamp for its source
449  // (it is an increment from the initial timestamp).
451  };
452 
470  {
471  // 2^16
472  static const uint32 SEQNUMMOD;
473 
475  SyncSource* s,
476  IncomingRTPPktLink* fp = NULL,
477  IncomingRTPPktLink* lp = NULL,
478  SyncSourceLink* ps = NULL,
479  SyncSourceLink* ns = NULL,
480  SyncSourceLink* ncollis = NULL) :
481  membership(m), source(s), first(fp), last(lp),
482  prev(ps), next(ns), nextCollis(ncollis),
483  prevConflict(NULL)
484  { m->setLink(*s,this); // record that the source is associated
485  initStats(); // to this link.
486  }
487 
491  ~SyncSourceLink();
492 
494  { return membership; }
495 
500  inline SyncSource* getSource() { return source; }
501 
507  { return first; }
508 
509  inline void setFirst(IncomingRTPPktLink* fp)
510  { first = fp; }
511 
517  { return last; }
518 
519  inline void setLast(IncomingRTPPktLink* lp)
520  { last = lp; }
521 
526  { return prev; }
527 
528  inline void setPrev(SyncSourceLink* ps)
529  { prev = ps; }
530 
535  { return next; }
536 
537  inline void setNext(SyncSourceLink *ns)
538  { next = ns; }
539 
547  { return nextCollis; }
548 
549  inline void setNextCollis(SyncSourceLink* ns)
550  { nextCollis = ns; }
551 
553  { return prevConflict; }
554 
558  void setPrevConflict(InetAddress& addr, tpport_t dataPort,
559  tpport_t controlPort);
560 
561  unsigned char* getSenderInfo()
562  { return senderInfo; }
563 
564  void setSenderInfo(unsigned char* si);
565 
566  unsigned char* getReceiverInfo()
567  { return receiverInfo; }
568 
569  void setReceiverInfo(unsigned char* ri);
570 
571  inline timeval getLastPacketTime() const
572  { return lastPacketTime; }
573 
574  inline timeval getLastRTCPPacketTime() const
575  { return lastRTCPPacketTime; }
576 
577  inline timeval getLastRTCPSRTime() const
578  { return lastRTCPSRTime; }
579 
584  inline uint32 getObservedPacketCount() const
585  { return obsPacketCount; }
586 
588  { obsPacketCount++; }
589 
594  inline uint32 getObservedOctetCount() const
595  { return obsOctetCount; }
596 
597  inline void incObservedOctetCount(uint32 n)
598  { obsOctetCount += n; }
599 
603  uint16
604  getMaxSeqNum() const
605  { return maxSeqNum; }
606 
611  void
612  setMaxSeqNum(uint16 max)
613  { maxSeqNum = max; }
614 
615  inline uint32
617  { return extendedMaxSeqNum; }
618 
619  inline void
621  { extendedMaxSeqNum = seq; }
622 
623  inline uint32 getCumulativePacketLost() const
624  { return cumulativePacketLost; }
625 
626  inline void setCumulativePacketLost(uint32 pl)
627  { cumulativePacketLost = pl; }
628 
629  inline uint8 getFractionLost() const
630  { return fractionLost; }
631 
632  inline void setFractionLost(uint8 fl)
633  { fractionLost = fl; }
634 
635  inline uint32 getLastPacketTransitTime()
636  { return lastPacketTransitTime; }
637 
638  inline void setLastPacketTransitTime(uint32 time)
639  { lastPacketTransitTime = time; }
640 
641  inline float getJitter() const
642  { return jitter; }
643 
644  inline void setJitter(float j)
645  { jitter = j; }
646 
647  inline uint32 getInitialDataTimestamp() const
648  { return initialDataTimestamp; }
649 
650  inline void setInitialDataTimestamp(uint32 ts)
651  { initialDataTimestamp = ts; }
652 
653  inline timeval getInitialDataTime() const
654  { return initialDataTime; }
655 
656  inline void setInitialDataTime(timeval it)
657  { initialDataTime = it; }
658 
666  bool getGoodbye()
667  {
668  if(!flag)
669  return false;
670  flag = false;
671  return true;
672  }
673 
680  bool getHello() {
681  if(flag)
682  return false;
683  flag = true;
684  return true;
685  }
686 
687  inline uint32 getBadSeqNum() const
688  { return badSeqNum; }
689 
690  inline void setBadSeqNum(uint32 seq)
691  { badSeqNum = seq; }
692 
693  uint8 getProbation() const
694  { return probation; }
695 
696  inline void setProbation(uint8 p)
697  { probation = p; }
698 
699  inline void decProbation()
700  { --probation; }
701 
702  bool isValid() const
703  { return 0 == probation; }
704 
705  inline uint16 getBaseSeqNum() const
706  { return baseSeqNum; }
707 
708  inline void setBaseSeqNum(uint16 seqnum)
709  { baseSeqNum = seqnum; }
710 
711  inline uint32 getSeqNumAccum() const
712  { return seqNumAccum; }
713 
714  inline void incSeqNumAccum()
715  { seqNumAccum += SEQNUMMOD; }
716 
720  inline void initSequence(uint16 seqnum)
721  { maxSeqNum = seqNumAccum = seqnum; }
722 
733  void recordInsertion(const IncomingRTPPktLink& pl);
734 
735  void initStats();
736 
741  void computeStats();
742 
744  // The source this link object refers to.
746  // first/last packets from this source in the queue.
748  // Links for synchronization sources located before
749  // and after this one in the list of sources.
751  // Prev and next inside the hash table collision list.
754  unsigned char* senderInfo;
755  unsigned char* receiverInfo;
756  // time the last RTP packet from this source was
757  // received at.
758  timeval lastPacketTime;
759  // time the last RTCP packet was received.
761  // time the lasrt RTCP SR was received. Required for
762  // DLSR computation.
763  timeval lastRTCPSRTime;
764 
765  // for outgoing RR reports.
766  // number of packets received from this source.
768  // number of octets received from this source.
770  // the higher sequence number seen from this source
771  uint16 maxSeqNum;
775  // for interarrivel jitter computation
777  // interarrival jitter of packets from this source.
778  float jitter;
781 
782  // this flag assures we only call one gotHello and one
783  // gotGoodbye for this src.
784  bool flag;
785 
786  // for source validation:
787  uint32 badSeqNum;
788  uint8 probation; // packets in sequence before valid.
789  uint16 baseSeqNum;
792  uint32 seqNumAccum;
793  };
794 
799  bool
800  isRegistered(uint32 ssrc);
801 
811  getSourceBySSRC(uint32 ssrc, bool& created);
812 
823  bool
824  BYESource(uint32 ssrc);
825 
833  bool
834  removeSource(uint32 ssrc);
835 
837  { return first; }
838 
840  { return last; }
841 
842  inline uint32
844  { return Members::getMembersCount(); }
845 
846  inline void
847  setMembersCount(uint32 n)
849 
850  inline uint32
852  { return Members::getSendersCount(); }
853 
854  static const size_t defaultMembersHashSize;
855  static const uint32 SEQNUMMOD;
856 
857 private:
859 
861  operator=(const MembershipBookkeeping &o);
862 
867  void
868  endMembers();
869 
870  // Hash table with sources of RTP and RTCP packets
873  // List of sources, ordered from older to newer
874  SyncSourceLink* first, * last;
875 };
876 
884  protected MembershipBookkeeping
885 {
886 public:
893  {
894  public:
895  typedef std::forward_iterator_tag iterator_category;
897  typedef std::ptrdiff_t difference_type;
898  typedef const SyncSource* pointer;
899  typedef const SyncSource& reference;
900 
902  link(l)
903  { }
904 
906  link(si.link)
907  { }
908 
910  { return *(link->getSource()); }
911 
913  { return link->getSource(); }
914 
916  link = link->getNext();
917  return *this;
918  }
919 
921  SyncSourcesIterator result(*this);
922  ++(*this);
923  return result;
924  }
925 
926  friend bool operator==(const SyncSourcesIterator& l,
927  const SyncSourcesIterator& r)
928  { return l.link == r.link; }
929 
930  friend bool operator!=(const SyncSourcesIterator& l,
931  const SyncSourcesIterator& r)
932  { return l.link != r.link; }
933 
934  private:
936  };
937 
940 
942  { return SyncSourcesIterator(NULL); }
943 
953  const AppDataUnit*
954  getData(uint32 stamp, const SyncSource* src = NULL);
955 
956 
963  bool
964  isWaiting(const SyncSource* src = NULL) const;
965 
972  uint32
973  getFirstTimestamp(const SyncSource* src = NULL) const;
974 
997  void
999  { minValidPacketSequence = packets; }
1000 
1001  uint8
1003  { return defaultMinValidPacketSequence; }
1004 
1009  uint8
1011  { return minValidPacketSequence; }
1012 
1013  void
1014  setMaxPacketMisorder(uint16 packets)
1015  { maxPacketMisorder = packets; }
1016 
1017  uint16
1019  { return defaultMaxPacketMisorder; }
1020 
1021  uint16
1023  { return maxPacketMisorder; }
1024 
1030  void
1031  setMaxPacketDropout(uint16 packets) // default: 3000.
1032  { maxPacketDropout = packets; }
1033 
1034  uint16
1036  { return defaultMaxPacketDropout; }
1037 
1038  uint16
1040  { return maxPacketDropout; }
1041 
1042  // default value for constructors that allow to specify
1043  // members table s\ize
1044  inline static size_t
1046  { return defaultMembersSize; }
1047 
1056  void
1057  setInQueueCryptoContext(CryptoContext* cc);
1058 
1069  void
1070  removeInQueueCryptoContext(CryptoContext* cc);
1071 
1079  CryptoContext*
1080  getInQueueCryptoContext(uint32 ssrc);
1081 
1082 protected:
1086  IncomingDataQueue(uint32 size);
1087 
1089  { }
1090 
1103  bool checkSSRCInIncomingRTPPkt(SyncSourceLink& sourceLink,
1104  bool is_new, InetAddress& na,
1105  tpport_t tp);
1106 
1122  void setSourceExpirationPeriod(uint8 intervals)
1123  { sourceExpirationPeriod = intervals; }
1124 
1131  virtual size_t
1132  takeInDataPacket();
1133 
1134  void renewLocalSSRC();
1135 
1146  getWaiting(uint32 timestamp, const SyncSource *src = NULL);
1147 
1163  bool
1164  recordReception(SyncSourceLink& srcLink, const IncomingRTPPkt& pkt,
1165  const timeval recvtime);
1166 
1173  void
1174  recordExtraction(const IncomingRTPPkt& pkt);
1175 
1176  void purgeIncomingQueue();
1177 
1184  inline virtual void
1186  { }
1187 
1188 protected:
1205  inline virtual bool
1207  { return true; }
1208 
1217  inline virtual void onExpireRecv(IncomingRTPPkt&)
1218  { return; }
1219 
1233  inline virtual bool
1234  onSRTPPacketError(IncomingRTPPkt& pkt, int32 errorCode)
1235  { return false; }
1236 
1237  inline virtual bool
1239  { return false; }
1240 
1256  bool
1257  insertRecvPacket(IncomingRTPPktLink* packetLink);
1258 
1270  virtual size_t
1271  recvData(unsigned char* buffer, size_t length,
1272  InetHostAddress& host, tpport_t& port) = 0;
1273 
1274  virtual size_t
1275  getNextDataPacketSize() const = 0;
1276 
1277  mutable ThreadLock recvLock;
1278  // reception queue
1280  // values for packet validation.
1281  static const uint8 defaultMinValidPacketSequence;
1282  static const uint16 defaultMaxPacketMisorder;
1283  static const uint16 defaultMaxPacketDropout;
1287  static const size_t defaultMembersSize;
1289  mutable Mutex cryptoMutex;
1290  std::list<CryptoContext *> cryptoContexts;
1291 };
1292  // iqueue
1294 
1295 END_NAMESPACE
1296 
1297 #endif //CCXX_RTP_IQUEUE_H_
1298 
virtual bool onRTPPacketRecv(IncomingRTPPkt &)
A virtual function to support parsing of arriving packets to determine if they should be kept in the ...
Definition: iqueue.h:1206
ConflictingTransportAddress * next
Definition: iqueue.h:255
static const uint16 defaultMaxPacketDropout
Definition: iqueue.h:1283
void addParticipant(RTPApplication &app, Participant &part)
Definition: iqueue.h:209
static const uint32 SEQNUMMOD
Definition: iqueue.h:855
virtual ~ParticipantHandler()
Definition: iqueue.h:195
void setSourceExpirationPeriod(uint8 intervals)
Set the number of RTCP intervals that the stack will wait to change the state of a source from stateA...
Definition: iqueue.h:1122
Mutex cryptoMutex
Definition: iqueue.h:1289
An RTP application, holding identifying RTCP SDES item values.
Definition: sources.h:364
void setMembersCount(uint32 n)
Definition: iqueue.h:71
std::forward_iterator_tag iterator_category
Definition: iqueue.h:895
Synchronization source in an RTP session.
Definition: sources.h:192
virtual ~MembershipBookkeeping()
Purges all RTPSource structures created during the session, as well as the hash table and the list of...
Definition: iqueue.h:331
void setParticipant(Participant &p)
Definition: sources.h:304
void setPRIVPrefix(Participant *part, const std::string val)
Definition: iqueue.h:188
ThreadLock recvLock
Definition: iqueue.h:1277
Interface (envelope) to data received over RTP packets.
Definition: queuebase.h:68
The implementation for a SRTP cryptographic context.
Definition: CryptoContext.h:82
void setMinValidPacketSequence(uint8 packets)
When receiving packets from a new source, it may be convenient to reject a first few packets before w...
Definition: iqueue.h:998
void setControlTransportPort(tpport_t p)
Definition: sources.h:310
void setSender(SyncSource &source, bool active)
Definition: iqueue.h:150
void removeParticipant(RTPApplication &app, RTPApplication::ParticipantLink *pl)
Definition: iqueue.h:213
uint32 getMembersCount()
Definition: iqueue.h:843
uint16 maxPacketMisorder
Definition: iqueue.h:1285
RTP packets received from other participants.
Definition: rtppkt.h:704
uint32 getSendersCount()
Definition: iqueue.h:851
static const size_t defaultMembersSize
Definition: iqueue.h:1287
void setState(SyncSource &source, SyncSource::State ns)
Definition: iqueue.h:146
virtual bool end2EndDelayed(IncomingRTPPktLink &)
Definition: iqueue.h:1238
SyncSourcesIterator operator++(int)
Definition: iqueue.h:920
uint16 maxPacketDropout
Definition: iqueue.h:1286
static size_t getDefaultMembersSize()
Definition: iqueue.h:1045
virtual void onNewSyncSource(const SyncSource &)
Virtual called when a new synchronization source has joined the session.
Definition: iqueue.h:1185
Queue for incoming RTP data packets in an RTP session.
Definition: iqueue.h:883
uint8 minValidPacketSequence
Definition: iqueue.h:1284
virtual void renewLocalSSRC()
Definition: queuebase.h:232
void increaseMembersCount()
Definition: iqueue.h:75
uint8 getMinValidPacketSequence() const
Get the minimun number of consecutive packets that must be received from a source before accepting it...
Definition: iqueue.h:1010
void setMaxPacketMisorder(uint16 packets)
Definition: iqueue.h:1014
Participant objects modification methods.
Definition: iqueue.h:179
void setState(State st)
Definition: sources.h:293
uint16 getMaxPacketMisorder() const
Definition: iqueue.h:1022
void increaseSendersCount()
Definition: iqueue.h:91
SyncSourceLink ** sourceLinks
Definition: iqueue.h:872
static const uint16 defaultMaxPacketMisorder
Definition: iqueue.h:1282
uint16 getDefaultMaxPacketMisorder() const
Definition: iqueue.h:1018
members and senders accounting
Definition: iqueue.h:67
uint32 getMembersCount() const
Definition: iqueue.h:83
void * getLink(const SyncSource &source) const
This requires SyncSource - SyncSourceHandler friendship.
Definition: iqueue.h:134
To track addresses of sources conflicting with the local one.
Definition: iqueue.h:232
State
Synchronization source states during an RTP session.
Definition: sources.h:225
Application objects modification methods.
Definition: iqueue.h:205
A class of objects representing remote participants (RTP applications) in a multimedia session...
Definition: sources.h:124
uint8 sourceExpirationPeriod
Definition: iqueue.h:1288
void setNext(ConflictingTransportAddress *nc)
Definition: iqueue.h:240
size_t getDefaultMembersHashSize()
Definition: iqueue.h:306
uint32 getSendersCount() const
Definition: iqueue.h:99
void setNetworkAddress(SyncSource &source, InetAddress addr)
Definition: iqueue.h:162
SyncSourceLink * last
Definition: iqueue.h:874
SyncSourcesIterator & operator++()
Definition: iqueue.h:915
Base classes for RTP queues.
bool isMine(const SyncSource &source) const
Get whether a synchronization source is recorded in this membership controller.
Definition: iqueue.h:342
void setSDESItem(Participant *part, SDESItemType item, const std::string &val)
Definition: iqueue.h:183
static const size_t defaultMembersHashSize
Definition: iqueue.h:854
void setParticipant(SyncSource &source, Participant &p)
Definition: iqueue.h:142
void setDataTransportPort(SyncSource &source, tpport_t p)
Definition: iqueue.h:154
#define __EXPORT
Definition: ZrtpCallback.h:40
void setLink(void *l)
Definition: sources.h:317
SyncSourceLink * getLast()
Definition: iqueue.h:839
void addParticipant(Participant &part)
Definition: source.cpp:189
void removeParticipant(ParticipantLink *part)
Definition: source.cpp:200
void setSender(bool active)
Mark this source as an active sender.
Definition: sources.h:300
const InetAddress & getNetworkAddress() const
Definition: iqueue.h:243
virtual ~ApplicationHandler()
Definition: iqueue.h:221
static const uint8 defaultMinValidPacketSequence
Definition: iqueue.h:1281
void setMembersCount(uint32 n)
Definition: iqueue.h:847
virtual ~IncomingDataQueue()
Definition: iqueue.h:1088
uint16 getMaxPacketDropout() const
Definition: iqueue.h:1039
void * getLink() const
Definition: sources.h:320
uint16 getDefaultMaxPacketDropout() const
Definition: iqueue.h:1035
friend bool operator!=(const SyncSourcesIterator &l, const SyncSourcesIterator &r)
Definition: iqueue.h:930
Controls the group membership in the current session.
Definition: iqueue.h:298
IncomingRTPPktLink * recvLast
Definition: iqueue.h:1279
virtual ~ConflictHandler()
Definition: iqueue.h:282
SyncSourceLink * getFirst()
Definition: iqueue.h:836
SyncSourcesIterator begin()
Definition: iqueue.h:938
SyncSourcesIterator(SyncSourceLink *l=NULL)
Definition: iqueue.h:901
ConflictingTransportAddress * lastConflict
Definition: iqueue.h:285
virtual void onExpireRecv(IncomingRTPPkt &)
A hook to filter packets in the receive queue that are being expired.
Definition: iqueue.h:1217
void decreaseSendersCount()
Definition: iqueue.h:95
void decreaseMembersCount()
Definition: iqueue.h:79
void setLink(SyncSource &source, void *link)
Definition: iqueue.h:138
void setSendersCount(uint32 n)
Definition: iqueue.h:87
SyncSourcesIterator(const SyncSourcesIterator &si)
Definition: iqueue.h:905
void setDataTransportPort(tpport_t p)
Definition: sources.h:307
SyncSourceLink * getLink(const SyncSource &source) const
Definition: iqueue.h:336
virtual bool onSRTPPacketError(IncomingRTPPkt &pkt, int32 errorCode)
A hook that gets called if the decoding of an incoming SRTP was erroneous.
Definition: iqueue.h:1234
SyncSource objects modification methods.
Definition: iqueue.h:124
SyncSourcesIterator end()
Definition: iqueue.h:941
void updateConflict(ConflictingTransportAddress &ca)
Definition: iqueue.h:273
void setMaxPacketDropout(uint16 packets)
It also prevents packets sent after a restart of the source being immediately accepted.
Definition: iqueue.h:1031
uint8 getDefaultMinValidPacketSequence() const
Definition: iqueue.h:1002
friend bool operator==(const SyncSourcesIterator &l, const SyncSourcesIterator &r)
Definition: iqueue.h:926
void setPRIVPrefix(const std::string val)
Set prefix value for the PRIV SDES item.
Definition: sources.h:177
virtual ~SyncSourceHandler()
Definition: iqueue.h:169
std::list< CryptoContext * > cryptoContexts
Definition: iqueue.h:1290
uint32 sourceBucketsNum
Definition: iqueue.h:871
SDESItemType
SDES items that may be carried in a Source DEScription RTCP packet.
Definition: rtcppkt.h:64
void setSDESItem(SDESItemType item, const std::string &val)
Set the value of a SDES item.
Definition: sources.h:170
uint32 members
number of identified members
Definition: iqueue.h:113
uint32 activeSenders
number of identified members that currently are active senders
Definition: iqueue.h:115
Members()
Definition: iqueue.h:103
virtual ~Members()
Definition: iqueue.h:108
void setControlTransportPort(SyncSource &source, tpport_t p)
Definition: iqueue.h:158
iterator through the list of synchronizations sources in this session
Definition: iqueue.h:892
void setNetworkAddress(InetAddress addr)
Definition: sources.h:313