Bayonne2 / Common C++ 2 Framework
 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,2002,2004 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 General Public License
14 // along with this program; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
16 //
17 // As a special exception, you may use this file as part of a free software
18 // library without restriction. Specifically, if other files instantiate
19 // templates or use macros or inline functions from this file, or you compile
20 // this file and link it with other files to produce an executable, this
21 // file does not by itself cause the resulting executable to be covered by
22 // the GNU General Public License. This exception does not however
23 // invalidate any other reasons why the executable file might be covered by
24 // the GNU General Public License.
25 //
26 // This exception applies only to the code released under the name GNU
27 // ccRTP. If you copy code from other releases into a copy of GNU
28 // ccRTP, as the General Public License permits, the exception does
29 // not apply to the code that you add in this way. To avoid misleading
30 // anyone as to the status of such modified files, you must delete
31 // this exception notice from them.
32 //
33 // If you write modifications of your own for GNU ccRTP, it is your choice
34 // whether to permit this exception to apply to your modifications.
35 // If you do not wish that, delete this exception notice.
36 //
37 
44 #ifndef CCXX_RTP_IQUEUE_H_
45 #define CCXX_RTP_IQUEUE_H_
46 
47 #include <ccrtp/queuebase.h>
48 #include <ccrtp/CryptoContext.h>
49 
50 #include <list>
51 
52 #ifdef CCXX_NAMESPACES
53 namespace ost {
54 #endif
55 
71 {
72 public:
73  inline void
74  setMembersCount(uint32 n)
75  { members = n; }
76 
77  inline void
79  { members++; }
80 
81  inline void
83  { members--; }
84 
85  inline uint32
87  { return members; }
88 
89  inline void
90  setSendersCount(uint32 n)
91  { activeSenders = n; }
92 
93  inline void
95  { activeSenders++; }
96 
97  inline void
99  { activeSenders--; }
100 
101  inline uint32
103  { return activeSenders; }
104 
105 protected:
107  members(0),
108  activeSenders(0)
109  { }
110 
111  inline virtual ~Members()
112  { }
113 
114 private:
116  uint32 members;
119 };
120 
128 {
129 public:
136  inline void*
137  getLink(const SyncSource& source) const
138  { return source.getLink(); }
139 
140  inline void
141  setLink(SyncSource& source, void* link)
142  { source.setLink(link); }
143 
144  inline void
146  { source.setParticipant(p); }
147 
148  inline void
150  { source.setState(ns); }
151 
152  inline void
153  setSender(SyncSource& source, bool active)
154  { source.setSender(active); }
155 
156  inline void
158  { source.setDataTransportPort(p); }
159 
160  inline void
162  { source.setControlTransportPort(p); }
163 
164  inline void
166  { source.setNetworkAddress(addr); }
167 
168 protected:
170  { }
171 
172  inline virtual ~SyncSourceHandler()
173  { }
174 };
175 
183 {
184 public:
185  inline void
187  const std::string& val)
188  { part->setSDESItem(item,val); }
189 
190  inline void
191  setPRIVPrefix(Participant* part, const std::string val)
192  { part->setPRIVPrefix(val); }
193 
194 protected:
196  { }
197 
198  inline virtual ~ParticipantHandler()
199  { }
200 };
201 
209 {
210 public:
211  inline void
213  { app.addParticipant(part); }
214 
215  inline void
218  { app.removeParticipant(pl); }
219 
220 protected:
222  { }
223 
224  inline virtual ~ApplicationHandler()
225  { }
226 };
227 
236 {
237 public:
239  {
241  tpport_t dtp, tpport_t ctp);
242 
244  { next = nc; }
245 
246  inline const InetAddress& getNetworkAddress( ) const
247  { return networkAddress; }
248 
250  { return dataTransportPort; }
251 
253  { return controlTransportPort; }
254 
259  // arrival time of last data or control packet.
260  timeval lastPacketTime;
261  };
262 
267  ConflictingTransportAddress* searchDataConflict(InetAddress na,
268  tpport_t dtp);
273  ConflictingTransportAddress* searchControlConflict(InetAddress na,
274  tpport_t ctp);
275 
277  { gettimeofday(&(ca.lastPacketTime),NULL); }
278 
279  void addConflict(const InetAddress& na, tpport_t dtp, tpport_t ctp);
280 
281 protected:
283  { firstConflict = lastConflict = NULL; }
284 
285  inline virtual ~ConflictHandler()
286  { }
287 
289 };
290 
302  public SyncSourceHandler,
303  public ParticipantHandler,
304  public ApplicationHandler,
305  public ConflictHandler,
306  private Members
307 {
308 public:
310  { return defaultMembersHashSize; }
311 
312 protected:
313 
327  MembershipBookkeeping(uint32 initialSize = defaultMembersHashSize);
328 
333  inline virtual
335  { endMembers(); }
336 
337  struct SyncSourceLink;
338 
339  inline SyncSourceLink* getLink(const SyncSource& source) const
340  { return static_cast<SyncSourceLink*>(SyncSourceHandler::getLink(source)); }
345  inline bool isMine(const SyncSource& source) const
346  { return getLink(source)->getMembership() == this; }
347 
355  {
357  struct timeval& recv_ts,
358  uint32 shifted_ts,
359  IncomingRTPPktLink* sp,
360  IncomingRTPPktLink* sn,
362  IncomingRTPPktLink* n) :
363  packet(pkt),
364  sourceLink(sLink),
365  prev(p), next(n),
366  srcPrev(sp), srcNext(sn),
367  receptionTime(recv_ts),
368  shiftedTimestamp(shifted_ts)
369  { }
370 
372  { }
373 
375  { return sourceLink; }
376 
377  inline void setSourceLink(SyncSourceLink* src)
378  { sourceLink = src; }
379 
380  inline IncomingRTPPktLink* getNext() const
381  { return next; }
382 
383  inline void setNext(IncomingRTPPktLink* nl)
384  { next = nl; }
385 
386  inline IncomingRTPPktLink* getPrev() const
387  { return prev; }
388 
389  inline void setPrev(IncomingRTPPktLink* pl)
390  { prev = pl; }
391 
393  { return srcNext; }
394 
396  { srcNext = sn; }
397 
399  { return srcPrev; }
400 
402  { srcPrev = sp; }
403 
404  inline IncomingRTPPkt* getPacket() const
405  { return packet; }
406 
407  inline void setPacket(IncomingRTPPkt* pkt)
408  { packet = pkt; }
409 
417  inline void setRecvTime(const timeval &t)
418  { receptionTime = t; }
419 
423  inline timeval getRecvTime() const
424  { return receptionTime; }
425 
434  inline uint32 getTimestamp() const
435  { return shiftedTimestamp; }
436 
437  inline void setTimestamp(uint32 ts)
438  { shiftedTimestamp = ts;}
439 
440  // the packet this link refers to.
442  // the synchronization source this packet comes from.
444  // global incoming packet queue links.
446  // source specific incoming packet queue links.
448  // time this packet was received at
449  struct timeval receptionTime;
450  // timestamp of the packet in host order and after
451  // substracting the initial timestamp for its source
452  // (it is an increment from the initial timestamp).
454  };
455 
473  {
474  // 2^16
475  static const uint32 SEQNUMMOD;
476 
478  SyncSource* s,
479  IncomingRTPPktLink* fp = NULL,
480  IncomingRTPPktLink* lp = NULL,
481  SyncSourceLink* ps = NULL,
482  SyncSourceLink* ns = NULL,
483  SyncSourceLink* ncollis = NULL) :
484  membership(m), source(s), first(fp), last(lp),
485  prev(ps), next(ns), nextCollis(ncollis),
486  prevConflict(NULL)
487  { m->setLink(*s,this); // record that the source is associated
488  initStats(); // to this link.
489  }
490 
494  ~SyncSourceLink();
495 
497  { return membership; }
498 
503  inline SyncSource* getSource() { return source; }
504 
510  { return first; }
511 
512  inline void setFirst(IncomingRTPPktLink* fp)
513  { first = fp; }
514 
520  { return last; }
521 
522  inline void setLast(IncomingRTPPktLink* lp)
523  { last = lp; }
524 
529  { return prev; }
530 
531  inline void setPrev(SyncSourceLink* ps)
532  { prev = ps; }
533 
538  { return next; }
539 
540  inline void setNext(SyncSourceLink *ns)
541  { next = ns; }
542 
550  { return nextCollis; }
551 
552  inline void setNextCollis(SyncSourceLink* ns)
553  { nextCollis = ns; }
554 
555  inline ConflictingTransportAddress* getPrevConflict() const
556  { return prevConflict; }
557 
561  void setPrevConflict(InetAddress& addr, tpport_t dataPort,
562  tpport_t controlPort);
563 
564  unsigned char* getSenderInfo()
565  { return senderInfo; }
566 
567  void setSenderInfo(unsigned char* si);
568 
569  unsigned char* getReceiverInfo()
570  { return receiverInfo; }
571 
572  void setReceiverInfo(unsigned char* ri);
573 
574  inline timeval getLastPacketTime() const
575  { return lastPacketTime; }
576 
577  inline timeval getLastRTCPPacketTime() const
578  { return lastRTCPPacketTime; }
579 
580  inline timeval getLastRTCPSRTime() const
581  { return lastRTCPSRTime; }
582 
587  inline uint32 getObservedPacketCount() const
588  { return obsPacketCount; }
589 
591  { obsPacketCount++; }
592 
597  inline uint32 getObservedOctetCount() const
598  { return obsOctetCount; }
599 
600  inline void incObservedOctetCount(uint32 n)
601  { obsOctetCount += n; }
602 
606  uint16
607  getMaxSeqNum() const
608  { return maxSeqNum; }
609 
614  void
615  setMaxSeqNum(uint16 max)
616  { maxSeqNum = max; }
617 
618  inline uint32
620  { return extendedMaxSeqNum; }
621 
622  inline void
624  { extendedMaxSeqNum = seq; }
625 
626  inline uint32 getCumulativePacketLost() const
627  { return cumulativePacketLost; }
628 
629  inline void setCumulativePacketLost(uint32 pl)
630  { cumulativePacketLost = pl; }
631 
632  inline uint8 getFractionLost() const
633  { return fractionLost; }
634 
635  inline void setFractionLost(uint8 fl)
636  { fractionLost = fl; }
637 
638  inline uint32 getLastPacketTransitTime()
639  { return lastPacketTransitTime; }
640 
641  inline void setLastPacketTransitTime(uint32 time)
642  { lastPacketTransitTime = time; }
643 
644  inline float getJitter() const
645  { return jitter; }
646 
647  inline void setJitter(float j)
648  { jitter = j; }
649 
650  inline uint32 getInitialDataTimestamp() const
651  { return initialDataTimestamp; }
652 
653  inline void setInitialDataTimestamp(uint32 ts)
654  { initialDataTimestamp = ts; }
655 
656  inline timeval getInitialDataTime() const
657  { return initialDataTime; }
658 
659  inline void setInitialDataTime(timeval it)
660  { initialDataTime = it; }
661 
669  bool getGoodbye()
670  {
671  if(!flag)
672  return false;
673  flag = false;
674  return true;
675  }
676 
683  bool getHello() {
684  if(flag)
685  return false;
686  flag = true;
687  return true;
688  }
689 
690  inline uint32 getBadSeqNum() const
691  { return badSeqNum; }
692 
693  inline void setBadSeqNum(uint32 seq)
694  { badSeqNum = seq; }
695 
696  uint8 getProbation() const
697  { return probation; }
698 
699  inline void setProbation(uint8 p)
700  { probation = p; }
701 
702  inline void decProbation()
703  { --probation; }
704 
705  bool isValid() const
706  { return 0 == probation; }
707 
708  inline uint16 getBaseSeqNum() const
709  { return baseSeqNum; }
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.
753  ConflictingTransportAddress* prevConflict;
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 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 
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;
1290  std::list<CryptoContext *> cryptoContexts;
1291 };
1292  // iqueue
1294 
1295 #ifdef CCXX_NAMESPACES
1296 }
1297 #endif
1298 
1299 #endif //CCXX_RTP_IQUEUE_H_
1300 
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:258
static const uint16 defaultMaxPacketDropout
Definition: iqueue.h:1283
void addParticipant(RTPApplication &app, Participant &part)
Definition: iqueue.h:212
static const uint32 SEQNUMMOD
Definition: iqueue.h:855
virtual ~ParticipantHandler()
Definition: iqueue.h:198
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:367
void setMembersCount(uint32 n)
Definition: iqueue.h:74
std::forward_iterator_tag iterator_category
Definition: iqueue.h:895
Synchronization source in an RTP session.
Definition: sources.h:195
virtual ~MembershipBookkeeping()
Purges all RTPSource structures created during the session, as well as the hash table and the list of...
Definition: iqueue.h:334
void setParticipant(Participant &p)
Definition: sources.h:307
void setPRIVPrefix(Participant *part, const std::string val)
Definition: iqueue.h:191
ThreadLock recvLock
Definition: iqueue.h:1277
Interface (envelope) to data received over RTP packets.
Definition: queuebase.h:71
The implementation for a SRTP cryptographic context.
Definition: CryptoContext.h:76
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:313
void setSender(SyncSource &source, bool active)
Definition: iqueue.h:153
void removeParticipant(RTPApplication &app, RTPApplication::ParticipantLink *pl)
Definition: iqueue.h:216
uint32 getMembersCount()
Definition: iqueue.h:843
uint16 maxPacketMisorder
Definition: iqueue.h:1285
RTP packets received from other participants.
Definition: rtppkt.h:707
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:149
virtual bool end2EndDelayed(IncomingRTPPktLink &)
Definition: iqueue.h:1238
unsigned short tpport_t
Transport Protocol Ports.
Definition: address.h:86
SyncSourcesIterator operator++(int)
Definition: iqueue.h:920
uint16 maxPacketDropout
Definition: iqueue.h:1286
static size_t getDefaultMembersSize()
Definition: iqueue.h:1045
The Mutex class is used to protect a section of code so that at any given time only a single thread c...
Definition: thread.h:186
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
void increaseMembersCount()
Definition: iqueue.h:78
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:182
void setState(State st)
Definition: sources.h:296
uint16 getMaxPacketMisorder() const
Definition: iqueue.h:1022
void increaseSendersCount()
Definition: iqueue.h:94
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:70
uint32 getMembersCount() const
Definition: iqueue.h:86
void * getLink(const SyncSource &source) const
This requires SyncSource - SyncSourceHandler friendship.
Definition: iqueue.h:137
To track addresses of sources conflicting with the local one.
Definition: iqueue.h:235
State
Synchronization source states during an RTP session.
Definition: sources.h:228
Application objects modification methods.
Definition: iqueue.h:208
A class of objects representing remote participants (RTP applications) in a multimedia session...
Definition: sources.h:127
uint8 sourceExpirationPeriod
Definition: iqueue.h:1288
#define InetHostAddress
Definition: address.h:76
void setNext(ConflictingTransportAddress *nc)
Definition: iqueue.h:243
size_t getDefaultMembersHashSize()
Definition: iqueue.h:309
uint32 getSendersCount() const
Definition: iqueue.h:102
void setNetworkAddress(SyncSource &source, InetAddress addr)
Definition: iqueue.h:165
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:345
void setSDESItem(Participant *part, SDESItemType item, const std::string &val)
Definition: iqueue.h:186
static const size_t defaultMembersHashSize
Definition: iqueue.h:854
void setParticipant(SyncSource &source, Participant &p)
Definition: iqueue.h:145
void setDataTransportPort(SyncSource &source, tpport_t p)
Definition: iqueue.h:157
void setLink(void *l)
Definition: sources.h:320
The ThreadLock class impliments a thread rwlock for optimal reader performance on systems which have ...
Definition: thread.h:357
SyncSourceLink * getLast()
Definition: iqueue.h:839
void addParticipant(Participant &part)
void removeParticipant(ParticipantLink *part)
#define InetAddress
Definition: address.h:75
void setSender(bool active)
Mark this source as an active sender.
Definition: sources.h:303
const InetAddress & getNetworkAddress() const
Definition: iqueue.h:246
virtual ~ApplicationHandler()
Definition: iqueue.h:224
static const uint8 defaultMinValidPacketSequence
Definition: iqueue.h:1281
#define __EXPORT
Definition: audio2.h:51
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:323
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:301
IncomingRTPPktLink * recvLast
Definition: iqueue.h:1279
virtual ~ConflictHandler()
Definition: iqueue.h:285
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:288
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:98
void decreaseMembersCount()
Definition: iqueue.h:82
void setLink(SyncSource &source, void *link)
Definition: iqueue.h:141
void setSendersCount(uint32 n)
Definition: iqueue.h:90
SyncSourcesIterator(const SyncSourcesIterator &si)
Definition: iqueue.h:905
void setDataTransportPort(tpport_t p)
Definition: sources.h:310
SyncSourceLink * getLink(const SyncSource &source) const
Definition: iqueue.h:339
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:127
SyncSourcesIterator end()
Definition: iqueue.h:941
void updateConflict(ConflictingTransportAddress &ca)
Definition: iqueue.h:276
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:180
virtual ~SyncSourceHandler()
Definition: iqueue.h:172
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:67
void setSDESItem(SDESItemType item, const std::string &val)
Set the value of a SDES item.
Definition: sources.h:173
uint32 members
number of identified members
Definition: iqueue.h:116
uint32 activeSenders
number of identified members that currently are active senders
Definition: iqueue.h:118
Members()
Definition: iqueue.h:106
virtual ~Members()
Definition: iqueue.h:111
void setControlTransportPort(SyncSource &source, tpport_t p)
Definition: iqueue.h:161
iterator through the list of synchronizations sources in this session
Definition: iqueue.h:892
void setNetworkAddress(InetAddress addr)
Definition: sources.h:316