@@ -68,7 +68,7 @@ using srt_logging::qslog;
68
68
69
69
using namespace srt::sync;
70
70
71
-
CSndLossList::CSndLossList(int size)
71
+
srt::CSndLossList::CSndLossList(int size)
72
72
: m_caSeq()
73
73
, m_iHead(-1)
74
74
, m_iLength(0)
@@ -89,13 +89,13 @@ CSndLossList::CSndLossList(int size)
89
89
setupMutex(m_ListLock, "LossList");
90
90
}
91
91
92
-
CSndLossList::~CSndLossList()
92
+
srt::CSndLossList::~CSndLossList()
93
93
{
94
94
delete[] m_caSeq;
95
95
releaseMutex(m_ListLock);
96
96
}
97
97
98
-
void CSndLossList::traceState() const
98
+
void srt::CSndLossList::traceState() const
99
99
{
100
100
int pos = m_iHead;
101
101
while (pos != SRT_SEQNO_NONE)
@@ -109,7 +109,7 @@ void CSndLossList::traceState() const
109
109
std::cout << "\n";
110
110
}
111
111
112
-
int CSndLossList::insert(int32_t seqno1, int32_t seqno2)
112
+
int srt::CSndLossList::insert(int32_t seqno1, int32_t seqno2)
113
113
{
114
114
if (seqno1 < 0 || seqno2 < 0 ) {
115
115
LOGC(qslog.Error, log << "IPE: Tried to insert negative seqno " << seqno1 << ":" << seqno2
@@ -226,7 +226,7 @@ int CSndLossList::insert(int32_t seqno1, int32_t seqno2)
226
226
return m_iLength - origlen;
227
227
}
228
228
229
-
void CSndLossList::removeUpTo(int32_t seqno)
229
+
void srt::CSndLossList::removeUpTo(int32_t seqno)
230
230
{
231
231
ScopedLock listguard(m_ListLock);
232
232
@@ -338,14 +338,14 @@ void CSndLossList::removeUpTo(int32_t seqno)
338
338
}
339
339
}
340
340
341
-
int CSndLossList::getLossLength() const
341
+
int srt::CSndLossList::getLossLength() const
342
342
{
343
343
ScopedLock listguard(m_ListLock);
344
344
345
345
return m_iLength;
346
346
}
347
347
348
-
int32_t CSndLossList::popLostSeq()
348
+
int32_t srt::CSndLossList::popLostSeq()
349
349
{
350
350
ScopedLock listguard(m_ListLock);
351
351
@@ -389,7 +389,7 @@ int32_t CSndLossList::popLostSeq()
389
389
return seqno;
390
390
}
391
391
392
-
void CSndLossList::insertHead(int pos, int32_t seqno1, int32_t seqno2)
392
+
void srt::CSndLossList::insertHead(int pos, int32_t seqno1, int32_t seqno2)
393
393
{
394
394
SRT_ASSERT(pos >= 0);
395
395
m_caSeq[pos].seqstart = seqno1;
@@ -405,7 +405,7 @@ void CSndLossList::insertHead(int pos, int32_t seqno1, int32_t seqno2)
405
405
m_iLength += CSeqNo::seqlen(seqno1, seqno2);
406
406
}
407
407
408
-
void CSndLossList::insertAfter(int pos, int pos_after, int32_t seqno1, int32_t seqno2)
408
+
void srt::CSndLossList::insertAfter(int pos, int pos_after, int32_t seqno1, int32_t seqno2)
409
409
{
410
410
m_caSeq[pos].seqstart = seqno1;
411
411
SRT_ASSERT(m_caSeq[pos].seqend == SRT_SEQNO_NONE);
@@ -419,7 +419,7 @@ void CSndLossList::insertAfter(int pos, int pos_after, int32_t seqno1, int32_t s
419
419
m_iLength += CSeqNo::seqlen(seqno1, seqno2);
420
420
}
421
421
422
-
void CSndLossList::coalesce(int loc)
422
+
void srt::CSndLossList::coalesce(int loc)
423
423
{
424
424
// coalesce with next node. E.g., [3, 7], ..., [6, 9] becomes [3, 9]
425
425
while ((m_caSeq[loc].inext != -1) && (m_caSeq[loc].seqend != SRT_SEQNO_NONE))
@@ -455,7 +455,7 @@ void CSndLossList::coalesce(int loc)
455
455
}
456
456
}
457
457
458
-
bool CSndLossList::updateElement(int pos, int32_t seqno1, int32_t seqno2)
458
+
bool srt::CSndLossList::updateElement(int pos, int32_t seqno1, int32_t seqno2)
459
459
{
460
460
m_iLastInsertPos = pos;
461
461
@@ -481,7 +481,7 @@ bool CSndLossList::updateElement(int pos, int32_t seqno1, int32_t seqno2)
481
481
482
482
////////////////////////////////////////////////////////////////////////////////
483
483
484
-
CRcvLossList::CRcvLossList(int size)
484
+
srt::CRcvLossList::CRcvLossList(int size)
485
485
: m_caSeq()
486
486
, m_iHead(-1)
487
487
, m_iTail(-1)
@@ -499,12 +499,12 @@ CRcvLossList::CRcvLossList(int size)
499
499
}
500
500
}
501
501
502
-
CRcvLossList::~CRcvLossList()
502
+
srt::CRcvLossList::~CRcvLossList()
503
503
{
504
504
delete[] m_caSeq;
505
505
}
506
506
507
-
void CRcvLossList::insert(int32_t seqno1, int32_t seqno2)
507
+
void srt::CRcvLossList::insert(int32_t seqno1, int32_t seqno2)
508
508
{
509
509
// Data to be inserted must be larger than all those in the list
510
510
if (m_iLargestSeq != SRT_SEQNO_NONE && CSeqNo::seqcmp(seqno1, m_iLargestSeq) <= 0)
@@ -578,7 +578,7 @@ void CRcvLossList::insert(int32_t seqno1, int32_t seqno2)
578
578
m_iLength += CSeqNo::seqlen(seqno1, seqno2);
579
579
}
580
580
581
-
bool CRcvLossList::remove(int32_t seqno)
581
+
bool srt::CRcvLossList::remove(int32_t seqno)
582
582
{
583
583
if (m_iLargestSeq == SRT_SEQNO_NONE || CSeqNo::seqcmp(seqno, m_iLargestSeq) > 0)
584
584
m_iLargestSeq = seqno;
@@ -713,7 +713,7 @@ bool CRcvLossList::remove(int32_t seqno)
713
713
return true;
714
714
}
715
715
716
-
bool CRcvLossList::remove(int32_t seqno1, int32_t seqno2)
716
+
bool srt::CRcvLossList::remove(int32_t seqno1, int32_t seqno2)
717
717
{
718
718
if (seqno1 <= seqno2)
719
719
{
@@ -731,7 +731,7 @@ bool CRcvLossList::remove(int32_t seqno1, int32_t seqno2)
731
731
return true;
732
732
}
733
733
734
-
bool CRcvLossList::find(int32_t seqno1, int32_t seqno2) const
734
+
bool srt::CRcvLossList::find(int32_t seqno1, int32_t seqno2) const
735
735
{
736
736
if (0 == m_iLength)
737
737
return false;
@@ -752,20 +752,20 @@ bool CRcvLossList::find(int32_t seqno1, int32_t seqno2) const
752
752
return false;
753
753
}
754
754
755
-
int CRcvLossList::getLossLength() const
755
+
int srt::CRcvLossList::getLossLength() const
756
756
{
757
757
return m_iLength;
758
758
}
759
759
760
-
int32_t CRcvLossList::getFirstLostSeq() const
760
+
int32_t srt::CRcvLossList::getFirstLostSeq() const
761
761
{
762
762
if (0 == m_iLength)
763
763
return SRT_SEQNO_NONE;
764
764
765
765
return m_caSeq[m_iHead].seqstart;
766
766
}
767
767
768
-
void CRcvLossList::getLossArray(int32_t* array, int& len, int limit)
768
+
void srt::CRcvLossList::getLossArray(int32_t* array, int& len, int limit)
769
769
{
770
770
len = 0;
771
771
@@ -788,15 +788,15 @@ void CRcvLossList::getLossArray(int32_t* array, int& len, int limit)
788
788
}
789
789
}
790
790
791
-
CRcvFreshLoss::CRcvFreshLoss(int32_t seqlo, int32_t seqhi, int initial_age)
791
+
srt::CRcvFreshLoss::CRcvFreshLoss(int32_t seqlo, int32_t seqhi, int initial_age)
792
792
: ttl(initial_age)
793
793
, timestamp(steady_clock::now())
794
794
{
795
795
seq[0] = seqlo;
796
796
seq[1] = seqhi;
797
797
}
798
798
799
-
CRcvFreshLoss::Emod CRcvFreshLoss::revoke(int32_t sequence)
799
+
srt::CRcvFreshLoss::Emod srt::CRcvFreshLoss::revoke(int32_t sequence)
800
800
{
801
801
int32_t diffbegin = CSeqNo::seqcmp(sequence, seq[0]);
802
802
int32_t diffend = CSeqNo::seqcmp(sequence, seq[1]);
@@ -827,7 +827,7 @@ CRcvFreshLoss::Emod CRcvFreshLoss::revoke(int32_t sequence)
827
827
return SPLIT;
828
828
}
829
829
830
-
CRcvFreshLoss::Emod CRcvFreshLoss::revoke(int32_t lo, int32_t hi)
830
+
srt::CRcvFreshLoss::Emod srt::CRcvFreshLoss::revoke(int32_t lo, int32_t hi)
831
831
{
832
832
// This should only if the range lo-hi is anyhow covered by seq[0]-seq[1].
833
833
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4